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

Transform GitHub Actions Workflows to Use OIDC Instead of Long-lived Credentials #2032

Open
4 tasks
varunsh-coder opened this issue Mar 24, 2023 · 1 comment
Open
4 tasks
Labels
enhancement New feature or request

Comments

@varunsh-coder
Copy link
Member

Scenarios:

  • AWS
  • GCP
  • Azure
  • Package registries, e.g. PyPI

We should also suggest policy changes in the PR description, e.g. changes needed in the AWS account to trust the GitHub Actions token.

@varunsh-coder
Copy link
Member Author

varunsh-coder commented Jun 19, 2023

for AWS credentials action, we can change the with parameters to remove secret access key and add role to assume.

for permissions, we can have two cases:

  1. job permission is already set
    if already set, then we just add id-token: write to it if it does not exist
  2. job permissions is not already set
    we can use existing logic to add permissions

@Devils-Knight please take this up. We can have these test cases:

  1. All permissions already defined. case 1: top level permission is defined and job level is not defined. case 2: job level is already defined.
  2. Top level permission is not defined and job level is also not defined.

First try to fix job level permission using our existing logic. If we can add permissions, then fix is done.
If we cannot fix job level permissions, look at top level permission. If top level is contents: read, then make job level as contents: read and id-token: write

If job level permission was already defined, then just add id-token: write if it was not already there.

You can do AWS first and then GCP.

@varunsh-coder varunsh-coder unpinned this issue Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant