]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: implement get/put object tags for S3
authorAbhishek Lekshmanan <abhishek@suse.com>
Wed, 21 Jun 2017 12:09:49 +0000 (14:09 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 21 Jun 2017 12:09:49 +0000 (14:09 +0200)
commit5fb068114bb3da2f8fabea89160a8453f861dc96
treec96e644e09d4dfd575d5b1e126d960b26a8fa150
parent170fc31ae1a24cc7791133de5465cee42d1090d0
rgw: implement get/put object tags for S3

- New api for get/put/delete object tags
- PUT Object supports x-amz-tagging
- POST API supports x-amz-tagging

This is similar to AWS S3's get/put object tags, tags are stored as an
xattr under the user.rgw.tags key, and are restricted to max 10 tags per
object and key size of 128 and a val size of 256. The API does not reuse
the existing `x-amz-meta` tags.
For PUT obj to optionally accept `x-amz-tagging` and this will end up
storing the tags under x-amz-tagging xattr, the input is expected to be
in the url encoded kv format, we return InvalidTagError if we cannot
parse the tags

A future TODO: use the same xml parser for put and post apis

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
 Conflicts:
   src/rgw/rgw_rest_s3.cc
   src/rgw/rgw_tag.cc
   mostly trivial conflicts from AWSv4 rework, importantly url_decode's
   signature was changed for the nicer, and moved rgw_tag.cc to the
   newer url_decode format

 Conflicts:
  src/rgw/rgw_common.h
  conflict as another PR that used up the error code before this was
  merged
14 files changed:
src/rgw/CMakeLists.txt
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_tag.cc [new file with mode: 0644]
src/rgw/rgw_tag.h [new file with mode: 0644]
src/rgw/rgw_tag_s3.cc [new file with mode: 0644]
src/rgw/rgw_tag_s3.h [new file with mode: 0644]