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
Fix: Policy action name for Get/Put BucketLifeCycle #9893
Conversation
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
Mint Automation
9893-e44167d/mint-large-bucket.sh.log:
9893-e44167d/mint-dist-xl.sh.log:
9893-e44167d/mint-xl.sh.log:
Deleting image on docker hub |
@kannappanr both are valid in AWS S3 |
AFAIK @vadmeste we need to support both because we have users with s3:PutBucketLifecycle value already in their policies. |
oups yes.. I think I can add a custom parser to replace s3:PutBucketLifecycle with s3:PutLifecycleConfiguration when loading the policy document. This seems a stable way to fix this with old deployments. |
@vadmeste let me know if you want me to close this PR, if you will take care of both the issues? |
@kannappanr, well, it seems that Get/PutBucketLifecycle permissions were never working for users. Meaning that if a user has a policy with an allowed GetBucketLifecycle or PutBucketLifecycle, he will still not able to set a new lifecycle document to a given bucket. I don't think we need to do anything other than keeping the old wrong permissions and add new ones. |
@vadmeste why is that? |
I can confirm that. When I read that you want to include a mapping and both are supported, I wanted to try it out. But S3: GetBucketLifeCycle and S3: PutBucketLifeCycle didn't work either. I'm waiting for the patch. Thank you ;) |
BugFix didn't work for me. mc version RELEASE.2020-06-26T19-56-55Z Message: Unable to parse the input policy: unsupported action 's3:GetLifecycleConfiguration'. Maybe something needs to be adjusted in the client? |
Its a client issue @LarsBrenker |
Description
S3:GetBucketLifeCycle should be changed to S3:GetLifeCycleConfiguration
S3:PutBucketLifeCycle should be changed to S3:PutLifeCycleConfiguration
Motivation and Context
minio/mc#3265
How to test this PR?
The above code can be used to reproduce the error
Types of changes
Checklist:
commit-id
orPR #
here)