Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riak CS SetBucketPolicy #1346

Open
IvanLuber opened this issue Dec 6, 2017 · 2 comments
Open

Riak CS SetBucketPolicy #1346

IvanLuber opened this issue Dec 6, 2017 · 2 comments

Comments

@IvanLuber
Copy link

IvanLuber commented Dec 6, 2017

Hi,
I've been using golang with minio-go client (https://github.com/minio/minio-go) to Put and Get image objects to RiakCS, and it works splendidly.
But problem arised (I got Accessdenied error) when the object is accessed with url through browser hostname/bucketname/objectkey
*the object is put directly under the bucket

I've raised issue to minio-go (minio/minio-go#894) and it's pointed out to me that Riak CS needs to implement SetBucketPolicy API Handler. It's Probably because Bucket ACL's are deprecated and instead Bucket policies are implemented as in http://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html

I hope you can help me with this problem, Best Regards ~

@kuenishi
Copy link
Contributor

kuenishi commented Dec 6, 2017

As I did that work for sure ( #364 ), I think you may have misconfigured something either on the CS or on client side.

@IvanLuber
Copy link
Author

Hi, @kuenishi , maintainer from minio-go, @poornas , has been actively helping me to solve this issue.
it was pointed out to me that when minio-go client send API request to set a bucket policy :

---------START-HTTP---------
PUT /uploads/?policy= HTTP/1.1
Host: 192.168.34.170:8080
User-Agent: Minio (linux; amd64) minio-go/4.0.4
Content-Length: 417
Authorization: AWS **REDACTED**:**REDACTED**
Content-Md5: d4Sj0xE9GbH0UsQ4mjtPjQ==
Date: Thu, 07 Dec 2017 00:29:34 GMT
Accept-Encoding: gzip

HTTP/1.1 415 Unsupported Media Type
Content-Length: 0
Content-Type: application/json
Date: Thu, 07 Dec 2017 00:26:30 GMT
Server: Riak CS
---------END-HTTP---------
415 Unsupported Media Type

It is not sending content-type as a compliance with s3 spec . maybe Riak is expecting content-type header and throwing an error ?

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

No branches or pull requests

2 participants