infra(logging): ship kube-apiserver audit log with secret bodies stripped #59
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_34ddaa83"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #52/#56: ship the kube-apiserver audit log that
t_104f62a6made live.job="kube/apiserver-audit"— read-only hostPath mount of/var/log/kubernetes/auditonsiriussec(a pod-log collector cannot see a host file), live file plus rotated.gz(decompression { format = "gz" }).level: RequestResponseeachget secretsrecord carriesresponseObject.data— the plaintext secret. The record is parsed and re-emitted as a packed allowlist (level, stage, verb, user, objectRef.*, responseStatus.code, sourceIPs[0], userAgent, auditID, requestURI, requestReceivedTimestamp);requestObject/responseObjectnever reach Loki, and unparseable lines are dropped rather than passed through.verb,resource(small, fixed).userand the object name stay in the packed body to keep the stream count flat.Verification to be posted as a comment: a
get secretsrecord is queryable withuser/verb/resource, and{job="kube/apiserver-audit"} |= "responseObject"returns zero lines.