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 , 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 . 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?
- AModify 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 range.
- BConfigure 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.
- 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 , while retaining the root-level SCP.Cevap
- DMove 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.