AWS Security ChangesHomeSearch

AWS cognito: Document SAML federation trust scope in identity pools

Service: cognito · 2026-11-26 · Security-related high

File: cognito/latest/developerguide/saml-identity-provider.md · Type: authz

Summary

Adds a new 'SAML federation trust scope in identity pools' section explaining that identity pools use the shared AWS relying party metadata and urn:amazon:webservices audience with no per-pool entity ID or custom audience, that AudienceRestriction/Recipient/Destination do not isolate applications, and gives isolation guidance (dedicated IAM SAML providers per trust boundary, rules-based mapping with Deny, and cognito-identity.amazonaws.com:aud/:amr trust-policy conditions).

Security assessment

The section explicitly describes a cross-application assertion-replay/trust-scope weakness in identity pool SAML federation and prescribes concrete mitigations (per-trust-boundary IAM SAML providers with separate signing certificates, Deny on unmatched rules, and aud/amr condition keys instead of ineffective saml:aud), which prevents unauthorized role assumption via AssumeRoleWithWebIdentity.

Evidence

If a single SAML IdP serves several applications, any user that the IdP authenticates for one of those applications can present their assertion to your identity pool.

Diff

diff --git a/cognito/latest/developerguide/saml-identity-provider.md b/cognito/latest/developerguide/saml-identity-provider.md
index 4c5c002..508c1fb 100644
--- a//cognito/latest/developerguide/saml-identity-provider.md
+++ b//cognito/latest/developerguide/saml-identity-provider.md
@@ -7 +7 @@
-Configuring your identity pool for a SAML IdPConfiguring your SAML IdPCustomizing your user role with SAMLAuthenticating users with a SAML IdP
+Configuring your identity pool for a SAML IdPConfiguring your SAML IdPSAML federation trust scope in identity poolsCustomizing your user role with SAMLAuthenticating users with a SAML IdP
@@ -59,0 +60,19 @@ When your SAML IdP includes more than one signing certificate in SAML metadata,
+## SAML federation trust scope in identity pools
+
+Identity pools federate SAML through the same AWS relying party as IAM SAML federation. The relying party uses the metadata at `https://signin.aws.amazon.com/static/saml-metadata.xml` and the audience `urn:amazon:webservices`.
+
+Identity pools don't have a SAML service provider entity ID for each identity pool, and you can't set a custom audience for an identity pool. Your identity pool trusts the SAML IdP that you register as an IAM SAML provider, not a specific application.
+
+Your identity pool accepts a valid, signed, unexpired, and unreplayed SAML assertion from that IdP. It accepts the assertion even when the IdP issued it for a different application. The `AudienceRestriction`, `Recipient`, and `Destination` values in the assertion don't identify an individual identity pool. Your identity pool doesn't use these values to separate one application from another.
+
+If a single SAML IdP serves several applications, any user that the IdP authenticates for one of those applications can present their assertion to your identity pool. Your identity pool configuration determines which role, if any, that user receives. To keep applications that share an IdP isolated from each other, apply the following configurations:
+
+  * Create a dedicated IAM SAML provider for each trust boundary. In your IdP, configure a separate application with a separate signing certificate for each identity pool or group of applications that requires isolation. Register each one as its own IAM SAML provider. Add to each identity pool only the SAML providers that it trusts.
+
+  * Use rules-based role mapping, and deny requests that don't match a rule. Map a role only when an assertion contains a claim that identifies the application or audience that you trust. Choose a claim that end users can't modify. Set **Role resolution** to **Deny request** , or set `AmbiguousRoleResolution` to `Deny`. With **Use default authenticated role** , or `AuthenticatedRole`, your identity pool issues credentials for your authenticated role to every user that your IdP authenticates. For more information, see [Using role-based access control](./role-based-access-control.html).
+
+  * Restrict the trust policies of your roles to your identity pool. Your identity pool assumes roles with `AssumeRoleWithWebIdentity` through the `cognito-identity.amazonaws.com` principal. SAML condition keys like `saml:aud` aren't present in these requests and have no effect in the trust policy. Use the `cognito-identity.amazonaws.com:aud` and `cognito-identity.amazonaws.com:amr` condition keys. Don't reuse a role across identity pools that belong to different trust boundaries. For more information, see [IAM roles](./iam-roles.html).
+
+
+
+