Soru

Zorluk: ZorMulti-Account Identity and Access Management Federation

An enterprise manages a multi-account environment using AWS Organizations. The security team is configuring federated single sign-on (SSO) to target AWS accounts using an external, SAML 2.0-compliant corporate Identity Provider (IdP). The team has created a SAML provider entity named 'CorporateIdP' in the target member accounts. In the target member accounts, they also created an IAM role named 'ReadOnlyAuditor' to be assumed by the federated users. However, during the initial testing phase, users receive access denied errors immediately after authentication at the IdP portal when redirecting to the AWS console. The security team verifies that the corporate IdP is successfully generating SAML assertions containing the user's attributes. Which of the following configurations represents the correct setup to resolve this issue and establish federated access?

  1. Configure the IAM role's trust policy in each target account to allow the action sts:AssumeRoleWithSAML for the Federated principal referencing the ARN of the 'CorporateIdP' provider. Ensure the SAML assertion includes attributes for https://aws.amazon.com/SAML/Attributes/Role (containing the comma-separated role ARN and SAML provider ARN) and https://aws.amazon.com/SAML/Attributes/RoleSessionName.Cevap
  2. B
    Configure the IAM role's trust policy in each target account to allow the action sts:AssumeRole for the Federated principal referencing the 'CorporateIdP' provider. Ensure the SAML assertion includes the user's corporate email mapped to the standard SAML Subject NameID.
  3. C
    Attach a Service Control Policy (SCP) at the root level of the AWS Organization that explicitly grants sts:AssumeRoleWithSAML permissions to the SAML provider principal across all member accounts. In each target member account, configure the IAM role trust policy to allow sts:AssumeRole for the AWS Organizations root principal.
  4. D
    Configure the IAM role's trust policy in the target member accounts to trust the corporate Identity Provider using the sts:AssumeRoleWithWebIdentity action. Ensure that the SAML assertion is modified to pass the OAuth 2.0 access token as the primary federated attribute.

Cevap

Configure the IAM role's trust policy in each target account to allow the action sts:AssumeRoleWithSAML for the Federated principal referencing the ARN of the 'CorporateIdP' provider, and ensure the SAML assertion contains the Role and RoleSessionName attributes.
The correct configuration uses the 'sts:AssumeRoleWithSAML' action in the IAM role's trust policy, pointing to the SAML provider ARN as the federated principal. It also requires the SAML assertion to contain the specific attributes 'https://aws.amazon.com/SAML/Attributes/Role' and 'https://aws.amazon.com/SAML/Attributes/RoleSessionName' so that AWS can map the authenticated user to the correct role in the member account.

Adım Adım Çözüm

1
Examine the IAM role's trust policy in the target member accounts.
Ensure the trust policy allows the action 'sts:AssumeRoleWithSAML' and targets the Federated SAML provider ARN as the principal.
SAML 2.0 federation requests to AWS must call the AssumeRoleWithSAML API operation, which requires the trust policy to explicitly permit this action for the specific SAML provider principal.
2
Configure the SAML assertion attributes on the corporate Identity Provider.
Include the mandatory attributes: 'https://aws.amazon.com/SAML/Attributes/Role' and 'https://aws.amazon.com/SAML/Attributes/RoleSessionName'.
AWS relies on these specific SAML attributes to identify which IAM role to assume and what the session name should be. The 'Role' attribute must contain both the target role ARN and the SAML provider ARN separated by a comma.
3
Ensure no organizational guardrails or local policies deny the federation request.
Verify that no Service Control Policies (SCPs) deny the 'sts:AssumeRoleWithSAML' action in the target accounts.
An SCP can act as a filter and block the action if it is explicitly denied, even though SCPs cannot be used to grant the federated access directly.

Anahtar Kavram

SAML 2.0 Federation Trust and Assertion Requirements
Tahmini Süre:2m 30s
Bu soruyu puanla