The Kubernetes audit log shows successful `list pods` requests from `system:anonymous`
AdvancedTroubleshootingCertificates, TLS and security incident response
Answer
Likely causes → Anonymous auth is on (the API server default) and someone bound a role to system:anonymous or system:unauthenticated, often a quick fix for a monitoring tool or a tutorial.
Diagnose →
kubectl get clusterrolebindings,rolebindings -A -o json | \
jq -r '.items[] | select(.subjects[]?.name | test("system:(anonymous|unauthenticated)")) | "\(.kind) \(.metadata.namespace // "-") \(.metadata.name) -> \(.roleRef.name)"'
kubectl auth can-i --list --as=system:anonymous
Fix → Delete those bindings. Review the audit log for what anonymous callers accessed and from which IPs. Restrict API endpoint exposure (private endpoint or authorized networks).
Prevent → Run a policy or CI check that rejects bindings to anonymous or unauthenticated subjects. Where possible, restrict anonymous auth to health endpoints only (AuthenticationConfiguration anonymous conditions in recent Kubernetes versions).
More on Certificates, TLS and security incident response
A cert-manager Certificate stays `Ready=False` and the Challenge shows `Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'`IntermediateA DNS-01 challenge hangs forever with `DNS record for "acme.com" not yet propagated`, although `dig` from your laptop shows the TXT recordAdvancedIssuance fails with `429 urn:ietf:params:acme:error:rateLimited: too many certificates already issued`BeginnerA service calling another internal service fails with `x509: certificate signed by unknown authority`BeginnerAt 05:30 every client starts failing with `x509: certificate has expired or is not yet valid`BeginnerBrowsers load `https://api.acme.com` fine, but `curl` and Java clients fail with `unable to get local issuer certificate`Intermediate