Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-5306

Ozone Shell getacl capable of printing ACL string the way it is fed to setacl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Ozone CLI
    • None

    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:

      $ 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" ]
      } ]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            smeng Siyao Meng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: