fix(logging): build the audit line from a JMESPath allowlist (pack leaks _entry) #64
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?
Security fix. The first cut used
stage.pack, and promtail's pack stage embeds the original line under_entry— soresponseObject.data(plaintext secrets) was still written into Loki, just nested.Replaced with a single JMESPath multi-select hash +
stage.output: the stored line contains exactly the allowlisted keys (level, stage, verb, user, resource, apiGroup, ns, name, subresource, code, sourceIP, userAgent, auditID, requestURI) and nothing else, with JSON escaping handled by the library.verb/resourcestill extracted separately for labels.Verified end-to-end offline with
loki.echoon a synthetic audit record carryingresponseObject.data.password:responseObject: 0{filename, resource="secrets", verb="get"}Follow-up in the task: the handful of minutes ingested with the leaky config get purged (PVC wiped, audit positions reset) so no copy of those bodies survives anywhere.