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

unset-current-credentials does not fully unset AWS_* env variables #1094

Closed
runlevel5 opened this issue Jun 25, 2024 · 2 comments
Closed

unset-current-credentials does not fully unset AWS_* env variables #1094

runlevel5 opened this issue Jun 25, 2024 · 2 comments
Labels
bug Something isn't working needs-triage This issue still needs to be triaged

Comments

@runlevel5
Copy link

runlevel5 commented Jun 25, 2024

Describe the bug

Well we could clearly see that unset-current-credentials was added which basically just set AWS_* environment variable to empty string. And it is NOT enough to completely purge the AWS session which lead to the error in which the last session is still be used.

Expected Behavior

All AWS_* environment variables get UNSET fully.

Current Behavior

All AWS_* environment variables are NOT unset and basically set to empty string.

Reproduction Steps

      - name: Configure AWS credentials
        id: step1
        uses: aws-actions/configure-aws-credentials
        with:
          aws-region: ap-southeast-2
          role-to-assume: "arn:aws:iam::XXXXXXX:role/roleName1"
      - name: Do something with AWS
         id: step2
         run: echo "Hello world"
      - name: Configure AWS credentials (different role)
        id: step3
        uses: aws-actions/configure-aws-credentials
        with:
          aws-region: ap-southeast-2
          role-to-assume: "arn:aws:iam::XXXXXXX:role/roleName2"     
          unset-current-credentials: true
      - name: Do something with AWS
        id: step4
        run: aws s3 something something

The 4th would still use AWS_ vars of the 1st step unfortunately

Possible Solution

I do not know if there are any way because AFAIK @actions/core does not provide any API to unset variables

Additional Information/Context

No response

@runlevel5 runlevel5 added bug Something isn't working needs-triage This issue still needs to be triaged labels Jun 25, 2024
@runlevel5
Copy link
Author

Sorry, I was wrong. I was using an old version in which unset-current-credentials was not yet introduced. After trying out the latest version, everything works

Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage This issue still needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant