-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add optional param for AWS IAM role assumption #143
Conversation
b1beb9b
to
94875f3
Compare
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.
Looking good. Thanks a lot for the contribution.
Is there way to test thing with our setup? We have minio, it'd be good to have tests.
I didn't see any authentication related tests in the code, at least for AWS. What's your take on mocked unit tests, that would be plausible, but now when thinking about it, I can also check the minio support for role assumption as documented here https://github.com/minio/minio/blob/master/docs/sts/assume-role.md |
@hhamalai drone-cache/internal/plugin/plugin_test.go Line 386 in c6fa146
What we can either extend those or even better add a specific case in here https://github.com/meltwater/drone-cache/blob/master/storage/backend/s3/s3_test.go Even a simple one to prevent regressions would suffice. |
86f4bd5
to
431299d
Compare
Hi, I added the test case, unfortunately it required quite a bit of too many changes. I am still not too familiar with minio, so take the following findings with a grain of salt:
|
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.
Wow, what a great PR! Thank you very much for this contribution and level of code quality.
It looks good to me. I have only requested a single change concerning package imports. If you can fix it I'll merge this immediately.
Upgrade minio version and add user & policy initialization Fix permissions Organize imports
431299d
to
0efa95f
Compare
Fixes #142
Proposed Changes
Description
Allows specifying role ARN which, if specified, is assumed with STS. All S3 operations are executed with this role.
Checklist
Unreleased
section of CHANGELOG.