View a markdown version of this page

Condition keys for agent and workload identity - AWS Identity and Access Management

Condition keys for agent and workload identity

Preview release

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

aws:OriginIdentity/Subject

String

The identifier of the identity that started the call chain, such as spiffe://corp.example.com/payments/checkout. Set once and never replaced.

aws:OriginIdentity/SubjectType

String

workload or user

aws:OriginIdentity/Issuer

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 StringEquals, with this key.

aws:OriginIdentity/WorkloadIdentityTemplateArn

ARN

The template that built the origin identity. Absent when the origin is a user.

aws:OriginIdentity/IdentityProviderAccount

String

The account that owns the template the identity was issued under. For an organization-level template, this key is absent and IdentityProviderOrgID names the organization.

aws:OriginIdentity/IdentityProviderOrgID

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.

aws:OriginIdentity/IssuedFor

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

aws:WorkloadAttestation/<tier>/<provider>/<key>

String

A fact about the workload reported by the attesting service. Available in attestation policies and role trust policies.

Available keys:

Key

Reported by

aws:WorkloadAttestation/aws/eks/ClusterName

Amazon Elastic Kubernetes Service (Amazon EKS)

aws:WorkloadAttestation/aws/eks/ClusterArn

Amazon EKS

aws:WorkloadAttestation/aws/eks/Namespace

Amazon EKS

aws:WorkloadAttestation/aws/eks/ServiceAccount

Amazon EKS

aws:WorkloadAttestation/aws/eks/PodName

Amazon EKS

aws:WorkloadAttestation/aws/eks/PodUid

Amazon EKS

aws:WorkloadAttestation/aws/eks/NodeName

Amazon EKS

aws:WorkloadAttestation/aws/bedrock-agentcore/RuntimeId

AgentCore runtime, a capability of Amazon Bedrock AgentCore

aws:WorkloadAttestation/aws/bedrock-agentcore/RuntimeName

AgentCore runtime

aws:WorkloadAttestation/aws/bedrock-agentcore/RuntimeVersion

AgentCore runtime

aws:WorkloadAttestation/aws/bedrock-agentcore/RuntimeSessionId

AgentCore runtime

aws:WorkloadAttestation/aws/bedrock-agentcore/GatewayId

AgentCore Gateway, a capability of Amazon Bedrock AgentCore

aws:WorkloadAttestation/aws/bedrock-agentcore/GatewayName

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

sts:RequestContext/WorkloadIdentifier

String

The identifier in the context being attached

sts:RequestContext/SubjectType

String

workload or user

sts:RequestContext/WorkloadIdentityTemplateArn

ARN

The template in the context

sts:RequestContextProviders

ARN, multivalued

The providers of the contexts being attached. Use ForAllValues:StringEquals or ForAllValues:StringLike with "Null": { "sts:RequestContextProviders": "false" }. ForAllValues alone also matches a request that carries no context. Use string condition operators, because this key can also carry the providers of trusted identity propagation contexts.

Keys on agent and workload identity actions

Key

Type

Available on

Value

iam:WorkloadIdentityPathPrefix

String

Template actions, except ListWorkloadIdentityTemplates

The template's path prefix, without leading or trailing slashes. On CreateWorkloadIdentityTemplate, the path prefix in the request.

iam:WorkloadIdentityPathPattern

String

CreateWorkloadIdentityTemplate, AssociateWorkloadIdentityTemplate, DisassociateWorkloadIdentityTemplate

The template's path pattern

iam:WorkloadIdentityProviderScope

String

Provider actions, including ListWorkloadIdentityProviders

ACCOUNT or ORGANIZATION

iam:WorkloadIdentityProviderDomain

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.

iam:WorkloadIdentityResourceScope

String

Template actions

ACCOUNT or ORGANIZATION. Present even when the request omits it.

iam:PassedToService

String

PassWorkloadIdentityTemplate

The service principal of the service that stores the template on its resource.

iam:CertificateAuthorityAccount

String

CreateWorkloadIdentityProviderOutboundSigner, UpdateWorkloadIdentityProviderOutboundSigner, DeleteWorkloadIdentityProviderOutboundSigner

The account that owns the signer's AWS Private CA

sts:DurationSeconds

Numeric

GetWebIdentityToken

The requested token duration, in seconds. Use it to cap the lifetime of JSON Web Token SPIFFE Verifiable Identity Documents (JWT-SVIDs).

sts:TokenType

String

GetWebIdentityToken

The requested token type: AWSIdentity or JWT_SVID. Use it to allow or deny JWT-SVID requests.

sts:SubjectMode

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.