One Token, Two Events: Kubernetes Service Account Auditing
At 02:14 the control-plane log shows a successful TokenRequest for payments/reconciler. Less than a minute later, the service account appears in a Forbidden response from a different namespace. In this hypothetical incident, both events look interesting. Neither is enough on its own. The controller makes legitimate requests under the same service account name, and the cluster has twenty replicas. Start with the small print: the value under issued-credential-id in the first record and the value under credential-id in the second.
If those values match and both records come from the same control plane, there is evidence that the specific credential issued in the first request authenticated the second one. A Forbidden response can therefore be evidence of authenticated use without being evidence of access to data. Tuesday’s article on AI agent approval receipts asked whether an approved intent produced a particular effect. Here the evidence links issuance to authentication, and the response status tells you how much further the request got.
The two events name different actors
Read a successful create on the core serviceaccounts/token subresource as an issuance event. Its user is the principal that authenticated the mint request; objectRef points to the service account for which the token was requested. If impersonation occurred, keep the authenticated and effective requesters separate. On the later use event, user identifies the principal that authenticated that particular request. Treating both usernames as the same join column either loses the handoff or ties it to every replica using the target account.
In the Kubernetes v1.36.0 issuance code, the API server records authentication.kubernetes.io/issued-credential-id as an audit annotation after generating the token, when the JTI feature is enabled and the claim is populated. The authentication code derives the credential ID from the validated JWT’s jti. The upstream field definition ties those stages together: look for the later ID in user.extra["authentication.kubernetes.io/credential-id"], a list, and keep the complete JTI= value. The issuing event may itself have a credential ID in user.extra. That belongs to the caller’s credential, not the newly issued one.
For triage, keep cluster_id from trusted collector metadata with both sides of the join. Each request has its own auditID; use it to group stages of that request, never to tie mint to use. Start with ResponseComplete for issuance and ordinary reads or writes. Handle long-running watches separately: ResponseStarted can give an earlier signal, and alerting independently on both stages inflates counts. A denied attempt to mint a token should remain a separate alert candidate, not a row in the issuance index. The audit event schema defines these fields and the limits of the source IP chain.

Run the join without keeping the bearer token
Elastic’s TokenRequest detection rule, whose source metadata records an October 6, 2026 update, makes a useful starting point for surfacing unusual issuance. Keep the underlying events even when you suppress the notification. A normal kubelet mint can precede abnormal use of the same credential; dropping its event before ingestion leaves the later match with no issuance record. Filter notification noise by the observed requester, target and environment together, rather than discarding every event with a familiar system prefix.
On a self-managed control plane, place a narrow Metadata rule for create on the core serviceaccounts/token subresource before broader rules that drop those events or capture full response bodies. RequestResponse can put the bearer token itself into logs through responseObject.status.token. Use Request only if investigators need the requested audience, object binding or duration and the risk review supports collecting the body. Requested values are not always the final values: the server can default audiences or constrain the requested lifetime. Protect TokenReview request bodies too; those carry a bearer token submitted for validation. The upstream audit policy guide documents first-match ordering and what each level records. Managed services may not let you choose the policy, so verify the exported fields before you promise join coverage.
The following is a detection sketch for normalized records, not an API command. An offline fixture checked the match and four controls: another JTI for the same account, the right JTI from another cluster, a missing JTI, and an ID present only under impersonatedUser. Only the intended pair matched. That tests the join logic, not a live cluster’s audit export.
issuance = ResponseComplete + create serviceaccounts/token + 2xx
key = (trusted_cluster_id, annotations[issued-credential-id])
use = later event where key matches an ID in user.extra[credential-id]
guards = distinct auditID; expected service account; exact ID match
Compare requestReceivedTimestamp across the two requests, not ingestion order or the completion timestamps. Exporter retries can deliver a use record before its mint record arrives, and different API server replicas can have small clock offsets. Keep a bounded lookback sized for credential lifetime and observed pipeline delay; check orphaned uses again after the lag window. An absent annotation, missing user.extra or truncated event means unknown coverage. Never promote a username match to a credential match because a field went missing. Track presence on issuance and use separately, and test the join through the full export pipeline with an approved benign workload before relying on it in production.
What the match buys the responder
With a match in hand, compare the verb, namespace, resource and response status with the reconciler’s normal API footprint. Pivot on the same credential ID to find successful calls as well as denials. A single 403 can be misconfiguration or reconnaissance; repeated 403s against sensitive resource types followed by a 2xx outside the account’s normal scope deserve investigation. Look for a real change in workload or network context using runtime telemetry and trusted ingress or flow logs. The user agent is client-supplied; the forwarded part of sourceIPs is not independently authoritative. Even a verified Pod UID ties a token to the object named by its binding, not to the process or host from which someone presented it. That distinction matters when a credential may have left the workload.
Contain the authority and the credential separately. Remove an unauthorized mint grant to stop new issuance, and restrict the target account’s effective permissions if the already-issued credential can still perform sensitive actions. For a Pod-bound token, preserve the relevant audit and workload context before deleting the bound Pod if the incident allows; then verify the control plane rejects the old bound identity under the actual deletion conditions. For an unbound short-lived token, deleting an arbitrary Pod does not revoke it. There is no per-token revocation list for TokenRequest; deleting and recreating the service account changes its UID and can invalidate the whole set against Kubernetes, with a larger workload impact. The service account administration guide covers binding, deletion timing and the difference between TokenReview and offline OIDC validation.
Check external audiences on a separate timeline. A relying party doing offline signature and claim validation may continue accepting an otherwise valid token after the Kubernetes object is gone, and an already exchanged cloud session has its own lifetime and controls. Search that relying party’s or cloud provider’s logs and confirm containment there before declaring the credential dead. The same distinction between rotating a principal’s familiar credential and removing an outstanding grant appears in the AD CS containment analysis.
Before the next incident, ask the platform team for a benign issuance-and-use trace from each cluster class. Record whether the exact join survives the collector and whether response bodies are absent. Put clusters that cannot show both IDs in a documented coverage gap. A dashboard can tell you that audit logging is on; that trace tells you whether an investigator can follow one credential without having to keep it.
💜 Enjoyed this content? Support the blog with USDT (TRC20):
TX7obcjHQbDUXb4mGqoASEu1QFTKT2CFGG
