AWS EKS Service Account Token Created via TokenRequest API
Detects the creation of a Kubernetes service account token through the TokenRequest API by a non-system identity. The TokenRequest API allows users and workloads to programmatically generate short-lived tokens for any service account they have create permissions on, without accessing the filesystem or the mounted projected token. Attackers who have gained initial access to a cluster can abuse this API to mint tokens for more privileged service accounts, pivot to cloud provider resources via IRSA/workload identity, or generate long-lived tokens that persist beyond pod termination. Unlike mounted service account tokens which are detectable through file access monitoring, tokens created via the TokenRequest API leave no filesystem footprint, they are only visible in Kubernetes audit logs as a create verb on the serviceaccounts/token subresource. This rule excludes legitimate system components such as the kubelet, kube-controller-manager, EKS managed identities, and the Calico/Tigera operator that routinely create tokens for pod lifecycle management.
Detection Logic
data_stream.dataset:"aws.eks_audit" and
aws.eks.audit.verb:"create" and
aws.eks.audit.objectRef.resource:"serviceaccounts" and
aws.eks.audit.objectRef.subresource:"token" and
aws.eks.audit.stage:"ResponseComplete" and
event.outcome:success and
aws.eks.audit.responseStatus.code:201 and
user.name:(* and not
(system\:kube-controller-manager or
system\:kube-scheduler or
system\:node\:* or
system\:serviceaccount\:kube-system\:* or
eks\:* or
system\:serviceaccount\:tigera-operator\:* or
system\:serviceaccount\:calico-system\:*)) False Positives
- ⚠ New automation, admission webhooks, or platform agents that legitimately call the TokenRequest API under a non-standard user string may require narrow exclusions by user.name or source IP.
Field Validations
Loading…
Comments (0)
Loading comments...