-
Notifications
You must be signed in to change notification settings - Fork 50
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
aws-sdk-php: fix bucket policy to make comparable. #272
aws-sdk-php: fix bucket policy to make comparable. #272
Conversation
Did you test this with AWS S3 ? |
What do you mean by testing with aws s3? |
@@ -828,7 +828,7 @@ function testBucketPolicy($s3Client, $params) { | |||
$bucket = $params['Bucket']; | |||
|
|||
// Taken from policy set using `mc policy download` | |||
$downloadPolicy = sprintf('{"Version":"2012-10-17","Statement":[{"Action":["s3:GetBucketLocation","s3:ListBucket"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::%s"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::%s/*"],"Sid":""}]}', $bucket, $bucket); | |||
$downloadPolicy = sprintf('{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetObject"],"Resource":["arn:aws:s3:::%s/*"]}]}', $bucket); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK forSid
to be missing valid in a bucket policy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
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. |
Note that output is not pretty JSON string and field values are trimmed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.