@@ -150,6 +150,20 @@ matchConditions:
150
150
- expression: '!("system:nodes" in request.userInfo.groups)'
151
151
` ` `
152
152
153
+ Since the expression will be evaluated using a common Kubernetes CEL library, these expressions
154
+ should also get automatic access to the secondary authorization check mechanism described in
155
+ [KEP-3488 : CEL for Admission Control](/keps/sig-api-machinery/3488-cel-admission-control#secondary-authz).
156
+ In practice, this means that RBAC bindings can be used to opt-out privileged users from security policy :
157
+
158
+ _Note : The secondary authz mechanism has not yet been designed, and the example syntax here is just
159
+ to illustrate how it might be used._
160
+
161
+ ` ` ` yaml
162
+ matchConditions:
163
+ # Exclude users with the 'breakglass' permission on the 'security-policy' webhook.
164
+ - expression: '!authorized(request.userInfo, "breakglass", "validatingwebhookconfigurations.admissionregistration.k8s.io/security-policy")'
165
+ ` ` `
166
+
153
167
# ### Scope an NFS access management webhook to Pods mounting NFS volumes
154
168
155
169
> I want to narrowly scope my webhook to only the relevant requests, in order to reduce load on the
@@ -223,7 +237,7 @@ type MatchCondition struct {
223
237
//'request' - Attributes of the admission request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
224
238
//
225
239
// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
226
- // request. object. No other metadata properties are accessible.
240
+ // object. No other metadata properties are accessible.
227
241
//
228
242
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
229
243
// Accessible property names are escaped according to the following rules when accessed in the expression:
0 commit comments