GKE API Request Impersonating Privileged Identity
Description
Detects GKE API requests where a caller is impersonating a privileged cluster identity such as system:kube-controller-manager, system:admin, system:anonymous, or a kube-system service account. These identities have broad cluster-wide permissions including unrestricted access to secrets, the ability to create tokens for any service account, schedule pods on any node, and modify RBAC. Impersonating system:kube-controller-manager grants access to secrets across namespaces and service account token minting for lateral movement.
Query · kuery
data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and gcp.audit.authentication_info.authority_selector:( "admin" or "cluster-admin" or "kubernetes-admin" or "system:admin" or "system:anonymous" or "system:apiserver" or "system:kube-controller-manager" or "system:kube-proxy" or "system:kube-scheduler" or "system:volume-scheduler" or system\:node\:* or system\:serviceaccount\:kube-system\:* ) and not client.user.email:( "system:kube-controller-manager" or "system:kube-scheduler" or system\:node\:* or system\:serviceaccount\:kube-system\:* )
Investigation fields
Pivot points the source recommends for triage.
@timestampclient.user.emailsource.ipuser_agent.originalevent.actionevent.outcomegcp.audit.authentication_info.authority_selectorgcp.audit.resource_namedata_stream.namespace
Implementation guide
The GCP Fleet integration with GKE audit logs enabled is required. Kubernetes impersonation (kubectl --as) maps to
gcp.audit.authentication_info.authority_selector in Fleet.
Known false positives
- Break-glass admin tooling, security scanners, or approved controllers that legitimately use impersonation against privileged targets may match. Map expected callers and expand client.user.email exclusions as needed.
Analyst notes
Investigating GKE API Request Impersonating Privileged Identity
Compare the real actor (client.user.email, source.ip, user_agent.original) with the impersonated identity in
gcp.audit.authentication_info.authority_selector (Cloud Audit authenticationInfo.authoritySelector). Confirm
whether impersonation is authorized for that principal and target identity.
Possible investigation steps
- Review
event.actionandgcp.audit.resource_namefor the scope of the operation performed while impersonating. - Determine whether the real user or service account should have
impersonaterights against the target user or group; inspect RBAC bindings and any recent changes. - Correlate with adjacent audit activity (secrets, TokenRequest, RBAC writes, CSR approval) from the same source identity.
- Hunt for repeated impersonation across namespaces or rapid pivoting after the event.
False positive analysis
- Approved admin or scanner workflows that intentionally use
kubectl --asagainst privileged targets may match. Allowlist those identities after review.
Response and remediation
- Revoke or tighten
impersonatepermissions for unexpected identities; rotate credentials for any account that may have abused impersonation. - If unauthorized, treat as cluster-wide credential risk: review secrets exposure, issued tokens, and RBAC drift.