Soru

Zorluk: ZorMulti-Account Identity and Access Management Federation

An enterprise implements a multi-account strategy using AWS Organizations. Users authenticate via an external corporate Identity Provider (IdP) using SAML 2.0. A solutions architect configures direct SAML federation to each member account by creating an IAM SAML identity provider and a federated IAM role in each account. The security team requires that federated users must only be allowed to assume the role if the authentication request originates from the corporate network range of 203.0.113.0/24203.0.113.0/24, and once authenticated, they must be prevented from performing any actions if they leave the corporate network. The solutions architect implements a Service Control Policy (SCP) at the root level of the organization that denies all actions (*) if the request context does not originate from 203.0.113.0/24203.0.113.0/24. The security team discovers that federated users are still able to successfully perform the initial authentication and obtain active AWS session credentials from outside the corporate network, although they cannot run any subsequent commands after the role is assumed. Which of the following modifications should the solutions architect make to ensure the entire authentication flow and subsequent actions are restricted to the corporate network?

  1. A
    Modify the root-level Service Control Policy (SCP) to explicitly deny the sts:AssumeRole and sts:AssumeRoleWithSAML actions for all principals if the request does not originate from the 203.0.113.0/24203.0.113.0/24 range.
  2. B
    Configure the IAM role trust policy in each member account to use the sts:AssumeRole action instead of sts:AssumeRoleWithSAML, and add a condition block that checks the SAML:iss and SAML:aud attributes along with the aws:SourceIp restriction.
  3. Configure the IAM role trust policy in each member account to include a condition block that restricts the sts:AssumeRoleWithSAML action to the aws:SourceIp range of 203.0.113.0/24203.0.113.0/24, while retaining the root-level SCP.Cevap
  4. D
    Move the existing Service Control Policy (SCP) from the organization root to each specific Organizational Unit (OU) containing the member accounts, and add a statement to exclude the AWS STS service endpoints from the IP restriction condition.

Cevap

Configure the IAM role trust policy in each member account to include a condition block that restricts the sts:AssumeRoleWithSAML action to the aws:SourceIp range of 203.0.113.0/24203.0.113.0/24, while retaining the root-level SCP.
The correct answer is correct because the initial request to assume a role via SAML federation is made via the sts:AssumeRoleWithSAML API call to the AWS STS service. Because the caller is an external entity (federated user) and does not yet have an IAM principal identity in the AWS Organization, Service Control Policies (SCPs) do not apply to this initial call. Therefore, the SCP cannot block the role assumption based on source IP. To restrict the ability to assume the role, the source IP condition must be evaluated during the trust evaluation, which requires placing the IP restriction directly within the trust policy of the IAM role. The SCP will then properly enforce the IP restriction on any subsequent API requests made by the assumed role's session credentials.

Adım Adım Çözüm

1
Analyze the lifecycle of a federated request via SAML 2.0.
The client POSTs the SAML assertion to the AWS STS endpoint to assume a federated role.
To determine where the request is evaluated and which policies apply at the time of authentication.
2
Evaluate the applicability of Service Control Policies (SCPs) on the initial STS call.
Since the external caller is not an IAM principal within the Organization, the SCP does not apply to the sts:AssumeRoleWithSAML call.
To understand why the user can still authenticate and obtain credentials from unauthorized networks despite the root-level SCP.
3
Formulate the correct configuration to secure both role assumption and session usage.
Add the source IP restriction using the aws:SourceIp condition key directly to the IAM role trust policy for the sts:AssumeRoleWithSAML action, while keeping the SCP to restrict subsequent session actions.
To ensure the trust policy restricts the authentication phase and the SCP restricts the active session phase.

Anahtar Kavram

Evaluation of trust policies versus Service Control Policies (SCPs) in SAML federation.
Tahmini Süre:3m 0s
Bu soruyu puanla