Skip to main content

A program to get all secrets from a vault servers kv_store for printing

Project description

vault_printer pylint 10.00 MIT License PyPI version python version

vault_printer is a little program to extract a whole kv_store of a Vault Server to stdout in markdown. This could be used to print it out and store it in a physical safe somewhere. Or at least that's the purpose for which I wrote it.

Install

Get a stable version from PyPi

pip install vault_printer

or via git

pip install git+https://github.com/DerMolly/vault_printer

Usage

E.g extract kv_store test from vault.example.com and login via ldap:

vault_printer --ldap vault.example.com test >> passwords.md

Help

usage: vault_printer [-h] [--version] [-v] [--no-toc] [--no-content]
                     [--ldap | --token] [--username USERNAME]
                     [--password PASSWORD] [--tokenLogin TOKENLOGIN]
                     [url] kv_store

A program to get all secrets from a vault servers kv_store for printing

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         increase verbosity
  --ldap                login via ldap
  --token               login via token

server parameter:
  url                   the url of the vault server
  kv_store              the kv store to export from

output configuration:
  --no-toc              don't print the toc
  --no-content          don't print the content

login parameter:
  --username USERNAME, -u USERNAME
                        the username with which to login, if omitted you'll be
                        asked
  --password PASSWORD, -p PASSWORD
                        the password to login, if omitted you'll be asked
  --tokenLogin TOKENLOGIN, -t TOKENLOGIN
                        the token to login, if omitted you'll be asked

Login

Currently the only supported login methods are:

  • Token
  • LDAP

Maybe I will add some more in the future. If you need another Login Method feel free to open a issue or even a PR.

Environment Variables

This program also uses these environment variables if set

$VAULT_ADDR : the url of the vault server
$VAULT_TOKEN : the token to authenticate with the --token login method

Project details


Download files

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

Source Distribution

vault_printer-0.3.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

vault_printer-0.3.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file vault_printer-0.3.1.tar.gz.

File metadata

  • Download URL: vault_printer-0.3.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for vault_printer-0.3.1.tar.gz
Algorithm Hash digest
SHA256 36a54e0e4f691922c506061f70d92e503a0ad19266a6c15625cd08229bbdf4b0
MD5 45d0a2097c3b1e313cdc3f4b01c9aa70
BLAKE2b-256 487439980f54ff1f5b8f45f67e95c123920fc06a4906f8e6a8b876dfeac658b5

See more details on using hashes here.

File details

Details for the file vault_printer-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: vault_printer-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for vault_printer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 135ab941b1f989a58bfdbfc03b69f45cebbacf39160544be987fdb290594741d
MD5 ea9c80e3fb0200178e2e6a8597654820
BLAKE2b-256 7991397798a7543d753d9091000158cde4e08c69935503671cdd91d4e5b354f9

See more details on using hashes here.

Supported by

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