Skip to content

add support of x-amz-acl header for v2 acl (ceph server, aws s3 v2)#876

Merged
nitisht merged 2 commits into
minio:masterfrom
slimus:add-support-x-amz-acl-header
Nov 17, 2017
Merged

add support of x-amz-acl header for v2 acl (ceph server, aws s3 v2)#876
nitisht merged 2 commits into
minio:masterfrom
slimus:add-support-x-amz-acl-header

Conversation

@slimus
Copy link
Copy Markdown
Contributor

@slimus slimus commented Nov 16, 2017

We use CEPH server for store object. CEPH has old protocol (v2) and use special header for set ACl for object. Also AWS S3 v2 use this header

  1. http://docs.ceph.com/docs/jewel/radosgw/s3/objectops/#put-object
  2. http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationExamples-6

I added support of this header and add test for this method

Comment thread utils.go Outdated
func isAmzHeader(headerKey string) bool {
key := strings.ToLower(headerKey)

if strings.HasPrefix(key, "x-amz-meta-") || key == "x-amz-acl" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be done in one line here

return strings.HasPrefix(key, "x-amz-meta-") || key == "x-amz-acl" 

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. fixed

@nitisht nitisht merged commit 690f36f into minio:master Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants