Public access enabled on an Alicloud OSS bucket

Review public OSS bucket ACLs and restrict unintended anonymous reads and writes.

Description

Use private for internal OSS buckets. public-read allows public reads, while public-read-write also allows writes, subject to other access controls.

Potential impact

Unintended reads can expose files. Public writes can change or delete data and increase storage costs.

Remediation

Remove public grants from bucket policies and object ACLs. Enable Block Public Access for internal storage and confirm an anonymous read is denied. Keep published content separate and restrict writes and administration to approved identities.

Examples

Change the ACL on the existing bucket. Keep its name and Terraform resource address.

Before

hcl
resource "alicloud_oss_bucket" "public_bucket" {
  bucket = "bucket-170309-acl"
  acl    = "public-read"
}

After

hcl
resource "alicloud_oss_bucket" "private_bucket" {
  bucket = "bucket-170309-acl"
  acl    = "private"
}

References