Uses the OS X Keychain to save the token created by vault auth.
This replaces the default behavior to save the token to a ~/.vault-token on disk.
The helper will use the $VAULT_ADDR environmental variable as the name of the Keychain item to read/write.
Tested with Ruby 2.3.1p11 and Vault v0.6.2.
-
Save the Ruby script to a path like
~/.vault-helper -
Create/update your
~/.vaultconfig file to include the linetoken_helper = "/Users/me/.vault-helper". Note this requires a fully qualified path to the script created in step 1; relative paths like~/.vault-helperor./vault-helperwill not work with the vault client.