Skip to content

Commit 882f308

Browse files
committed
2579: audit
1 parent d0cacda commit 882f308

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

keps/sig-auth/2579-psp-replacement/README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -630,22 +630,21 @@ The metric will use the following labels:
630630

631631
The following audit annotations will be added:
632632

633-
1. `pod-security.kubernetes.io/enforce-policy = <policy_level>:<resolved_version>` Record which policy was evaluated
633+
1. `pod-security.kubernetes.io/enforce-policy = "<policy_level>:<version>"` - Record which policy was evaluated
634634
for enforcing mode.
635-
- Resolved version is the actual version of the policy that was evaluated, so in the case of
636-
`latest` or future versions, it will be `latest@<version>` where `<version>` is the tagged
637-
version of the apiserver or webhook (e.g. `[email protected]`).
635+
- version is `latest` or a specific version in the form `v1.x`
638636
- This annotation is only recorded when a policy is enforced. Specifically, it will not be
639637
recorded for irrelevant updates or exempt requests.
640-
2. `pod-security.kubernetes.io/audit-policy = <policy_level>:<resolved_version>` Same as `enforce-policy`, but for
641-
audit mode policies (only included when an audit policy is set).
642-
3. `pod-security.kubernetes.io/enforce-violations = <policy violations>` When an enforcing policy is violated, record
643-
the violations here.
644-
4. `pod-security.kubernetes.io/audit-violations = <policy violations>` When an audit mode policy is violated, record
645-
the violations here.
646-
5. `pod-security.kubernetes.io/exempt = [user, namespace, runtimeClass]` For exempt requests, record the parameters
647-
that triggered the exemption here.
648-
638+
2. `pod-security.kubernetes.io/audit-violations = "<policy violations>"` - When an audit mode policy is violated, record
639+
the violation messages here.
640+
3. `pod-security.kubernetes.io/exempt = "namespace" | "user" | "runtimeClass"` - For exempt requests, record the parameter
641+
that triggered the exemption here. If multiple parameters are exempt, the first in this ordered list will be returned:
642+
- namespace
643+
- user
644+
- runtimeClass
645+
4. `pod-security.kubernetes.io/error = "<evaluation errors>"` - Errors evaluating policies are recorded here
646+
647+
Violation messages returned by enforcing policies are included in the `responseStatus` portion of audit events in the `ResponseComplete` stage.
649648

650649
### PodSecurityPolicy Migration
651650

0 commit comments

Comments
 (0)