🔐 Lightweight API to store/retrieve secrets to/from an encrypted Database
2.4K
Lightweight API to store/retrieve secrets to/from an encrypted Database
VaultAPI is designed to be extremely lightweight, secure, and easy to use. It provides cutting-edge security features like AES-GCM, Fernet encryption, and rate limiting all out of the box. It also includes transit encryption to ensure that the secrets are encrypted during transit to protect against man-in-the-middle attacks.
Platform Supported
Deployments
Recommendations
python 3.10 or 3.11Install VaultAPI
python -m pip install vaultapi
Initiate - IDE
import vaultapi
if __name__ == '__main__':
vaultapi.start()
Initiate - CLI
vaultapi start
Use
vaultapi --helpfor usage instructions.
By default,
VaultAPIwill look for a.envfile in the current working directory.
Mandatory
Optional (with defaults)
326030secrets.db0.0.0.0 [OR] localhost90101max_requests and seconds to apply as rate limit.
Defaults to 5req/2s [AND] 10req/30sOptional (without defaults)
Optional (UI integration)
falseauth.dbGoogle Authenticator or Authy.900 (15 minutes)SECRET valueThis value will be used to encrypt/decrypt the secrets stored in the database.
CLI
vaultapi keygen
IDE
from cryptography.fernet import Fernet
print(Fernet.generate_key())
| Endpoint | Description | API method | Authorization Header |
|---|---|---|---|
/health | API health endpoint | GET | N/A |
/get-secret | Retrieve secrets (comma separated list) | GET | HMAC-SHA512(apikey+timestamp) |
/get-table | Get ALL the secrets stored in a table | GET | HMAC-SHA512(apikey+timestamp) |
/list-tables | List all available tables | GET | HMAC-SHA512(apikey+timestamp) |
/create-table | Create a new table | POST | HMAC-SHA512(apikey+timestamp) |
/put-secret | Store or update a secret (key-value pairs) | PUT | HMAC-SHA512(apikey+secret+timestamp) |
/delete-secret | Delete a specific secret | DELETE | HMAC-SHA512(apikey+secret+timestamp) |
/delete-table | Deletes an existing table | DELETE | HMAC-SHA512(apikey+secret+timestamp) |
/rename-table | Renames an existing table | PATCH | HMAC-SHA512(apikey+secret+timestamp) |
Clients are available in multiple languages to interact with the API server.
Python: VaultAPI-Client-python
Rust: VaultAPI-Client-rust
Checkout decryptors for on-demand scripts to decrypt the secrets retrieved from the API.
Docstring format: Google
Styling conventions: PEP 8 and isort
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
pre-commit will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL
markdown files (including Wiki pages)
Requirement
python -m pip install sphinx==5.1.1 pre-commit recommonmark
Usage
pre-commit run --all-files
https://pypi.org/project/VaultAPI/
https://hub.docker.com/r/thevickypedia/vaultapi
https://thevickypedia.github.io/VaultAPI/
© Vignesh Rao
Licensed under the MIT License
Content type
Image
Digest
sha256:cf299ccd2…
Size
123.7 MB
Last updated
3 months ago
docker pull thevickypedia/vaultapi