An enterprise manages its multi-account AWS environment using AWS Organizations. The enterprise federates user identities from an external SAML 2.0-compliant identity provider (IdP). To enforce fine-grained access control across accounts, the solutions architect needs to implement Attribute-Based Access Control (ABAC) using the user's Department attribute defined in the IdP. The SAML assertion is already configured to send the department name. Which configuration must the solutions architect apply to the IAM roles in the target accounts to support this identity federation and access control model?
- AConfigure the IAM role trust policy to trust the SAML IdP, and allow both the sts:AssumeRole and sts:TagSession actions. Use the aws:RequestTag/Department condition key in the role's policies to validate the user's department.
- Configure the IAM role trust policy to trust the SAML IdP, and allow both the sts:AssumeRoleWithSAML and sts:TagSession actions. Use the aws:PrincipalTag/Department condition key in the role's policies to permit access to resources with matching tags.Cevap
- CConfigure the IAM role trust policy to trust the SAML IdP and allow the sts:AssumeRoleWithSAML action. Use the saml:Attributes/Department condition key in the role's policies to restrict resource access.
- DConfigure a Service Control Policy (SCP) at the Organizational Unit (OU) level to propagate the SAML assertion's Department attribute as a session tag. Allow the sts:AssumeRoleWithSAML action in the target IAM role's trust policy.
Cevap
Configure the IAM role trust policy to trust the SAML IdP, and allow both the sts:AssumeRoleWithSAML and sts:TagSession actions. Use the aws:PrincipalTag/Department condition key in the role's policies to permit access to resources with matching tags.
The correct option is correct because implementing ABAC with SAML federation requires the SAML assertion to pass the attributes as session tags. For AWS to accept and apply these attributes as principal tags, the IAM role's trust policy must explicitly allow the sts:AssumeRoleWithSAML action to authorize federation and the sts:TagSession action to permit session tagging. Once trusted, these tags can be referenced globally in IAM policies using the aws:PrincipalTag/Department condition key.
Adım Adım Çözüm
Anahtar Kavram
To implement Attribute-Based Access Control (ABAC) using external SAML federation in a multi-account setup, the IAM role trust policy must allow both the sts:AssumeRoleWithSAML action (for authentication) and the sts:TagSession action (to accept federated attributes as principal tags). The tags can then be evaluated dynamically using the aws:PrincipalTag condition key in authorization policies.
Tahmini Süre:2m 0s