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

Make auth/token/revoke-accessor idempotent #13661

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

remilapeyre
Copy link
Contributor

@remilapeyre remilapeyre commented Jan 13, 2022

The auth/token/revoke will not error out if the token does not exists, it
always tries to revoke the token and return success to the client whether
or not the token exists. This makes the behavior of
auth/token/revoke-accessor coherent with this and remove the need to
check whether the token still exists.

The error had been added by #2391
which added a lot of error reporting across the code so this might just
have been overlooked.

Closes #9636

The auth/token/revoke will not error out if the token does not exists, it
always tries to revoke the token and return success to the client whether
or not the token exists. This makes the behavior of
auth/token/revoke-accessor coherent with this and remove the need to
check whether the token still exists.
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 13, 2022 21:45 Inactive
@heatherezell
Copy link
Contributor

Hi @remilapeyre! Thanks a lot for this contribution - please don't forget to include a changelog entry. :)

@vercel vercel bot temporarily deployed to Preview – vault-storybook January 13, 2022 21:58 Inactive
vault/token_store.go Show resolved Hide resolved
vault/token_store.go Outdated Show resolved Hide resolved
Also removes the dubious warning when listing the tokens.
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 17, 2022 21:32 Inactive
@remilapeyre
Copy link
Contributor Author

Hi @ncabatoff, thanks for the review! Everything should be fine now.

@ncabatoff ncabatoff merged commit b45b9d8 into hashicorp:main Jan 18, 2022
@ncabatoff
Copy link
Collaborator

Thanks @remilapeyre !

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

Successfully merging this pull request may close these issues.

Token revocation via accessor is not idempotent operation
3 participants