Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.32 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.32 KB

SUPEREXPORT - a permanent vault export

Sick of exporting everytime again and again the secrets from vault? this is (hopefully) your solution

USE at YOUR own RISK ! ! !

Prerequiries

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

Prepare .bashrc / zshrc

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.sh

Run it

normally 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-prefix

to see that it worked, YOU HAVE TO OPEN A NEW TERMINAL (else it's not available)

echo $MY_KEY

the idea came while I was using a script from a colleague at work - but I was sick of adding them manually to the script

Tip: If you run your IDE from your shell, you will have all the exported variables there