A financial company is building a regulatory compliance portal in a production account (Account ID ). The portal needs to securely ingest audit reports generated by a third-party audit firm's application. The third-party application runs on-premises and must authenticate via an external SAML 2.0 identity provider (IdP). The portal must store these files in an Amazon S3 bucket encrypted using AWS KMS. The audit firm's application will upload the files directly to the S3 bucket using temporary security credentials. Which set of configurations should the solutions architect recommend to meet these requirements?
- ACreate a SAML identity provider in IAM within the production account. Create an IAM role with a trust policy that allows the `sts:AssumeRole` action for the SAML provider principal. Attach an IAM policy to the role that grants `s3:PutObject` on the S3 bucket, and `kms:GenerateDataKey` and `kms:Decrypt` on a Customer Managed Key (CMK). Configure the CMK's key policy to permit the IAM role to use the key.
- BCreate a SAML identity provider in IAM within the production account. Create an IAM role with a trust policy that allows the `sts:AssumeRoleWithSAML` action for the SAML provider principal. Attach an IAM policy to the role that grants `s3:PutObject` on the S3 bucket. Configure the S3 bucket to use the default AWS managed key (`aws/s3`) and modify its key policy to allow the IAM role to perform `kms:GenerateDataKey` and `kms:Decrypt`.
- Create a SAML identity provider in IAM within the production account. Create an IAM role with a trust policy that allows the `sts:AssumeRoleWithSAML` action for the SAML provider principal. Attach an IAM policy to the role that grants `s3:PutObject` on the S3 bucket, and `kms:GenerateDataKey` and `kms:Decrypt` on a Customer Managed Key (CMK). Configure the CMK's key policy to permit the IAM role to use the key.Answer
- DCreate a SAML identity provider in IAM within the production account. Create an IAM role with a trust policy that allows the `sts:AssumeRoleWithSAML` action. Attach a Service Control Policy (SCP) to the production account's Organizational Unit (OU) that grants `s3:PutObject` and `kms:GenerateDataKey` permissions to the SAML provider principal, eliminating the need to attach an IAM permission policy to the IAM role.
Answer
Create a SAML identity provider in IAM within the production account. Create an IAM role with a trust policy that allows the `sts:AssumeRoleWithSAML` action for the SAML provider principal. Attach an IAM policy to the role that grants `s3:PutObject` on the S3 bucket, and `kms:GenerateDataKey` and `kms:Decrypt` on a Customer Managed Key (CMK). Configure the CMK's key policy to permit the IAM role to use the key.
The correct solution involves creating a SAML identity provider in IAM and an IAM role with a trust policy that allows the `sts:AssumeRoleWithSAML` action. Furthermore, a Customer Managed Key (CMK) must be used since its key policy can be modified to grant the assumed role permissions to generate data keys and decrypt. Finally, the IAM role must have an attached permission policy that allows S3 uploads and KMS cryptographic actions.
Step-by-Step Solution
Key Concept
Configuring identity federation and customer-managed KMS key policies for secure data ingestion.