You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Siyao Meng (Jira)" <ji...@apache.org> on 2021/06/04 20:06:00 UTC

[jira] [Updated] (HDDS-5306) Ozone Shell getacl capable of printing ACL string the way it is fed to setacl

     [ https://issues.apache.org/jira/browse/HDDS-5306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Siyao Meng updated HDDS-5306:
-----------------------------
    Description: 
getacl should be able to return the ACL string (e.g. user:user1:rw,group:hadoop:a) the same way ACL is set for better usability. This is useful when one wants to delete an ACL via CLI, or slightly change the ACL with copy-pasting. Currently, getacl can only return a JSON array:

{code}
$ ozone sh bucket addacl vol1/bucket-src --acls=user:user1:rw,group:hadoop:a
ACL user:user1:rw[ACCESS] added successfully.
ACL group:hadoop:a[ACCESS] added successfully.

$ ozone sh bucket getacl vol1/bucket-src
[ {
  "type" : "USER",
  "name" : "testuser/scm@EXAMPLE.COM",
  "aclScope" : "ACCESS",
  "aclList" : [ "ALL" ]
}, {
  "type" : "GROUP",
  "name" : "root",  # Just added
  "aclScope" : "ACCESS",
  "aclList" : [ "ALL" ]
}, {
  "type" : "USER",
  "name" : "user1", # Just added
  "aclScope" : "ACCESS",
  "aclList" : [ "READ", "WRITE" ]
}, {
  "type" : "GROUP",
  "name" : "hadoop",
  "aclScope" : "ACCESS",
  "aclList" : [ "ALL" ]
} ]
{code}

  was:
getacl should be able to return the ACL string (e.g. user:user1:rw,group:hadoop:a) the same way ACL is set for better usability. This is useful when one wants to delete an ACL via CLI, or slightly change the ACL with copy-pasting. Currently, getacl can only return a JSON array:

{code}
$ ozone sh bucket getacl vol1/bucket-src
[ {
  "type" : "USER",
  "name" : "testuser/scm@EXAMPLE.COM",
  "aclScope" : "ACCESS",
  "aclList" : [ "ALL" ]
}, {
  "type" : "GROUP",
  "name" : "hadoop",
  "aclScope" : "ACCESS",
  "aclList" : [ "ALL" ]
} ]
{code}


> Ozone Shell getacl capable of printing ACL string the way it is fed to setacl
> -----------------------------------------------------------------------------
>
>                 Key: HDDS-5306
>                 URL: https://issues.apache.org/jira/browse/HDDS-5306
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone CLI
>            Reporter: Siyao Meng
>            Priority: Major
>
> getacl should be able to return the ACL string (e.g. user:user1:rw,group:hadoop:a) the same way ACL is set for better usability. This is useful when one wants to delete an ACL via CLI, or slightly change the ACL with copy-pasting. Currently, getacl can only return a JSON array:
> {code}
> $ ozone sh bucket addacl vol1/bucket-src --acls=user:user1:rw,group:hadoop:a
> ACL user:user1:rw[ACCESS] added successfully.
> ACL group:hadoop:a[ACCESS] added successfully.
> $ ozone sh bucket getacl vol1/bucket-src
> [ {
>   "type" : "USER",
>   "name" : "testuser/scm@EXAMPLE.COM",
>   "aclScope" : "ACCESS",
>   "aclList" : [ "ALL" ]
> }, {
>   "type" : "GROUP",
>   "name" : "root",  # Just added
>   "aclScope" : "ACCESS",
>   "aclList" : [ "ALL" ]
> }, {
>   "type" : "USER",
>   "name" : "user1", # Just added
>   "aclScope" : "ACCESS",
>   "aclList" : [ "READ", "WRITE" ]
> }, {
>   "type" : "GROUP",
>   "name" : "hadoop",
>   "aclScope" : "ACCESS",
>   "aclList" : [ "ALL" ]
> } ]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org