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

[BUG] Support AWS credential detection from environment variable for OIDC temporary token #37

Open
toto6038 opened this issue Oct 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@toto6038
Copy link

Version

redhat-actions/push-to-registry@v2
aws-actions/configure-aws-credentials@v4

Describe the bug

Currently the support to login ECR needs access token and secret access token to AWS, and the action cannot detect credentials from environment variables as aws-actions/amazon-ecr-login does. The limitation prevents the usage in runner using GitHub OIDC to authenticate with AWS since it holds a temporary credential, and making authentication with temporary credential must include the session token.

My recommendation is to take an optional input of session token, or detect credentials from environment variables as well.

Steps to reproduce, workflow links, screenshots

jobs:
  Test:
    runs-on: ubuntu-latest
    steps:
      - name: Configure AWS credentials
        id: aws-creds
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
          aws-region: ${{ secrets.AWS_REGION }}
          output-credentials: true
          special-characters-workaround: true

      - uses: redhat-actions/podman-login@v1
        with: 
          registry: ${{ secrets.AWS_ECR_REGISTRY }}
          username: ${{ steps.aws-creds.outputs.aws-access-key-id }}
          password: ${{ steps.aws-creds.outputs.aws-secret-access-key }}
@toto6038 toto6038 added the bug Something isn't working label Oct 19, 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
Projects
None yet
Development

No branches or pull requests

1 participant