Cloud —

AWS extends Trusted Identity Propagation to IAM federation, IAM Roles Anywhere

The ability to authorize and examine actions based on the specific user or workload—which can be an application, service, or automated workflow—behind an AWS Identity and Access Management (IAM)…

AWS extends Trusted Identity Propagation to IAM federation, IAM Roles Anywhere

The ability to authorize and examine actions based on the specific user or workload—which can be an application, service, or automated workflow—behind an AWS Identity and Access Management (IAM) role is now more accessible through AWS. Trusted identity propagation (TIP) transmits the identity of the caller or workload with every AWS request, enabling permission granting and tracking of activities within AWS CloudTrail. Previously, TIP was restricted to individuals accessing AWS via AWS IAM Identity Center. This functionality has been expanded to encompass IAM federation and AWS IAM Roles Anywhere, supporting both users and workloads that federate directly into IAM roles or utilize X.509 certificates to acquire AWS credentials. Furthermore, the implementation of TIP within IAM Identity Center has been streamlined. This document will detail the mechanics of TIP and outline the recent enhancements introduced with this release. It will subsequently illustrate two scenarios demonstrating how TIP enhances both access control and auditability tied to the underlying IAM role. The piece concludes by providing guidance on initiating this process depending on the chosen federation route into AWS.

Users and workloads have expressed a desire to govern access to AWS resources and monitor activity by identifying the specific user or workload associated with an IAM role. Currently, access control determinations are made against the role itself, and CloudTrail attributes every action to the role session. To differentiate access for two distinct users or workloads, one must either establish a distinct role or utilize a single shared role augmented with policies that inspect session attributes. The proliferation of separate roles presents an operational challenge. Session attributes persist across role sessions only when supplementary permissions are granted, yet the session itself does not retain records of who configured each attribute. TIP resolves this deficiency by affixing identity context originating from a trusted source, such as an identity provider (IdP), onto the role session at the moment credentials are issued. This identity context specifies the user or workload initiating a request and may incorporate optional claims for the session, such as a risk score or the designation of a continuous integration and delivery (CI/CD) workflow. Trusted origins include external SAML or OIDC IdPs configured for IAM federation, IAM Identity Center, and X.509 certificates configured for IAM Roles Anywhere. Once AWS attaches this identity context to a role session, that context remains immutable throughout the session's duration. This methodology provides IAM policies and audit logs with a consistent reference point to the user or workload behind every request. The context also propagates to supported subsequent requests. When a TIP session (a role session bearing identity context) assumes another role, the AWS Security Token Service (AWS STS) carries that context into the newly assumed role session. Likewise, when an AWS service executes a downstream request on behalf of the user, the request employs forward access sessions (FAS), and the FAS credentials carry the identity context from the original session. It should be noted that TIP context only transfers to a new role session if the target role resides in the account where the identity provider is configured, or if the target role is in another account within the same AWS organization. For a comprehensive understanding of how account and organization boundaries dictate TIP context propagation, reference the IAM User Guide. Figure 1 illustrates this end-to-end operational sequence.

A user or workload obtains AWS credentials through one of three pathways. If using IAM federation, the source material is either a SAML assertion or an OIDC token belonging to a user or workload. For IAM Identity Center, the origin is the username that IAM Identity Center retrieves from your identity source. In the case of IAM Roles Anywhere, the source is an X.509 certificate belonging to a user or workload. AWS verifies the source and then attaches identity context to the role session. This context remains associated with the session's requests, whether the session directly calls an AWS service, assumes another role, or prompts an AWS service to make downstream requests via FAS. IAM policies then use this identity context to authorize requests, as demonstrated by the Amazon Simple Storage Service (Amazon S3) bucket policy example later in this article, and AWS CloudTrail records this information, as shown in the AWS Lambda example. With IAM outbound identity federation, the session also possesses the capability to request a signed JSON Web Token (JWT) that conveys identity context to an external service. Figure 1 details how TIP transmits identity information into authorization and auditing processes.

AWS represents the identity context within a TIP session through three distinct groups of context keys. The following table summarizes the function of these keys and directs users to the relevant documentation. For comprehensive details regarding the content and appearance of these context keys within a TIP session, consult the section on TIP context keys in IAM policies. The context keys are categorized as follows:

