Kubernetes Service Account Token Usage

Cloud & SaaSIdentity & DirectoryKubernetesCloud Control PlaneSIEM / Log Aggregator

Location

K8s API audit log (authentication and authorization decisions), cluster secret store, bound token volume projections inside pods

Description

Evidence of service-account token creation, rotation, and usage. Includes bound service-account tokens (projected into pods) and legacy non-expiring tokens stored as Secret resources in the cluster.

Forensic Value

Attackers commonly exfiltrate service-account tokens from compromised pods and reuse them from outside the cluster. Correlating token-use events in the API audit log against the expected pod scheduling and IP address identifies token-theft and replay.

Tools Required

kubectlSIEM with K8s audit logFalco / runtime security tools

Collection Commands

kubectl

kubectl get serviceaccounts -A -o json > serviceaccounts.json; kubectl get secrets -A --field-selector type=kubernetes.io/service-account-token -o json > sa_secrets.json

K8s audit log query

Query audit log for "user.username":"system:serviceaccount:<ns>:<sa>" grouped by sourceIPs to detect unexpected origin IPs

Collection Constraints

  • Bound tokens have short TTL and do not persist as Secrets; audit-log trails are the primary evidence
  • Non-expiring tokens stored as Secrets remain valid indefinitely unless explicitly rotated

MITRE ATT&CK Techniques

T1552.007T1078.004

Related Blockers