Skip to content
AI Agent Access Control

Scope the role's trust to the specific agent, service account or workload

Check 4 of 30: Scope the role's trust to the specific agent, service account or workload. A role that any workload in an account or cluster can assume is a role every compromised workload can use. Tying trust to one agent keeps a break-in elsewhere from reaching it.

The whole checklist ยท The map

Why it matters

A role that any workload in an account or cluster can assume is a role every compromised workload can use. Tying trust to one agent keeps a break-in elsewhere from reaching it.

How, in each cloud

AWS
Use trust policy conditions (for Pod Identity, session tags for service account, namespace and cluster; for services, aws:SourceArn and aws:SourceAccount).
Google Cloud
In IAM policies, grant access to the principal that corresponds to one Kubernetes workload, not to the whole cluster or project.
Azure
Configure workload identity federation so one managed identity trusts one Kubernetes workload.

What the documentation says

  • "You can use these tags in the condition keys in the trust policy to restrict which service accounts, namespaces, and clusters can use this role." (source)
  • "We recommend using aws:SourceArn , aws:SourceAccount , aws:SourceOrgID , or aws:SourceOrgPaths in your resource policies wherever" (source)
  • "In your IAM policy, you refer to a Kubernetes resource by using" (source)
  • "Establish a trust relationship between your user-assigned managed identity or app in Microsoft Entra ID and a Kubernetes workload" (source)

Sources

  1. docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html, read 10 Nov 2026
  2. docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html, read 10 Nov 2026
  3. cloud.google.com/kubernetes-engine/docs/concepts/workload-identity, read 10 Nov 2026
  4. learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation, read 10 Nov 2026

Last reviewed 16 Nov 2026.