| Context Keys | Purpose | | :--- | :--- | | aws:OriginIdentity/* | Pinpoints the user or workload that initiated the request and the source that issued its identity. | | aws:TransactionContext/IdentityProvider/* | Transports supplementary claims from your IdP, such as a CI/CD workflow name or a risk score. This is exclusive to IAM federation. | | aws:IdentityCenterInstanceArn and aws:IdentityStoreArn | Identifies the IAM Identity Center instance and identity store associated with a session. These keys are usable in IAM policy conditions if you employ IAM Identity Center permission sets or IAM account access manager, allowing, for instance, access restriction solely to workforce users from a specific instance. |

Table 1 delineates the categories of TIP context keys and what each represents. The aws:OriginIdentity/* prefix serves as the universal namespace for identity information across IAM federation, IAM Identity Center, and IAM Roles Anywhere. Regardless of the path taken among these three, aws:OriginIdentity/Subject identifies the user or workload that began the request, aws:OriginIdentity/SubjectType specifies whether the request originated from a user or a workload, and aws:OriginIdentity/Issuer names the source that provided the identity. For IAM federation and IAM Roles Anywhere, aws:OriginIdentity/FederatedProviderArn also contains the Amazon Resource Name ARN) of the IAM IdP or the IAM Roles Anywhere trust anchor that authenticated the identity. IAM policies are capable of evaluating TIP context keys when these keys are present in the request. AWS CloudTrail logs identity context within the userIdentity element of its events. Specifically, the userIdentity.onBehalfOf section logs the user or workload identity derived from the aws:OriginIdentity context keys, while the userIdentity.transactionContext section records IdP claims from the aws:TransactionContext/IdentityProvider context keys. Refer to Logging TIP activity with AWS CloudTrail for definitions and examples of these fields.

The advantages conferred by trusted identity propagation include:

  • Auditing by identity, not solely by role: CloudTrail documents the specific user or workload responsible for every request.
  • Authorization based on the requester: IAM policies permit or deny access contingent upon the user or workload, or on optional claims provided by your IdP, such as a risk score, thereby affording granular control for each session.
  • Reliance on verifiable identity: AWS embeds identity context from a trusted source when credentials are issued. This context cannot be altered during the session's lifespan and persists when the session assumes another role or when an AWS service makes requests on the user's behalf.
  • Unified model across federation routes: IAM federation, IAM Identity Center, and IAM Roles Anywhere share the identical core aws:OriginIdentity context keys, ensuring that policies are written and CloudTrail records are reviewed uniformly across over 250 supported AWS services. This context propagates across supported workflows without necessitating the addition of the sts:SetContext permission to role trust policies.

This recent deployment extends TIP functionality to IAM federation and IAM Roles Anywhere, while simultaneously simplifying the TIP experience within IAM Identity Center. Furthermore, it allows for sharing identity context with external services via IAM outbound identity federation.

Regarding AWS IAM Identity Center, applications integrated with this service, such as Amazon S3 Access Grants and AWS Lake Formation, already permit auditing user actions and managing access based on the user's identity. By enabling the simplified experience, Identity Center incorporates a username, which is an identifier from your identity source, alongside the system-generated identity store user ID. This identity data is consistently carried across all access pathways, including application access, account access managed through IAM Identity Center permission sets, and IAM account access manager. With this new release, the propagated username, mapped to the aws:OriginIdentity/Subject context key, can now be utilized in IAM policy conditions and viewed within CloudTrail events. Further details can be found in the documentation on the Simplified experience for trusted identity propagation.

For users and workloads employing direct SAML or OIDC federation into IAM roles, the user selects the SAML assertion field or OIDC token claim that identifies the user or workload, and TIP attaches this information to the role session. Additionally, optional SAML attributes or OIDC claims, such as a CI/CD workflow name or a risk score, can be mapped into the aws:TransactionContext/IdentityProvider/* context keys. TIP is activated by default for newly established IAM IdPs, and it can be activated for pre-existing providers. Consult the documentation on TIP for IAM Federation for more information.

When users or workloads external to AWS utilize X.509 certificates with IAM Roles Anywhere, TIP attaches the identity derived from that certificate to the role session. Once IAM Roles Anywhere validates the certificate against the designated trust anchor, AWS defaults to setting aws:OriginIdentity/Subject to the certificate’s Subject common name or its URI Subject Alternative Name. TIP is enabled automatically for new IAM Roles Anywhere profiles, and it can be enabled for existing profiles. Specifics can be found in the Trusted id documentation.

The broader trend indicated by this development is the industry-wide movement toward granular, identity-centric governance, moving beyond coarse-grained resource-level permissions. The ability to reliably trace actions back to a specific identity, regardless of the underlying federation mechanism, aligns

Reported by AWS.

cloud

Related coverage

Elsewhere in this edition