A consultant agency needs to perform a security audit for a company’s production AWS account. Several consultants need access to the account. The consultant agency already has its own AWS account. The company requires multi-factor authentication (MFA) for all access to its production account. The company also forbids the use of long-term credentials.
Which solution will provide the consultant agency with access that meets these requirements?
A. Create an IAM group. Create an IAM user for each consultant. Add each user to the group. Turn on MFA for each consultant.
B. Configure Amazon Cognito on the company’s production account to authenticate against the consultant agency’s identity provider (IdP). Add MFA to a Cognito user pool.
C. Create an IAM role in the consultant agency’s AWS account. Define a trust policy that requires MFA. In the trust policy, specify the company’s production account as the principal. Attach the trust policy to the role.
D. Create an IAM role in the company’s production account. Define a trust policy that requires MFA. In the trust policy, specify the consultant agency’s AWS account as the principal. Attach the trust policy to the role.
D
一家咨询机构需要对一家公司的生产型 AWS 账户进行安全审计。多名咨询师需要访问该账户。这家咨询机构已经拥有自己的 AWS 账户。公司要求所有对其生产账户的访问都必须使用多因素身份验证(MFA)。同时,公司禁止使用长期凭证。
咨询机构需要访问公司的生产型 AWS 账户进行安全审计,公司要求访问必须使用多因素身份验证(MFA)且禁止使用长期凭证,询问哪种解决方案能满足这些要求。
多因素身份验证(MFA):一种安全认证方法,要求用户提供两种或更多种不同类型的身份验证信息来证明其身份,增加账户安全性。
AWS IAM(Identity and Access Management):AWS 提供的身份和访问管理服务,用于安全地管理对 AWS 服务和资源的访问。可以通过创建 IAM 用户、组、角色等来控制访问权限。
IAM 角色:是一种 AWS 身份,它具有特定的权限策略。角色可以被其他 AWS 服务、用户或外部身份(如来自其他 AWS 账户的身份)承担,以获取相应的权限。
信任策略:定义了哪些主体(如 AWS 账户、用户或服务)可以承担某个角色,以及承担角色时需要满足的条件(如是否需要 MFA)。
Amazon Cognito:AWS 提供的用户身份和数据同步服务,可用于管理用户身份验证和授权,支持与外部身份提供商(IdP)集成。
技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
A. 不正确。创建一个 IAM 组。为每位咨询师创建一个 IAM 用户。将每个用户添加到该组中。为每位咨询师启用多因素身份验证(MFA)。该方案在公司生产账户中创建 IAM 用户和组,并为每个用户启用 MFA。但公司禁止使用长期凭证,创建 IAM 用户会生成长期凭证(访问密钥),不符合公司要求。
B. 不正确。在公司的生产账户上配置 Amazon Cognito,以针对咨询机构的身份提供商(IdP)进行身份验证。向 Cognito 用户池添加多因素身份验证(MFA)。该方案使用 Amazon Cognito 集成了外部身份提供商并添加了 MFA,但这种方式相对复杂,且没有直接利用 AWS IAM 角色这种更简洁、更适合跨账户访问管理的机制。
C. 不正确。在咨询机构的 AWS 账户中创建一个 IAM 角色。定义一个需要多因素身份验证(MFA)的信任策略。在信任策略中,将公司的生产账户指定为主体。将信任策略附加到该角色。信任策略指定公司生产账户为主体,意味着公司生产账户可以承担此角色,但实际需求是咨询机构访问公司生产账户,逻辑错误,应该是咨询机构账户作为可承担角色的主体去访问公司生产账户,所以该选项不正确。
D. 正确。在公司的生产账户中创建一个 IAM 角色。定义一个需要多因素身份验证(MFA)的信任策略。在信任策略中,将咨询机构的 AWS 账户指定为主体。将信任策略附加到该角色。该方案在公司生产账户创建 IAM 角色,通过信任策略指定咨询机构 AWS 账户为主体,且要求 MFA。这样咨询机构人员可以通过承担该角色访问公司生产账户,满足公司对 MFA 的要求,同时避免了使用长期凭证(通过角色临时获取权限),符合题目要求。