-
Notifications
You must be signed in to change notification settings - Fork 685
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
Use configure-aws-credentials
workflow instead of passing secret_access_key
#1363
base: unstable
Are you sure you want to change the base?
Conversation
Signed-off-by: vudiep411 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1363 +/- ##
============================================
+ Coverage 70.62% 70.84% +0.22%
============================================
Files 117 118 +1
Lines 63315 63561 +246
============================================
+ Hits 44714 45030 +316
+ Misses 18601 18531 -70 |
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.
seems ok, @roshkhatri please take a look
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, just had a few questions.
We will also need to do the prerequisites steps for the main repo before we merge this. |
@vudiep411, will it be possible to add a test, where we uploads a test build binary to a test s3 bucket when ever changes are made to these workflows. With this we can be sure that when we release stuff, it doesn't break on the main valkey repository |
Yes it is possible, we can use github environment for that. So we can write something like this:
We use env to dynamically assigned the role to assume and env. But this would required us to set up multiple OCID on different accounts not just in the workflow itself so it should be in a separate issue. For now we can just set this one up and after this looks good, I will open another issue for it if that's ok. |
I think we can also do it based on the github event trigger maybe?
Also, I think we should add the test on the same PR so we can run the test on this PR and know that the tests also work. We would also have to do the pre-requisites only once for both the scenarios. |
That's a really good suggestion. We can look into that. That way it would automated the testing of a PR with a test bucket. Definitely doable |
5c9474a
to
cd1fe2d
Compare
Signed-off-by: vudiep411 <[email protected]>
Signed-off-by: vudiep411 <[email protected]>
Signed-off-by: vudiep411 <[email protected]>
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
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! once this PR is approve, we can make the necessary changes to the prerequisite AWS configs and merge this one in.
Can you also update the top comment to mention all the changes we made here later
such as, adding tests, etc.
Summary
This PR fixes #1346 where we can get rid of the long term credentials by using OpenID Connect. OpenID Connect (OIDC) allows your GitHub Actions workflows to access resources in Amazon Web Services (AWS), without needing to store the AWS credentials as long-lived GitHub secrets.
Changes
We can remove these secrets that were passed in previously:
Instead we only need the
role-to-assume
arn. For more information OIDC.Prerequisites
Before merging this PR, we need to make sure to set up the proper Identity providers on the production AWS account. Follow this guides.
Quick guide:
Provider url:
https://token.actions.githubusercontent.com
Audience:
sts.amazonaws.com
Results
Github action run:
Files in S3 Dev env: