Skip to main content
Version on Pypi Actions status Docs build status (master) Test coverage (master)

Overview

The easy-vault Python package provides commands for encrypting and decrypting vault files that can be in any format. It provides for programmatic access to encrypted vault files from Python programs, so that the file itself can stay encrypted in the file system but can still be used by the program in clear text.

At first use on a particular vault file, the encryption command prompts for a vault password and stores that in the keyring facility of your local system using the keyring package. Subsequent encryption and decryption of the vault file will then use the password from the keyring, avoiding any further password prompts. Programmatic access can also be done with the password from the keyring.

The encryption of the vault files is implemented using the symmetric key functionality of the cryptography package.

One use case for this package is for example the daily work with programs that need the secrets from a vault to access some server or service. For that, the program in question needs to have integrated with this package.

Another use case is testing in CI/CD systems: The encrypted vault file is stored in a repository and the password to access it is put as a secret into the CI/CD system (most CI/CD systems these days support storing secrets in a secure way). The test program uses the vault password from the CI/CD secret to get access to the vault to get to the secrets that are needed to perform the tests. One could have put the vault secrets directly into the CI/CD system, but if the vault file is also used for local work, or if the number of secrets is large or has a complex structure, it is better to have the indirection of the vault file.

The vault files stay encrypted in the file system while they are used, and are only decrypted and re-encrypted in the file system when secrets need to be updated/added/removed.

This package allows putting at rest the habit of having clear text files that contain passwords, API keys and other secrets, and allows transitioning to a secure but still easy to use approach for managing such secrets.

Why a new vault implementation: The ansible-vault command provided the functionality we needed and was originally used (except for the keyring storage which we added). However, Ansible does not support native Windows and that was a requirement. Also, the ansible-vault command requires installing the entire Ansible which is quite large. Searching Pypi for suitable vaults that a) have commands for encrypting and decrypting and b) provide programmatic access to the encrypted file, did not reveal anything suitable.

Documentation and change log

License

The easy-vault package is provided under the Apache Software License 2.0.

Download files

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

Source Distribution

easy-vault-0.5.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

easy_vault-0.5.0-py2.py3-none-any.whl (15.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file easy-vault-0.5.0.tar.gz.

File metadata

  • Download URL: easy-vault-0.5.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

File hashes

Hashes for easy-vault-0.5.0.tar.gz
Algorithm Hash digest
SHA256 dfb019e291b4fbe4b75c88d3ca0a237f106ea85fd82f722f4c9ef222857e3e9e
MD5 777a763fb9a92161bce8534c727789e6
BLAKE2b-256 4dadf08d7d8e3c819f9d1f30ef03fcb10c3857fc1913dfba3a74f0cbc49a7c20

See more details on using hashes here.

File details

Details for the file easy_vault-0.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: easy_vault-0.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

File hashes

Hashes for easy_vault-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6a9204db8753b6c59b9f9b2e487f78f20d2c09765b8d7599ac78dd769bad7a72
MD5 edf296d86a4cb157db8213b069b6b222
BLAKE2b-256 470aaa21e188b8161048aceefcf13bcc116e1e0870768290d00ab63899769a90

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page