NitriKx / vault-kv-search

Recursively search Hashicorp Vault for a substring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vault-kv-search CircleCI

This tool is compatible with secrets kv v1 and v2.

Example Usage

  • Export or prepend command with VAULT_ADDR and your VAULT_TOKEN

    > export VAULT_ADDR=https://vaultserver:8200
    > export VAULT_TOKEN=$(cat ~/.vault-token)
    
  • Search values for the substring 'example.com':

    > vault-kv-search secret/ example.com

  • Search keys for substring 'example.com':

    > vault-kv-search --search=key secret/ example.com

  • Search keys and values for substring 'example.com':

    > vault-kv-search --search=value --search=key secret/ example.com

  • Search keys and values for substring starting with 'example.com':

    > vault-kv-search --search=value --search=key --regex secret/ '^example.com'

  • Search secret name containing substring 'sshkeys':

    > vault-kv-search --search=path secret/ sshkeys

  • To display the secrets, and not only the vault path, use the --showsecrets parameter.

About

Recursively search Hashicorp Vault for a substring

License:Mozilla Public License 2.0


Languages

Language:Go 63.8%Language:Makefile 25.5%Language:Shell 10.8%