Skip to main content

search Hashicorp vault path and secret

Project description

Vault search

This script provides the functionality to search secret paths that match a string (case insensitive) and also display k/v when specifying a path.

Dependancies

Requirements

pip install requests aiohttp

Conda environment

If you use conda or mamba, an example environment file is provided:

conda env create -f environment.yml
conda activate shashvault

Learn more about conda: https://docs.conda.io/projects/conda/en/latest/ Learn more about mamba: https://mamba.readthedocs.io/en/latest/

Install

pip install shashvault

Upgrade

pip install shashvault --upgrade

Environmental variables

  • VAULT_ADDR
  • VAULT_TOKEN
  • VAULT_KV_PATH
  • VAULT_SKIP_VERIFY

For example:

cat ~/.vaultenv
export VAULT_ADDR=https://hashicorp-vault.local.com:8200
export VAULT_SKIP_VERIFY=1
export VAULT_TOKEN=eqw.f8-example-token-2hinwin
export VAULT_KV_PATH=secret

Usage

usage: shashvault [-h] [-sp SEARCH_PATH] [-ss SECRET_PATH]

Search and display secrets in HashiCorp Vault

optional arguments:
  -h, --help            show this help message and exit
  -sp SEARCH_PATH, --search-path SEARCH_PATH
                        Text to search paths (case insensitive)
  -ss SECRET_PATH, --search-secret SECRET_PATH
                        Path to a specific secret (relative to VAULT_KV_PATH)

Examples:

shashvault --search-path app/config
shashvault --search-secret app/config/database

Required environment variables (example):

export VAULT_ADDR=https://hashicorp-vault.local.com:8200
export VAULT_TOKEN=eqw.f8-example-token-2hinwin
export VAULT_KV_PATH=secret

License

BSD 2-Clause License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shashvault-0.1.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file shashvault-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: shashvault-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for shashvault-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0e22eb71e75a7a7e14dd139f4962d54a64643bd78750e2a159ea3327d48c01
MD5 b75ba75c0703332eb4d89d1770528b6d
BLAKE2b-256 94103b1254fa1dab19110b31dd177b6ffeb845016199187727fa9fc341e56e78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page