SAP-C02 学习助手

SAP-C02 第 459 题

IAM Config

题目

A company is using GitHub Actions to run a CI/CD pipeline that accesses resources on AWS. The company has an IAM user that uses a secret key in the pipeline to authenticate to AWS. An existing IAM role with an attached policy grants the required permissions to deploy resources. The company’s security team implements a new requirement that pipelines can no longer use long-lived secret keys. A solutions architect must replace the secret key with a short-lived solution. Which solution will meet these requirements with the LEAST operational overhead?

中文翻译:
一家公司正在使用 GitHub Actions 运行访问 AWS 上资源的 CI/CD 管道。该公司有一个 IAM 用户,该用户使用管道中的密钥向 AWS 进行身份验证。具有附加策略的现有 IAM 角色授予部署资源所需的权限。该公司的安全团队实施了一项新要求,即管道不能再使用长期密钥。解决方案架构师必须用短期解决方案替换密钥。哪种解决方案能够以最少的运营开销满足这些要求?

选项

A. Create an IAM SAML 2.0 identity provider (IdP) in AWS Identity and Access Management (IAM). Create a new IAM role with the appropriate trust policy that allows the sts:AssumeRole API call. Attach the existing IAM policy to the new IAM role. Update GitHub to use SAML authentication for the pipeline.

中文翻译:
在 AWS Identity and Access Management (IAM) 中创建 IAM SAML 2.0 身份提供商 (IdP)。使用允许 sts:AssumeRole API 调用的适当信任策略创建新的 IAM 角色。将现有 IAM 策略附加到新的 IAM 角色。更新 GitHub 以对管道使用 SAML 身份验证。

B. Create an IAM OpenID Connect (OIDC) identity provider (IdP) in AWS Identity and Access Management (IAM). Create a new IAM role with the appropriate trust policy that allows the sts:AssumeRoleWithWebIdentity API call from the GitHub OIDC IdP. Update GitHub to assume the role for the pipeline.

中文翻译:
在 AWS Identity and Access Management (IAM) 中创建 IAM OpenID Connect (OIDC) 身份提供商 (IdP)。使用适当的信任策略创建新的 IAM 角色,以允许从 GitHub OIDC IdP 进行 sts:AssumeRoleWithWebIdentity API 调用。更新 GitHub 以承担管道的角色。

C. Create an Amazon Cognito identity pool. Configure the authentication provider to use GitHub. Create a new IAM role with the appropriate trust policy that allows the sts:AssumeRoleWithWebIdentity API call from the GitHub authentication provider. Configure the pipeline to use Cognito as its authentication provider.

中文翻译:
创建 Amazon Cognito 身份池。配置身份验证提供程序以使用 GitHub。使用适当的信任策略创建新的 IAM 角色,以允许来自 GitHub 身份验证提供商的 sts:AssumeRoleWithWebIdentity API 调用。配置管道以使用 Cognito 作为其身份验证提供程序。

D. Create a trust anchor to AWS Private Certificate Authority. Generate a client certificate to use with AWS IAM Roles Anywhere. Create a new IAM role with the appropriate trust policy that allows the sts:AssumeRole API call. Attach the existing IAM policy to the new IAM role. Configure the pipeline to use the credential helper tool and to reference the client certificate public key to assume the new IAM role.

中文翻译:
创建 AWS 私有证书颁发机构的信任锚。生成客户端证书以与 AWS IAM Roles Anywhere 一起使用。使用允许 sts:AssumeRole API 调用的适当信任策略创建新的 IAM 角色。将现有 IAM 策略附加到新的 IAM 角色。配置管道以使用凭证辅助工具并引用客户端证书公钥来承担新的 IAM 角色。

答案

B

解析

正确答案:B 解析: 本题应选择 B。 正确选项: B. 在 AWS Identity and Access Management (IAM) 中创建 IAM OpenID Connect (OIDC) 身份提供商 (IdP)。使用适当的信任策略创建新的 IAM 角色,以允许从 GitHub OIDC IdP 进行 sts:AssumeRoleWithWebIdentity API 调用。更新 GitHub 以承担管道的角色。 选择理由...

登录后查看完整解析