The log was a second plaintext copy of every secret that had been read: of 3,527
secret events on the live log, 2,574 carried .data in responseObject (1,606 were
plain get). A get is fully described by objectRef + user + sourceIPs +
responseStatus; the body adds a credential and no forensic value, and root reading
the root-only log produces no audit event at all.
- rule 4a: secrets get/list/watch -> Metadata
- rule 4b: secrets create/update/patch/delete/deletecollection -> RequestResponse
(the tampering verbs; the body there is the evidence)
- everything else untouched: pods/exec, tokenreviews, RBAC/cert writes, proxies
docs: rule table, read/write rationale, sensitivity + purge notes.
Measured on the live cluster: the 22.8 GB/day burst was driven by `list secrets`
(1.9 MiB per event — every secret in the namespace) and by helm-controller
rewriting its release blobs. Only list/watch give up their bodies now, so
"who rewrote this secret, and to what" stays reconstructable; steady state is
0.79 GB/day / ~420 events/min, i.e. ~6 days inside 48 x 100 MiB.
Re-verified after the change: create secret (server dry-run) records
requestObject.data; get/patch behave the same.
The apiserver ran with no --audit-* flags at all: secret reads, pods/exec,
RBAC writes and serviceaccounts/token minting left no record anywhere.
- /etc/kubernetes/audit/audit-policy.yaml: RequestResponse for secrets
get/write, pods/exec|attach|portforward, serviceaccounts/token, rbac.*,
certificates.*, impersonate; Metadata for list/watch/update of secrets and
for everything else (that split is what keeps 22.8 GB/day down to 2.5).
- static-pod flags: --audit-policy-file, --audit-log-path (JSON, 100 MiB x 48,
maxage 7, compressed) + hostPath mounts for the policy dir and the log dir.
- install-audit.sh: idempotent, byte-identical re-application after a
kubeadm upgrade silently regenerates the manifest (Flux does not own it).
- docs/kube-apiserver-audit-logging.md: design, measured volume, sensitivity
(the log holds secret bodies), verify commands and rollback.