认证考题 | 在 AWS Organizations 中用条件键限制特定部门的访问权限


  题目

A company uses an organization in AWS Organizations to help separate its Amazon EC2 instances and VPCs. The company has separate OUs for development workloads and production workloads. A security engineer must ensure that only AWS accounts in the production OU can write VPC flow logs to an Amazon S3 bucket. The security engineer is configuring the S3 bucket policy with a Condition element to allow the s3:PutObject action for VPC flow logs.
How should the security engineer configure the Condition element to meet these requirements?
A. Set the value of the aws:SourceOrgID condition key to be the organization ID.
B. Set the value of the aws:SourceOrgPaths condition key to be the Organizations entity path of the production OU.
C. Set the value of the aws:ResourceOrgID condition key to be the organization ID.
D. Set the value of the aws:ResourceOrgPaths condition key to be the Organizations entity path of the production OU.

  参考答案

B

  需求概括

一家公司使用 AWS Organizations 中的组织来帮助分离其 Amazon EC2实例和 VPC。该公司为开发工作负载和生产工作负载分别设置了不同的组织单元(OU)。安全工程师必须确保只有生产 OU 中的 AWS 账户才能将 VPC 流日志写入 Amazon S3存储桶。安全工程师正在配置 S3存储桶策略,并使用 Condition 元素来允许对 VPC 流日志的 s3:PutObject 操作。
如何在 S3存储桶策略中配置 Condition 元素,以确保只有生产 OU 中的 AWS 账户才能写入 VPC 流日志。
需要限制只有特定 OU(生产 OU)中的 AWS 账户才能对 S3存储桶执行 s3:PutObject 操作。

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。

A. 不正确。将 aws:SourceOrgID 条件键的值设置为组织 ID。此条件将允许来自组织中任何 OU 的账户执行操作,因为只检查了组织 ID,而没有指定特定的 OU。
B. 正确。将 aws:SourceOrgPaths 条件键的值设置为生产 OU 的组织单元路径。此条件将只允许来自指定生产 OU 路径的账户执行 s3:PutObject 操作,满足需求。
C. 不正确。将 aws:ResourceOrgID 条件键的值设置为组织 ID。此条件不适用于控制对 S3存储桶的访问,因为它指的是资源(S3存储桶)所属的组织 ID,而不是请求来源。
D. 不正确。将 aws:ResourceOrgPaths 条件键的值设置为生产 OU 的组织单元路径。同样,此条件也不适用于控制访问,因为它指的是资源所属的组织单元路径,而不是请求来源。

  技术总结

S3存储桶策略:使用 Condition 元素来基于各种条件(如 AWS 账户、IP 地址、时间等)允许或拒绝访问。
AWS Organizations 相关条件键:
aws:SourceOrgID:用于指定请求来源的组织 ID。
aws:SourceOrgPaths:用于指定请求来源的组织单元路径。
aws:ResourceOrgID:不用于 S3存储桶策略中的条件,因为它指的是资源所属的组织 ID,而不是请求来源。
aws:ResourceOrgPaths:不是用于控制访问的条件键。