An enterprise is implementing federated access to its production database AWS account. The database administrators must authenticate via an external SAML 2.0-compliant Identity Provider (IdP) and assume a specific administrative role (db-admin-role) in the database account. A Solutions Architect has created an IAM SAML identity provider in the target database account. However, when database administrators attempt to log in through the IdP portal, the authentication fails with a 'Not authorized to perform sts:AssumeRoleWithSAML' error. Which configuration change in the database AWS account will resolve this authentication failure?
- Update the trust policy of the database account's IAM role to specify the SAML identity provider as the Principal and allow the sts:AssumeRoleWithSAML action.Answer
- BUpdate the trust policy of the database account's IAM role to specify the SAML identity provider as the Principal and allow the standard sts:AssumeRole action.
- CAttach a Service Control Policy (SCP) at the Organizational Unit (OU) level that defines the SAML identity provider as a trusted entity and grants permission for sts:AssumeRoleWithSAML.
- DUpdate the key policy of the database account's default AWS-managed KMS key (aws/iam) to permit the sts:AssumeRoleWithSAML action for the SAML identity provider.
Answer
Update the trust policy of the database account's IAM role to specify the SAML identity provider as the Principal and allow the sts:AssumeRoleWithSAML action.
To authenticate external users via SAML 2.0, the target IAM role must have a trust policy that explicitly designates the IAM SAML provider as a federated principal and allows the sts:AssumeRoleWithSAML action. This allows the AWS Security Token Service (STS) to validate the SAML assertion and issue temporary credentials.
Step-by-Step Solution
Key Concept
SAML 2.0 federation trust relationships in AWS IAM
Estimated Time:1m 30s