Skip to content

Instantly share code, notes, and snippets.

@conor-mullen
conor-mullen / vault-revoke.sh
Last active January 5, 2023 14:17
Revoke all secret IDs for a given Vault Application Role
# THIS SCRIPT WILL REVOKE ALL SECRET IDS FOR A GIVEN ROLE. USE WITH CAUTION
# Log in to vault using a Github personal access token
vault login -method github > /dev/null
# Change VAULT_ROLE_NAME to the Vault Role that you want to revoke secrets for. This is normally your team name followed by a system code
export VAULT_ROLE_NAME=
# If you have already generate a new secret that you don't want to revoke, put the Secret Accessor of the Secret below and it will be skipped. If you want to keep multiple Accessors, this script isn't for you
export SECRET_ACCESSOR_TO_KEEP=
# Notes for aws-client-vpn on linux
### Prerequisites
- go
- net-tools
#### Ubuntu Prerequisites
- libssl-dev
- libpam0g-dev
- liblzo2-dev
### Keybase proof
I hereby claim:
* I am conor-mullen on github.
* I am conormullen (https://keybase.io/conormullen) on keybase.
* I have a public key ASDAYT4Hli6os0P9J7sptDfWuAinOmWpDnU_ImrSsVfIhQo
To claim this, I am signing this object: