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

[FEAT] Automatically revoke token after completion of action #427

Open
backjo opened this issue Feb 23, 2023 · 1 comment · May be fixed by #501
Open

[FEAT] Automatically revoke token after completion of action #427

backjo opened this issue Feb 23, 2023 · 1 comment · May be fixed by #501
Labels
enhancement New feature or request

Comments

@backjo
Copy link

backjo commented Feb 23, 2023

Is your feature request related to a problem? Please describe.
As a user, I'd like to have my vault credentials automatically revoked after completion of my action.

Describe the solution you'd like
I'd like the vault action to automatically revoke tokens after the action is complete, unless I tell it not to. Ideally, this could be accomplished via runs.post https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs

Describe alternatives you've considered
We currently do this ourselves on every action, but less boilerplate would be nice.

-      name: Revoke tokens
        if: always()
        run: |
          curl -XPOST -sv -H "X-Vault-Token: ${{ env.VAULT_TOKEN }}" https://vault.company.com/v1/auth/token/revoke-self 
@backjo backjo added the enhancement New feature or request label Feb 23, 2023
@kevinschoonover kevinschoonover linked a pull request Nov 5, 2023 that will close this issue
2 tasks
@rmb938
Copy link

rmb938 commented Aug 9, 2024

I would also like this functionality. It's easy to forget to add the curl step to revoke the token.

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

Successfully merging a pull request may close this issue.

2 participants