Kubernetes Audit Logging Is Not Enough
Kubernetes native audit logs record what hits the API server. For inspected requests in enforce mode, `msh local` records risk tiers and approval decisions. Here's why you run both.
Originally published on the Iddio engineering blog. Iddio is now part of Mezite as msh local — here’s why.
What Kubernetes Audit Logs Give You
Kubernetes has built-in audit logging. When enabled, it records every request that hits the API server: who made the request, what they requested, and what the response was. The audit policy controls what gets logged and at what level (Metadata, Request, RequestResponse).
This is useful. It gives you a complete record of API server activity. But it has blind spots when AI agents are in the picture.
The Blind Spots
Same Principal, Different Actor
Kubernetes audit logs identify the principal — the service account or user that authenticated the request. An AI agent running on a developer’s workstation uses the developer’s own credentials, so the API server logs user: alice@example.com whether Alice typed the command or her AI coding agent did. The cluster cannot tell them apart.
msh local sits on the workstation, in front of the credentials. For requests routed through the proxy and inspected in enforce mode, its audit log records the CLI tool, command, and classification, giving you a workstation-side record the cluster can’t produce. Unmatched and pinned hosts pass through without request inspection.
No Risk Classification
Kubernetes doesn’t classify requests by risk. A kubectl get pods and a kubectl delete namespace production are logged with the same structure — the only difference is the verb and resource fields. There’s no tier assignment, no blast-radius assessment.
msh local classifies inspected requests into one of four tiers (observe, modify, sensitive, break-glass) and includes the classification in enforce-mode audit events. You can see “this AI agent made 500 observe reads and 3 sensitive deletes through inspected routes” without parsing API paths.
No Approval Context
Kubernetes doesn’t know about approval workflows. If a request was escalated, approved by a human, and then forwarded — the Kubernetes audit log just shows the final request. There’s no record of the escalation or its outcome.
msh local writes an op=escalate audit row at resolution carrying the approval verdict, so you can see that a delete was escalated and whether the human allowed or denied it before it ever reached the cluster.
How They Complement Each Other
| Dimension | Kubernetes Audit | msh local Audit |
|---|---|---|
| What was requested | Yes | Yes |
| Who requested it (k8s principal) | Yes | No |
| Workstation-side record per tool | No | Yes |
| Risk classification | No | Yes (4 tiers) |
| Approval workflow | No | Yes |
The ideal setup is running both. Kubernetes audit logs give you the full API server picture (including traffic outside msh local). msh local’s audit log gives you the workstation-side, risk-classified picture with approval context. Correlating the two is a matter of matching timestamps and request paths.
Recommendation
Run both. Kubernetes audit logging captures requests that hit the API server according to its audit policy, including access that does not go through msh local. For requests routed through the proxy and inspected in enforce mode, msh local adds classification and approval context. Unmatched or pinned hosts, and traffic sent directly upstream, are outside that request-level audit guarantee.
Mezite Team
Engineering