A company needs to grant temporary access to an Amazon S3 bucket in its AWS production account to external, third-party contractors. The contractors authenticate through an external OpenID Connect (OIDC) compliant identity provider and do not have their own AWS accounts. The company's security policy strictly prohibits the use of long-term credentials for external access. Which combination of actions should a solutions architect recommend to configure this access securely? (Select TWO.)
- Create an IAM identity provider for the OIDC-compliant identity provider in the AWS account.Cevap
- Create an IAM role with a trust policy that allows the sts:AssumeRoleWithWebIdentity action, and attach an IAM policy that allows read and write permissions to the target S3 bucket.Cevap
- CCreate individual IAM users in the production account for each contractor, configure multi-factor authentication (MFA), and distribute long-term access keys to them.
- DEnable access keys for the AWS account root user, and configure a trust policy on the root user to delegate access to the external contractors.
- EStore a set of long-term IAM access keys as plaintext parameters in Systems Manager Parameter Store, and grant the contractors access to read these parameters.
Cevap
Establish trust with the external OpenID Connect (OIDC) identity provider by creating an IAM identity provider, and configure an IAM role with a trust policy that permits the sts:AssumeRoleWithWebIdentity action combined with an S3 access policy.
The correct solution involves configuring web identity federation. By creating an IAM identity provider for the OIDC-compliant IdP, AWS can validate external tokens. Creating an IAM role that allows the 'sts:AssumeRoleWithWebIdentity' action in its trust policy enables the external contractors to dynamically exchange their OIDC token for temporary AWS security credentials, conforming to the least privilege principle and the requirement to avoid long-term credentials.
Adım Adım Çözüm
Anahtar Kavram
Web Identity Federation (OIDC) and IAM Roles