界: Environment
このセクションには、ソース コード以外のものでも、作成中の製品のセキュリティにとって重要なものがすべて含まれています。この分野が対象とする問題は、ソース コードに直接関係しないため、この分野の他の部分と分けました。
GCP Terraform Misconfiguration: Cloud Storage Bucket Uniform Access Disabled
Abstract
Terraform 構成は、アクセス制御リストを使用した権限の制御を可能にする Google Storage バケットをセットアップします。
Explanation
権限の管理を誤ると、制限されたデータへの不正アクセスや改変のリスクが高まります。
バケットおよびバケット内のオブジェクトにアクセスするためのユーザー権限を定義するために、Google Cloud Storage には次の 2 つのシステムが用意されています。アクセス制御リスト (ACL) とアイデンティティ/アクセス管理 (IAM)。IAM は Google Cloud 全体で使用できますが、ACL をサポートするのは Cloud Storage のみです。均一なバケットレベルのアクセスを有効にすると、ACL で権限を付与できなくなります。これにより、IAM が Google Cloud リソースのすべてのアクセス制御を管理する唯一のシステムになります。
例 1: 次の Terraform 構成では、
バケットおよびバケット内のオブジェクトにアクセスするためのユーザー権限を定義するために、Google Cloud Storage には次の 2 つのシステムが用意されています。アクセス制御リスト (ACL) とアイデンティティ/アクセス管理 (IAM)。IAM は Google Cloud 全体で使用できますが、ACL をサポートするのは Cloud Storage のみです。均一なバケットレベルのアクセスを有効にすると、ACL で権限を付与できなくなります。これにより、IAM が Google Cloud リソースのすべてのアクセス制御を管理する唯一のシステムになります。
例 1: 次の Terraform 構成では、
uniform_bucket_level_access
を false
に設定することで、IAM と一緒に ACL を使用してストレージ バケットへのアクセスを許可できます。
resource "google_storage_bucket" "bucket-demo" {
...
uniform_bucket_level_access = false
...
}
References
[1] HashiCorp google_storage_bucket
[2] Google Cloud Uniform bucket-level access
[3] Google Cloud Organization policy constraints for Cloud Storage
[4] Standards Mapping - CIS Google Cloud Computing Platform Benchmark Recommendation 5.2
[5] Standards Mapping - Common Weakness Enumeration CWE ID 284
[6] Standards Mapping - DISA Control Correlation Identifier Version 2 CCI-002121
[7] Standards Mapping - FIPS200 AC
[8] Standards Mapping - General Data Protection Regulation (GDPR) Access Violation
[9] Standards Mapping - NIST Special Publication 800-53 Revision 4 AC-2 Account Management (P1)
[10] Standards Mapping - NIST Special Publication 800-53 Revision 5 AC-2 Account Management
[11] Standards Mapping - OWASP API 2023 API8 Security Misconfiguration
[12] Standards Mapping - OWASP Application Security Verification Standard 4.0 1.4.4 Access Control Architectural Requirements (L2 L3)
[13] Standards Mapping - OWASP Top 10 2017 A5 Broken Access Control
[14] Standards Mapping - OWASP Top 10 2021 A01 Broken Access Control
[15] Standards Mapping - Security Technical Implementation Guide Version 4.11 APSC-DV-002880 CAT II
[16] Standards Mapping - Security Technical Implementation Guide Version 5.1 APSC-DV-002880 CAT II
[17] Standards Mapping - Security Technical Implementation Guide Version 5.2 APSC-DV-002880 CAT II
[18] Standards Mapping - Security Technical Implementation Guide Version 5.3 APSC-DV-002880 CAT II
[19] Standards Mapping - Security Technical Implementation Guide Version 6.1 APSC-DV-002880 CAT II
[20] Standards Mapping - Security Technical Implementation Guide Version 6.2 APSC-DV-002880 CAT II
desc.structural.hcl.gcp_terraform_misconfiguration_cloud_storage_bucket_uniform_access_disabled