A company needs to grant 500 external contractors access to specific AWS resources in a single AWS account. The contractors already have identities managed in an external OpenID Connect (OIDC) compliant identity provider. The company's security policy states that no long-term AWS credentials should be created for these contractors, and they must authenticate using their existing corporate credentials. Which solution meets these security requirements with the least administrative overhead?
- Establish a trust relationship between AWS and the external OIDC identity provider by creating an OIDC identity provider in IAM, map the provider to IAM roles with the necessary permissions, and configure the contractors to assume these roles.Answer
- BCreate individual IAM users in the AWS account for each contractor, assign them to an IAM group with the required permissions, and require them to set up multi-factor authentication (MFA) for console login.
- CEnable console access for the AWS account root user, share the root credentials with the contractor team lead, and instruct the lead to create and manage the necessary resources on behalf of all contractors.
- DRetrieve the corporate credentials from the OIDC identity provider, store them as plaintext String parameters in AWS Systems Manager Parameter Store, and write a custom Lambda function to validate contractors during login.
Answer
Establish a trust relationship between AWS and the external OIDC identity provider by creating an OIDC identity provider in IAM, map the provider to IAM roles with the necessary permissions, and configure the contractors to assume these roles.
Establishing a trust relationship with the external OIDC provider and mapping groups to IAM roles allows contractors to assume roles and receive temporary credentials. This satisfies the requirement of using existing corporate credentials, avoids creating long-term AWS credentials, and minimizes administrative overhead.
Step-by-Step Solution
Key Concept
Federating identity providers with AWS IAM using OIDC allows external users to securely access AWS resources using temporary security credentials, avoiding the administrative overhead and security risks of managing individual IAM users.