Condition keys for agent and workload identity
Agent and workload identity is in preview release for AWS Identity and Access Management (IAM) and is subject to change.
This page lists the condition keys for agent and workload identity. For how to use them, see Control access with agent and workload identity.
Keys on role sessions
AWS Security Token Service (AWS STS) adds these keys to every role session that carries an agent or workload identity. Use them in resource-based policies, identity-based policies, service control policies (SCPs), and resource control policies (RCPs).
Key |
Type |
Value |
|---|---|---|
|
String |
The identifier of the identity that started the call chain, such as |
|
String |
workload or user |
|
String |
The issuer of the origin identity. For an agent or workload identity, this is the ARN of the workload identity provider. Use string condition operators, such as |
|
ARN |
The template that built the origin identity. Absent when the origin is a user. |
|
String |
The account that owns the template the identity was issued under. For an organization-level template, this key is absent and |
|
String |
The organization of the account that owns an account-level template, when that account is in an organization, or the organization that owns an organization-level template. Absent when the account isn't in an organization. |
|
String |
The member account that used an organization-level template. Present only for organization-level templates. Use it to tell one member account's use of a shared template from another's. |
When a session assumes another role, these keys carry over unchanged. They carry over within one AWS organization, or within one account if the account isn't in an organization. A role assumption that leaves the organization returns a session without these keys.
Keys in attestation policies and role trust policies
Key |
Type |
Value |
|---|---|---|
|
String |
A fact about the workload reported by the attesting service. Available in attestation policies and role trust policies. |
Available keys:
Key |
Reported by |
|---|---|
|
Amazon Elastic Kubernetes Service (Amazon EKS) |
|
Amazon EKS |
|
Amazon EKS |
|
Amazon EKS |
|
Amazon EKS |
|
Amazon EKS |
|
Amazon EKS |
|
AgentCore runtime, a capability of Amazon Bedrock AgentCore |
|
AgentCore runtime |
|
AgentCore runtime |
|
AgentCore runtime |
|
AgentCore Gateway, a capability of Amazon Bedrock AgentCore |
|
AgentCore Gateway |
Attestation policies can also use aws:SourceAccount, aws:SourceOrgID, aws:SourceOrgPaths, and aws:SourceArn, which AWS STS takes from the attesting service's request, aws:ResourceAccount for the account that owns the template, and aws:ResourceTag/<key> for the template's own tags.
Keys in role trust policies
Key |
Type |
Value |
|---|---|---|
|
String |
The identifier in the context being attached |
|
String |
workload or user |
|
ARN |
The template in the context |
|
ARN, multivalued |
The providers of the contexts being attached. Use |
Keys on agent and workload identity actions
Key |
Type |
Available on |
Value |
|---|---|---|---|
|
String |
Template actions, except ListWorkloadIdentityTemplates |
The template's path prefix, without leading or trailing slashes. On CreateWorkloadIdentityTemplate, the path prefix in the request. |
|
String |
CreateWorkloadIdentityTemplate, AssociateWorkloadIdentityTemplate, DisassociateWorkloadIdentityTemplate |
The template's path pattern |
|
String |
Provider actions, including ListWorkloadIdentityProviders |
ACCOUNT or ORGANIZATION |
|
String |
Provider actions, including resource policy, tag, and outbound signer actions. Not on ListWorkloadIdentityProviders or GetWorkloadIdentityProviderDeletionStatus. |
The provider's trust domain. On CreateWorkloadIdentityProvider, the domain in the request. |
|
String |
Template actions |
ACCOUNT or ORGANIZATION. Present even when the request omits it. |
|
String |
PassWorkloadIdentityTemplate |
The service principal of the service that stores the template on its resource. |
|
String |
CreateWorkloadIdentityProviderOutboundSigner, UpdateWorkloadIdentityProviderOutboundSigner, DeleteWorkloadIdentityProviderOutboundSigner |
The account that owns the signer's AWS Private CA |
|
Numeric |
GetWebIdentityToken |
The requested token duration, in seconds. Use it to cap the lifetime of JSON Web Token SPIFFE Verifiable Identity Documents (JWT-SVIDs). |
|
String |
GetWebIdentityToken |
The requested token type: AWSIdentity or JWT_SVID. Use it to allow or deny JWT-SVID requests. |
|
String |
GetWebIdentityToken |
The requested subject mode: AWSIdentity or OriginIdentity. Not present when TokenType is JWT_SVID, because a JWT-SVID request can't set a subject mode. |
Workload identity providers and templates also support aws:ResourceTag/<key>, aws:RequestTag/<key>, and aws:TagKeys.