1. Home
  2. Security Hardening
  3. CIS Kubernetes V1.20 Benchmark V1.0.0 L1 Master
  4. Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not used

Ensure that the admission control plugin SecurityContextDeny is set if PodSecurityPolicy is not used

Details

The SecurityContextDeny admission controller can be used to deny pods which make use of some SecurityContext fields which could allow for privilege escalation in the cluster. This should be used where PodSecurityPolicy is not in place within the cluster.

Rationale:

SecurityContextDeny can be used to provide a layer of security for clusters which do not have PodSecurityPolicies enabled.

Impact:

This admission controller should only be used where Pod Security Policies cannot be used on the cluster, as it can interact poorly with certain Pod Security Policies

Solution

Edit the API server pod specification file /etc/kubernetes/manifests/kube-apiserver.yaml on the master node and set the –enable-admission-plugins parameter to include SecurityContextDeny, unless PodSecurityPolicy is already in place.

–enable-admission-plugins=…,SecurityContextDeny,…

Default Value:

By default, SecurityContextDeny is not set.

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Access Control, Configuration Management.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles