whbing commented on code in PR #4938: URL: https://github.com/apache/ozone/pull/4938#discussion_r1247781384
########## hadoop-hdds/docs/content/security/SecurityAcls.md: ########## @@ -78,16 +78,83 @@ allows the user to overwrite an existing ozone key. 6. **Read_ACL** – Allows a user to read the ACL on a specific object. 7. **Write_ACL** – Allows a user to write the ACL on a specific object. -<h3>Ozone Native ACL APIs</h3> +There are 2 types of ACLs based on their scope - **ACCESS** and **DEFAULT**.<br> +Access ACLs are limited only to the specific object and not inherited. They control the access to the object itself. +Only Default ACLs are inherited by the descendants. Default ACLs cannot be set on keys (as there can be no objects under a key). + + +## Ozone Native ACL APIs The ACLs can be manipulated by a set of APIs supported by Ozone. The APIs supported are: 1. **SetAcl** – This API will take user principal, the name, type -of the ozone object and a list of ACLs. + of the ozone object and a list of ACLs. 2. **GetAcl** – This API will take the name and type of the ozone object -and will return a list of ACLs. + and will return a list of ACLs. 3. **AddAcl** - This API will take the name, type of the ozone object, the -ACL, and add it to existing ACL entries of the ozone object. + ACL, and add it to existing ACL entries of the ozone object. 4. **RemoveAcl** - This API will take the name, type of the -ozone object and the ACL that has to be removed. + ozone object and the ACL that has to be removed. + +## ACL Manipulation Using Ozone CLI + +The ACLs can also be manipulated by using the `ozone sh` commands.<br> +Usage: `ozone sh <object> <action> path-to-object [-a <value>]` <br> Review Comment: (1) Isn't it better to follow the format of `cli -help` info? For example: ```bash $ ozone sh key addacl -h Usage: ozone sh key addacl [-s=<value>] -a=<values>[,<values>...] <value> ``` like this: ```bash Usage: ozone sh <object> <action> -a=<values>[,<values>...] <object_uri> ``` (2) In fact, there are also richer ways, for example: ```bash $ ozone sh bucket setacl -a=anonymous::lr vol1/bucket1 ACLs set successfully. $ ozone sh bucket addacl -a=user:user1:a,user:user2:r vol1/bucket1 ACL user:user1:a[ACCESS] added successfully. ACL user:user2:r[ACCESS] added successfully. ```` So, should `anonymous type` and `multi valued` formats also be added? What I mean is that all descriptions should be as consistent and comprehensive as possible. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
