Managing the operating modes of security control rules of KSPM
The Admission type security control rules of the KSPM module have two operating modes:
Audit: Mode in which a rule violation does not block the deployment of workloads in Kubernetes clusters. Default mode.Blocking: Mode in which a rule violation leads to blocking the deployment of workloads in Kubernetes clusters.
Enabling Blocking mode
To enable Blocking mode for a rule:
- Go to Yandex Security Deck
. - In the left-hand panel, select
Rules and exceptions. - At the top of the window, select the workspace you want to change the rule mode in.
- On the Security control rules page that opens, go to the Kubernetes® tab. In the list that appears, find the
Admissiontype rule whose mode you want to change. Optionally, use the filter at the top of the list. - Click Mode: Audit
next to the rule and selectEnable block mode. - In the window that opens, confirm enabling lock mode.
You can also change the rule's operating mode in the **Rule type
** field on the rule's detailed info page.
Enabling Audit mode
To enable Audit mode for a rule (if Blocking mode was previously enabled for this rule):
- Go to Yandex Security Deck
. - In the left-hand panel, select
Rules and exceptions. - At the top of the window, select the workspace you want to change the rule mode in.
- On the Security control rules page that opens, go to the Kubernetes® tab. In the list that appears, find the
Admissiontype rule whose mode you want to change. Optionally, use the filter at the top of the list. - Click Mode: Blocking
next to the rule and selectDisable block mode. - In the window that opens, confirm disabling lock mode.
You can also change the rule's operating mode in the **Rule type
** field on the rule's detailed info page.
Managing lock mode with the help of exceptions
When you activate Blocking mode for a rule, by default it applies to all Kubernetes® clusters in the workspace.
To change this logic and explicitly specify which Kubernetes® resources in the workspace will not be subject to Blocking mode, create an exception to the rule:
-
Go to Yandex Security Deck
. -
In the left-hand panel, select
Rules and exceptions. -
At the top of the window, select the workspace in which you want to set up an exception for the security control rule.
-
On the Security control rules page that opens, navigate to the Kubernetes® tab and select from the list the
Admissiontype rule you want to create an exception for. Optionally, use the filter at the top of the list. -
In the rule info window that opens, go to the Exceptions tab and click Create exception.
-
Under Effect, select the correct lock mode:
Ignore rule: Checks for compliance with the rule for the resources named in the exception are off completely; no violations are logged.Disable lock mode for rule: Violations of the rule for the resources named in the exception will be logged, but deployment of workloads in Kubernetes® clusters will not be blocked.
-
Under Scope, specify the clusters for which to cancel the lock, configure other settings, and complete the exception setup.
Tip
If necessary, look up Managing exceptions from KSPM security control rules.
Security Deck workspaces allow you to manage Yandex Cloud infrastructure security in a more granular way. They are containers for settings and resources of Security Deck modules, lists of controlled resources, control parameters, etc. For more information, see Security Deck workspaces.
You can use KSPM exceptions to specify objects you want excluded from the control rules in place. For more information on exceptions, see Managing exceptions from KSPM security control rules.