Metadata-Version: 2.4
Name: shashvault
Version: 0.1.4
Summary: search Hashicorp vault path and secret
Home-page: https://gitlab.esss.lu.se/ics-infrastructure/shashvault
Author: Remy Mudingay
Author-email: remy.mudingay@ess.eu
License: BSD
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp~=3.8.4
Requires-Dist: requests~=2.28.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# 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
