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

Set owner of buckets created via S3 Gateway to actual user rather than `s3g`; print LinkBucket owner field on the client

    XMLWordPrintableJSON

Details

    Description

      Currently if a bucket is created using S3 API via S3 Gateway, the bucket owner is always set to "s3g" (whoever S3 Gateway authenticated itself as to the Ozone Manager).

      Current behavior when a bucket is created using S3 API via S3 Gateway
      $ ozone sh bucket list /tenant1
      [ {
        "metadata" : { },
        "volumeName" : "s3v",
        "name" : "bucket1",
        "storageType" : "DISK",
        "versioning" : false,
        "usedBytes" : 0,
        "usedNamespace" : 0,
        "creationTime" : "2022-04-07T14:51:49.053Z",
        "modificationTime" : "2022-04-07T14:51:49.053Z",
        "quotaInBytes" : -1,
        "quotaInNamespace" : -1,
        "bucketLayout" : "OBJECT_STORE",
        "owner" : "s3g",  <---
        "link" : false
      } ]
      

      This bucket owner field should be set to the user behind the accessId (short name) as this should be the intended behavior.

      Expected behavior
      $ ozone sh bucket list /tenant1
      [ {
      ...
        "bucketLayout" : "OBJECT_STORE",
        "owner" : "hive",  <---
        "link" : false
      } ]
      

      See the PR description for more details.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: