Cloud concept · Updated

SAML 2.0 - SAML 2.0 is an XML-based federation standard that lets an identity provider communicate authenticated identities and attributes to a trusted service provider.

In short

Security Assertion Markup Language 2.0 enables users to access cloud accounts and applications using an existing organizational identity rather than separate credentials for each destination. It supports centralized authentication and single sign-on, while the receiving service remains responsible for deciding what the user can access.

Cloud Concepts Hub →

6 key aspects of SAML 2.0

SAML 2.0 combines explicit federation trust, signed identity assertions, centralized authentication, and destination-controlled access without replacing provisioning or session management.

01
Separation of authentication and authorization

The IdP authenticates the user and supplies identity attributes, while the destination service evaluates access permissions. Successful SAML authentication does not by itself grant administrative or resource access.

02
Explicit trust and assertion validation

Federation relies on configured issuers, signing certificates, endpoints, and audience restrictions. Validate signatures and assertion conditions, and plan certificate rotation to avoid outages or acceptance of untrusted assertions.

03
Centralized workforce sign-in

Users can reuse their organizational identity across multiple cloud accounts and applications without receiving separate passwords at each destination. Central authentication policies can enforce MFA, although each integration must correctly handle the resulting authentication context.

04
Temporary access with separate session lifetimes

A validated assertion can establish an application session or be exchanged for temporary cloud credentials. Assertion expiration, application session duration, and credential expiration are distinct settings that must be managed together.

05
Attribute-driven access mapping

Assertions can carry identifiers and attributes used to select roles or populate supported session attributes. Treat these mappings as security-sensitive configuration and restrict which users or groups can receive privileged values.

06
Independent identity provisioning

SAML communicates authentication and attributes during federation; it does not synchronize a directory. Use SCIM or another supported provisioning process when the destination requires preexisting users and group memberships.

Cloud services for SAML 2.0

For direct AWS account federation, IAM defines the trusted SAML provider and eligible roles, while STS exchanges validated assertions for temporary credentials. IAM Identity Center provides a centralized alternative for workforce access across accounts, combining external SAML authentication with account assignments and permission sets; identity provisioning remains a separate integration. Amazon Cognito applies the same federation concept to application sign-in, converting an external SAML authentication into user pool tokens. Choose the integration according to whether the destination is AWS workforce access or an application, and coordinate permissions, identity lifecycle, and session controls accordingly.

Amazon CognitoAmazon Cognito

Amazon Cognito user pools can federate application users through SAML 2.0 identity providers. Cognito handles the SAML integration and issues user pool tokens to the application, rather than requiring the application to process SAML assertions directly.

SAML 2.0 exam questions

Real practice exam questions on SAML 2.0, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DVA-C02

A company has an internal desktop application that lets employees query an Amazon DynamoDB table. Employees authenticate with the company's existing SAML 2.0 identity provider. After authentication, the application receives a signed SAML assertion that includes the employee's permitted AWS role and identity provider ARNs.

A developer must give the application temporary AWS credentials with the permissions of the employee's assigned role. The solution must use direct federation without creating IAM users, storing long-term AWS credentials, or operating a credential broker.

Which solution should the developer implement?

Show answerCORRECT ANSWER

Create an IAM SAML identity provider and configure the assigned role to trust it for sts:AssumeRoleWithSAML. Have the application submit the assertion, role ARN, and provider ARN to AWS STS and use the returned credentials.

AssumeRoleWithSAML exchanges a valid SAML assertion for temporary role credentials without requiring existing AWS credentials. The IAM SAML provider establishes trust in the external identity provider, and the role's trust policy authorizes the federation. The application can use the returned access key ID, secret access key, and session token to sign DynamoDB requests.

SAP-C03

A financial services company uses AWS IAM Identity Center with an external SAML 2.0 identity provider (IdP) for access to its AWS organization. Employees start AWS access either from an AWS access portal bookmark or from an AWS application tile in the corporate IdP dashboard. The tile currently performs IdP-initiated SAML sign-in.

During testing, employees whose IAM Identity Center sessions have expired can establish new sessions without an authentication prompt because their corporate IdP sessions are still valid. Compliance requires fresh authentication at the corporate IdP whenever employees establish a new AWS access portal session through either supported entry point. Existing AWS sessions can retain their current lifetimes, and sign-in behavior for unrelated corporate applications must not change. The company can modify the AWS tile and the IdP's AWS-specific SAML configuration.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Enable user re-authentication in IAM Identity Center. Change the AWS tile to open the AWS access portal and configure the IdP's AWS integration to honor ForceAuthn in incoming SAML authentication requests.

Enabling user re-authentication makes IAM Identity Center send ForceAuthn="true" in its SAML AuthnRequest. The IdP must honor this flag to prompt the user. Making the tile link to the AWS access portal ensures that both supported entry points use the SP-initiated flow to which this option applies, without changing unrelated applications' sign-in behavior.

DOP-C02

A company uses direct SAML federation from its corporate identity provider (IdP) into 70 AWS accounts. Each account has an IAM SAML provider and an Operations role that permits sts:AssumeRoleWithSAML. Each role's trust policy requires SAML:aud to equal https://signin.aws.amazon.com/saml. The IdP currently posts SAML responses to that global sign-in endpoint.

The company must provide two independently usable regional sign-in paths, one in us-east-2 and one in us-west-2. Engineers must be able to select either path before authentication. Neither path may depend on the global AWS sign-in endpoint being available. The IdP supports multiple assertion consumer service (ACS) configurations, and existing IAM provider and role ARNs must remain unchanged.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Configure IdP sign-in paths with ACS URLs https://us-east-2.signin.aws.amazon.com/saml and https://us-west-2.signin.aws.amazon.com/saml, using the selected endpoint as the assertion Recipient. Update each Operations role's trust policy to allow both regional URLs in its SAML:aud condition while retaining the existing provider principal and sts:AssumeRoleWithSAML action.

Regional AWS sign-in SAML endpoints provide independent browser-based federation paths. The IdP must submit the assertion to the selected regional endpoint with the matching Recipient, and the role's SAML:aud condition must permit that value. IAM SAML providers and roles do not need to be recreated for each Region, so their ARNs remain unchanged.

Practice SAML 2.0 in a full exam

Questions on SAML 2.0 in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is SAML 2.0

3 min read

SAML 2.0 establishes federation between an identity provider, or IdP, and a service provider, or SP. The IdP authenticates the user, potentially enforcing multifactor authentication and device policies, and issues an XML assertion describing that authentication and selected identity attributes. The SP validates the assertion against its configured trust relationship and establishes access. The user's password normally stays with the IdP rather than being disclosed to the destination service.

Trust is established through configuration, not simply because an assertion contains a recognizable username. Administrators exchange metadata containing entity identifiers, endpoints, and signing certificates. The receiving service must validate the applicable signatures, issuer, audience, recipient, and validity conditions. Request correlation and replay protections are also important where applicable to the selected flow. TLS protects transport, but signing does not conceal assertion contents; encryption is a separate capability whose support depends on the integration.

In a typical browser-based flow, a user opens a cloud application, is redirected to the IdP, authenticates, and returns through the browser with a SAML response submitted to the application's assertion consumer service endpoint. IdP-initiated access can instead begin from an application tile in a corporate portal. The application then creates its own session. SAML assertion validity and application session lifetime are separate controls, so a short-lived assertion does not necessarily mean a short-lived application session.

For direct federation into AWS accounts, an administrator creates an IAM SAML identity provider using the corporate IdP's metadata and configures IAM roles that trust that provider. The trust policy permits sts:AssumeRoleWithSAML and should constrain the intended SAML audience. The IdP supplies AWS-specific attributes identifying permitted role and provider ARN pairs. AWS STS validates the request and issues temporary role credentials; browser federation can use these credentials to establish console access. IAM role policies and other applicable AWS policy controls determine the resulting permissions, not the user's password or the mere presence of a role name in an assertion.

At organizational scale, AWS IAM Identity Center can use an external SAML 2.0 IdP for authentication while administrators manage AWS account access through group assignments and permission sets. For example, a platform engineering group can receive operational access in development accounts and more restricted access in production. Identity Center provisions corresponding IAM roles in assigned accounts. User and group provisioning is a separate concern: SCIM or supported manual processes supply identities and memberships; SAML authentication alone is not directory synchronization.

Federation reduces the need for individual IAM users and long-lived access keys, but it introduces dependence on IdP availability, correct attribute mappings, signing-certificate rollover, and consistent clocks. Automate configuration where practical, test certificate changes before cutover, and maintain tightly controlled emergency access. Disabling a user at the IdP generally prevents future authentication but does not automatically invalidate every existing application session or STS credential. Session limits and service-specific revocation procedures therefore remain necessary.

Common misconceptions include treating SAML as an authorization policy language, a provisioning protocol, or a universal replacement for OAuth and OpenID Connect. Its principal cloud use is enterprise federation, especially browser-based workforce access. Modern command-line access can use Identity Center's supported login flows rather than manually handling SAML assertions. Workloads should normally use workload roles or appropriate workload federation rather than automate human SAML sign-in. Enforce MFA at the IdP and verify how authentication assurance is conveyed; do not assume a federated session automatically carries AWS-native MFA context. Correlate IdP authentication records with cloud audit events and use meaningful session identifiers to preserve accountability.

Learn SAML 2.0 in lessons

5 short lessons on SAML 2.0 in 2 certification courses.

Open the lessons