Alibaba Cloud Object Storage Service (OSS) buckets store objects that may contain sensitive data. It is recommended that the access policy on OSS buckets does not allow anonymous or public access, ensuring that only authorized identities can interact with bucket contents. The bucket ACL should be set to private to prevent unintended data exposure.
Risk
Allowing anonymous or public access to OSS buckets grants permissions to anyone on the internet to read or modify bucket content. This can lead to data breaches, unauthorized data exfiltration, data tampering, and compliance violations, particularly when buckets contain sensitive or regulated information.
prowler alibabacloud --checks oss_bucket_not_publicly_accessible
Recommendation
Set the OSS bucket ACL to private and configure bucket policies to deny anonymous or public access, ensuring only authorized identities can access stored objects.
Remediation
aliyun oss PutBucketAcl --bucket <bucket-name> --acl private
Set Bucket ACL to Private:
- Log on to the OSS Console
- In the bucket-list pane, click on a target OSS bucket
- Click on Basic Setting in the top middle of the console
- Under ACL section, click on Configure
- Click Private and click Save
For Bucket Policy:
- Click Bucket, and then click the name of the target bucket
- Click the Files tab and click Authorize
- In the Authorize dialog, choose
Anonymous Accounts (*)for Accounts and chooseNonefor Authorized Operation - Click OK
Source Code
Resource Type
ALIYUN::OSS::Bucket