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

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

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.

## 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](https://docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html))
- "We recommend using aws:SourceArn , aws:SourceAccount , aws:SourceOrgID , or aws:SourceOrgPaths in your resource policies wherever" ([source](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html))
- "In your IAM policy, you refer to a Kubernetes resource by using" ([source](https://cloud.google.com/kubernetes-engine/docs/concepts/workload-identity))
- "Establish a trust relationship between your user-assigned managed identity or app in Microsoft Entra ID and a Kubernetes workload" ([source](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation))

- [Previous: Limit who can pass, attach or impersonate the agent's role](/checklist/restrict-who-can-attach-role/)
- [Next: Do not run the agent as a default or pre-granted account](/checklist/no-default-accounts/)

## Related pages

- [Do not run the agent as a default or pre-granted account: the check, and how in AWS, Google Cloud and Azure](/checklist/no-default-accounts/)
- [Write the agent's permission policy from what its tools actually call: the check, and how in AWS, Google Cloud and Azure](/checklist/least-privilege-policy/)
- [Set an organization-level ceiling the agent's role cannot exceed: the check, and how in AWS, Google Cloud and Azure](/checklist/set-permission-ceiling/)

## Sources

- docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html: https://docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html (read 10 Nov 2026)
- docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html: https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html (read 10 Nov 2026)
- cloud.google.com/kubernetes-engine/docs/concepts/workload-identity: https://cloud.google.com/kubernetes-engine/docs/concepts/workload-identity (read 10 Nov 2026)
- learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation: https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://aiagentaccesscontrol.com/checklist/scope-trust-to-the-agent/
