Skip to content

Commit 8f8d9b2

Browse files
Manish Kumartengqm
andauthored
Register and document some authz-related audit annotations (#32200)
* Registered audit annotation * Update content/en/docs/reference/labels-annotations-taints/audit-annotations.md Co-authored-by: Qiming Teng <[email protected]> * fix. Co-authored-by: Qiming Teng <[email protected]>
1 parent 09f8637 commit 8f8d9b2

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,10 @@ based on setting `securityContext` within the Pod's `.spec`.
495495

496496
## Annotations used for audit
497497

498-
- [`pod-security.kubernetes.io/exempt`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
499-
- [`pod-security.kubernetes.io/enforce-policy`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
498+
- [`authorization.k8s.io/decision`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-decision)
499+
- [`authorization.k8s.io/reason`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-reason)
500500
- [`pod-security.kubernetes.io/audit-violations`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-audit-violations)
501+
- [`pod-security.kubernetes.io/enforce-policy`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
502+
- [`pod-security.kubernetes.io/exempt`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)
501503

502504
See more details on the [Audit Annotations](/docs/reference/labels-annotations-taints/audit-annotations/) page.

content/en/docs/reference/labels-annotations-taints/audit-annotations.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,20 @@ that was transgressed as well as the specific policies on the fields that were
5656
violated from the PodSecurity enforcement.
5757

5858
See [Pod Security Standards](/docs/concepts/security/pod-security-standards/)
59-
for more information.
59+
for more information.
60+
61+
## authorization.k8s.io/decision
62+
63+
Example: `authorization.k8s.io/decision: "forbid"`
64+
65+
This annotation indicates whether or not a request was authorized in Kubernetes audit logs.
66+
67+
See [Auditing](/docs/tasks/debug-application-cluster/audit/) for more information.
68+
69+
## authorization.k8s.io/reason
70+
71+
Example: `authorization.k8s.io/decision: "Human-readable reason for the decision"`
72+
73+
This annotation gives reason for the [decision](#authorization-k8s-io-decision) in Kubernetes audit logs.
74+
75+
See [Auditing](/docs/tasks/debug-application-cluster/audit/) for more information.

0 commit comments

Comments
 (0)