A company is migrating its deployment pipeline from a self-hosted server to GitHub Actions. The pipeline workflows must deploy serverless applications in a production AWS account and retrieve sensitive database credentials. The company's security policy requires that all database credentials be rotated automatically every 30 days and strictly prohibits storing long-term AWS credentials or plaintext secrets in external repositories.
Which combination of actions should a solutions architect recommend to meet these security requirements? (Select TWO.)
- ACreate a dedicated IAM user with programmatic access for the deployment pipeline, generate long-term access keys, and store them as encrypted secrets in the GitHub repository.
- Configure an OpenID Connect (OIDC) identity provider in AWS IAM for GitHub, and create an IAM role with a trust policy that allows the `sts:AssumeRoleWithWebIdentity` action restricted to the specific GitHub repository.Cevap
- CStore the database credentials as a String parameter in AWS Systems Manager Parameter Store, and configure the GitHub Actions workflow to retrieve the credentials using a custom deployment script.
- Store the database credentials in AWS Secrets Manager, configure automatic rotation every 30 days using an AWS Lambda function, and grant the IAM role permissions to retrieve the secret.Cevap
- EEnable automatic key rotation for the AWS KMS Customer Managed Key used to encrypt the credentials, which will immediately re-encrypt all historical database credential versions under the new key version.
Cevap
To securely integrate GitHub Actions and manage database credentials, configure an OpenID Connect (OIDC) identity provider in AWS IAM with an IAM role using web identity federation. Additionally, store the database credentials in AWS Secrets Manager and set up automatic 30-day rotation using an AWS Lambda function.
Establishing an OIDC identity provider in AWS IAM enables GitHub Actions workflows to request short-lived temporary security credentials using the `sts:AssumeRoleWithWebIdentity` action. This removes the need for storing long-term IAM user access keys in GitHub. Storing the database credentials in AWS Secrets Manager allows native integration with rotation schedules using Lambda functions to enforce the 30-day rotation policy.
Adım Adım Çözüm
Anahtar Kavram
Identity federation using OpenID Connect (OIDC) and automated secrets management with rotation.
Tahmini Süre:2m 0s