Closed balamurugana closed 6 years ago
What do you mean by testing with aws s3?
Run the same test against AWS S3
Without this fix I want see why we need to fix our tests. If AWS S3 works then test is fine.
I am sure AWS S3 won't save the passed policy as is. It would save/send back canonical policy. I will show a proof.
Used https://github.com/balamurugana/minio-java/blob/fix-issue-663/examples/SetBucketPolicy.java to do PUT bucket policy. Note that the policy JSON is pretty JSON string.
Used https://github.com/balamurugana/minio-java/blob/fix-issue-663/examples/GetBucketPolicy.java which returns below
Current policy: {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":"*","Action":["s3:GetBucketLocation","s3:ListBucket"],"Resource":"arn:aws:s3:::bala-test-bucket1"},{"Effect":"Allow","Principal":"*","Action":"s3:GetObject","Resource":"arn:aws:s3:::bala-test-bucket1/myobject*"}]}
Note that output is not pretty JSON string and field values are trimmed.
Did you test this with AWS S3 ?