Skip to content
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

23.01 back-patch of #742 - Use AWS OIDC to get AWS creds #743

Merged
merged 2 commits into from
Mar 13, 2023

Conversation

dagardner-nv
Copy link
Contributor

This PR is using the AWS OIDC to get AWS credentials (doc). Currently we are using permanent tokens that we need to manually rotate every 90 days. This PR is removing this requirement.

The AWS_ROLE_ARN and AWS_REGION are orgs variables defined here: https://github.com/organizations/nv-morpheus/settings/variables/actions.

Authors:

Approvers:

URL: #742

This PR is using the AWS OIDC to get AWS credentials ([doc](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)). Currently we are using permanent tokens that we need to manually rotate every 90 days. This PR is removing this requirement.

The `AWS_ROLE_ARN` and `AWS_REGION` are orgs variables defined here: https://github.com/organizations/nv-morpheus/settings/variables/actions.

Authors:
  - Jordan Jacobelli (https://github.com/jjacobelli)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - David Gardner (https://github.com/dagardner-nv)
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: nv-morpheus#742
@dagardner-nv dagardner-nv requested a review from a team as a code owner March 7, 2023 21:49
@dagardner-nv dagardner-nv added bug Something isn't working non-breaking Non-breaking change 3 - Ready for Review labels Mar 7, 2023
@ajschmidt8 ajschmidt8 added the DO NOT MERGE PR should not be merged; see PR for details label Mar 7, 2023
@ajschmidt8
Copy link
Collaborator

Please don't merge this yet. I will be opening one small additional PR related to these changes that can be included in this backport.

@ajschmidt8
Copy link
Collaborator

My additional changes are in #745.

Once that PR is merged, they can be cherry-picked into this PR.

This PR is a continuation of nv-morpheus#742.

Omitting the other keys in the `permissions` block sets them to `none` ([src](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#overview)).

This is probably not a concern for `nv-morpheus`, but it caused issues for some private RAPIDS repositories so I wanted to update the `nv-morpheus` repos for consistency.

To remedy this, this PR includes the following changes:

- Keeps the `id-token` permission as `write`, but sets the remaining permissions as described in the `restricted` column [here](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
  - Also sets `pull_request` to `read` so that `fetch_base_branch` in `common.sh` can use it
- Moves the `permissions` block to the top of `ci_pipe.yml` to DRY it up
- ~~Removes the `permissions` block from `pull_request.yml` since that workflow only calls `ci_pipe.yml` and therefore is redundant~~ (this is required. otherwise this error occurs https://github.com/nv-morpheus/Morpheus/actions/runs/4359998192)

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)

URL: nv-morpheus#745
@dagardner-nv dagardner-nv added 3 - Ready for Review and removed DO NOT MERGE PR should not be merged; see PR for details labels Mar 8, 2023
@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit a8daea8 into nv-morpheus:branch-23.01 Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants