Sick of exporting everytime again and again the secrets from vault? this is (hopefully) your solution
For this service you need to have the following tools installed:
vault Info: Vault CLI
secret-tool -> if not installed, try sudo apt install libsecret-tools
before you start:
add this to your .bashrcor zshrc
alias superexport="bash path/to/this/folder/superexport.sh"also add this line to your .bashrc, so the .secretreader.sh is read with every new terminal
source $HOME/.superexport/.secretreader.shnormally you would export your secrets like this:
export MY_KEY=$(vault kv get -field=name-in-vault "companyname/teamname/folder-with-secret")with superxport you do it like this:
superexport MY_KEY name-in-vault companyname/teamname/folder-with-secret a-prefixto see that it worked, YOU HAVE TO OPEN A NEW TERMINAL (else it's not available)
echo $MY_KEYthe idea came while I was using a script from a colleague at work - but I was sick of adding them manually to the script