ACL Overview
Access Control List (ACL) is a resource-based access policy option that manages access to buckets and objects. You can grant read and write permissions to other root accounts, sub-accounts and user groups using ACLs.
Unlike an access policy, an ACL in Tencent Cloud has the following limits on the permissions:
Only supports permission grants to Tencent Cloud accounts.
Only supports five operation sets: Read Objects, Write to Objects, Read ACLs, Write to ACLs, and All Permissions.
Does not support additional conditions for the ACL rules to take effect.
Does not support explicit deny.
Control granularities supported by ACLs
Bucket
Object Key Prefix
Object
Control Elements of ACLs
When a bucket or object is created, the root account to which the bucket or object's resources belong has full access to these resources, and the access cannot be modified or deleted. You can use ACLs to grant other Tencent Cloud accounts the access permissions.
The following is an ACL example for a bucket. 100000000001 is the root account, 100000000011 is its sub-account, and 100000000002 is another root account. The ACL contains an Owner element that identifies the bucket owner, who has full access to the bucket. The Grant element grants anonymous read permission, which is expressed as READ permission of http://cam.qcloud.com/groups/global/AllUsers
.
<AccessControlPolicy>
<Owner>
<ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
<DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
</Owner>
<AccessControlList>
<Grant>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RootAccount">
<ID>qcs::cam::uin/100000000001:uin/100000000001</ID>
<DisplayName>qcs::cam::uin/100000000001:uin/100000000001</DisplayName>
</Grantee>
<Permission>FULL_CONTROL</Permission>
</Grant>
<Grant>
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group">
<URI>http://cam.qcloud.com/groups/global/AllUsers</URI>
</Grantee>
<Permission>READ</Permission>
</Grant>
</AccessControlList>
</AccessControlPolicy>
Grantees
Root account
You can grant access permissions to other root accounts using the definition of the principal in CAM, as described below:
qcs::cam::uin/100000000002:uin/100000000002
Sub-account
You can grant access permissions to sub-accounts (such as 100000000011) under your root account or those under other root accounts using the definition of the principal in CAM, as described below:
qcs::cam::uin/100000000001:uin/100000000011
Anonymous user
You can grant access permissions to anonymous users using the definition of the principal in CAM, as described below:
http://cam.qcloud.com/groups/global/AllUsers
Operation Set
The operation sets supported by ACLs are listed below.
|
| Lists and reads objects in the bucket | Lists and reads objects in the directory | |
| Creates, overwrites and deletes any object in the bucket | Creates, overwrites and deletes any object in the directory | |
| | Reads the ACL in the directory | |
| Modifies the ACL of bucket | Modifies the ACL in the directory | Modifies the ACL of object |
| Any operations on the bucket and objects | Any operations on the objects in the directory | Any operations on the objects |
Standard ACL
COS supports a range of predefined authorizations, which are called standard ACLs. The meanings of the standard ACLs are listed below.
Note:
A root account always has the FULL_CONTROL permission, which is not described here.
|
| This is the default policy. Others do not have permissions. The permissions for resources are inherited from upper level. |
| Other users do not have permissions |
| Anonymous user group has the READ permission |
| Anonymous user group has the READ and WRITE permissions. This is not recommended for buckets. |
Directions
Using ACLs in the console
Set an ACL for a bucket
The following example grants another root account the read access to a bucket:
Set an ACL for an object
The following example grants another root account the read access to an object:
Note:
If the message You have no access to it appears when you access a bucket or object using a sub-account, grant the sub-account the access to the bucket through the root account. For more information, see Accessing Bucket List Using Sub-Account. Using ACLs via APIs
Bucket ACL
|
| | Sets the ACL for a specified bucket |
| | Queries the ACL of a bucket |
Object ACL
|
| | Sets the ACL for a specified object in a bucket |
| | Queries the ACL of an object |
Was this page helpful?