Skip to content

Commit e4d0aa3

Browse files
committed
feat: Add dynamic admission controller section to scs 0217
Dynamic Admission Controllers from Policy Engines constitute a special attack surface. From the SIG security threat model, the majority of mitigations are implemented by policy engines and cluster operators. But cluster providers must enable mutual TLS for secure consumption of Kubernetes API webhooks, and cluster operators must use a policy engine that authenticates against those TLS-terminated webhooks (not all policy engines do). Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
1 parent 1bebabc commit e4d0aa3

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Standards/scs-0217-v1-cluster-hardening.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,40 @@ Be aware that Kubelets will only be limited by this admission controller, if the
289289
in the `system:nodes` group begin with a `system:node:<nodeName>` username. Administrators must therefore
290290
configure their Kubelets correctly, if the `NodeRestriction` controller should be fully functional.
291291

292+
### Dynamic Admission Controllers
293+
294+
Policy engines such as [Kubewarden](https://kubewarden.io) & [OPA
295+
Gatekeeper](https://www.openpolicyagent.org/ecosystem/entry/gatekeeper) use
296+
Kubernetes' [dynamic admission
297+
control](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/)
298+
feature. The Kubernetes API server exposes validating and mutating webhooks, to
299+
which these policy engines connect to. The API server waits for responses from
300+
these webhooks before processing resource requests. While policy engines
301+
provide powerful policy, compliance, and logging capabilities that extend
302+
Kubernetes, they also increase the attack surface of the cluster; if a policy
303+
engine is misconfigured or exploited, attackers could cause general denial of
304+
service (DoS), or exfiltrate data from the cluster.
305+
306+
SIG security provides a [threat model for Kubernetes Admission
307+
Control](https://github.com/kubernetes/sig-security/blob/main/sig-security-docs/papers/admission-control/kubernetes-admission-control-threat-model.md).
308+
Policy Engines usually provide their mitigations to this threat model in their
309+
documentation. The majority of scenarios are mitigated by the Policy Engines
310+
themselves or by cluster operators when using NetworkPolicies and therefore are
311+
out of scope for this standard.
312+
313+
However, for some threats, such as threat 8, _"attacker carries out a MITM
314+
attack on the webhook"_, and threat 9, _"attacker steals traffic from the webhook
315+
via spoofing"_, NetworkPolicies and policy engine configuration doesn't suffice.
316+
317+
These threats involve intercepting traffic between the Kubernetes API server
318+
and the dynamic admission controller webhooks of the Policy Engine. To mitigate
319+
this, the Kubernetes API server MUST be configured with mutual TLS
320+
authentication for the Validating and Mutating Webhooks (see [Kubernetes
321+
docs](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#authenticate-apiservers))
322+
. The Policy Engine MUST be able to authenticate the API server and MUST be
323+
configured with mutual TLS authentication for the
324+
webhooks as well.
325+
292326
### Kubelet access control
293327

294328
The Kubelet is the node agent that runs on each node. It registers with the API

0 commit comments

Comments
 (0)