ENGINEERING GUIDANCE / DETECTION ENGINEERING
Kubernetes API audit policy and pipeline
Editorial guidance based on the linked official references. Verification steps describe an authorized review or test; no execution or production result is claimed.
Foundation
Kubernetes audit records describe API-server request stages according to an audit policy; the selected policy level controls what is recorded and can expose sensitive request or response content.
Architecture
Map each cluster's API server, audit policy, log or webhook backend, retention and external collector; managed Kubernetes services may expose different configuration and delivery controls.
Implementation
Choose observable hypotheses such as changes to role bindings, service accounts or admission configuration, and correlate audit identity, verb, resource, namespace, response and audit ID where present.
Configuration
Place more specific policy rules before broader rules because the first matching rule determines the level. Select metadata, request or response detail only as necessary and protect any recorded sensitive data.
Monitoring
Monitor audit backend failures, collection lag, dropped events and changes to audit policy or cluster authorization; baseline normal controller-generated events separately from human administration.
Troubleshooting
Check rule ordering, omitted stages, request resource and namespace, backend availability, collector parsing and managed-service limitations. Multiple audit stages for one request are not necessarily multiple actions.
Verification
In an isolated cluster, issue an authorized benign resource read and change and a denied request, compare audit stages and selected fields to policy, and verify backend recovery using test data.
Limitations
Audit policy coverage and backend behavior depend on cluster and service version; some activities occur outside the API server. No cluster test has been performed for this reference.
Official sources
- https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/
- https://csrc.nist.gov/pubs/sp/800/92/final
Apply the current publisher guidance and product-specific documentation to the actual environment.
