semvec/pypi-packages huggingface dataset:
shashvault 0.1.4
search Hashicorp vault path and secret
License: BSD

# 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