Skip to content

optionally revoke token at the end of workflow run - #501

Open
kevinschoonover wants to merge 8 commits into
hashicorp:mainfrom
kevinschoonover:kschoon/token-revoke
Open

optionally revoke token at the end of workflow run#501
kevinschoonover wants to merge 8 commits into
hashicorp:mainfrom
kevinschoonover:kschoon/token-revoke

Conversation

@kevinschoonover

@kevinschoonover kevinschoonover commented Nov 5, 2023

Copy link
Copy Markdown
Contributor

Description

adds the 'revokeToken' input to tell the action to automatically revoke the generated token after the run is complete.

closes #427

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Did not commit changes to dist/index.js (This is only done for releases by vault-action maintainers)

Community Note

  • Please vote on this pull request by adding a 👍
    reaction
    to the original pull request comment to help the community and maintainers
    prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request
    followers and do not help prioritize the request

@kevinschoonover
kevinschoonover marked this pull request as ready for review November 5, 2023 21:19
taylor1791 added a commit to taylor1791/vault-action that referenced this pull request Feb 3, 2024
Comment thread src/action.js
Comment on lines +269 to +273
if (err instanceof got.HTTPError) {
throw Error(`failed to revoke vault token. code: ${err.code}, message: ${err.message}, vaultResponse: ${JSON.stringify(err.response.body)}`)
} else {
throw err
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to know whether fail on revoke can also be switched off with some flag, something like ignoreFailureRevokeToken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Automatically revoke token after completion of action

3 participants