A company needs to grant a third-party auditing firm temporary access to run configuration compliance checks on resources across all accounts in its AWS Organization. The auditing firm will access the organization's accounts from their own AWS account () using a commercial automated tool. The company's security policy requires that:
- The auditing tool must only be allowed to read resource configuration metadata, with no access to read actual data stored in Amazon S3 buckets or databases.
- The configuration must mitigate the risk of the 'confused deputy' security vulnerability.
- The access granted to the auditing firm must automatically expire in days without requiring manual intervention.
Which solution meets these requirements securely and with the least administrative overhead?
- AShare the AWS account root user credentials of the company's AWS Organizations management account with the auditing firm to allow direct access. Set a calendar reminder to manually change the root user password and rotate the multi-factor authentication (MFA) token after days to revoke their access.
- BCreate a dedicated IAM user in the company's AWS Organizations management account. Attach the AWS-managed ReadOnlyAccess policy to this user, generate long-term access keys, and provide them to the auditing firm. Configure an Amazon S3 lifecycle policy to delete the credentials document after days.
- Create an IAM role in the company's AWS Organizations management account that trusts the auditing firm's AWS account (). In the trust policy, specify a condition for the unique external ID provided by the auditing firm and a DateLessThan condition restricting the current time to days. Attach the AWS-managed SecurityAudit policy to this role.Answer
- DCreate an IAM user with access keys configured to assume an administrative role. Store the IAM user's Access Key ID and Secret Access Key as a plaintext String parameter in AWS Systems Manager Parameter Store. Configure an AWS Lambda function to run daily to delete the parameter and the IAM user after days.