Keep your passwords behind the firewall
Project description
TeamVault
TeamVault is an open-source web-based shared password manager for behind-the-firewall installation. It requires Python 3.12+ and PostgreSQL (with the unaccent extension).
Installation
apt-get install libffi-dev libldap2-dev libpq-dev libsasl2-dev python3.X-dev postgresql-contrib
pip install teamvault
teamvault setup
vim /etc/teamvault.conf
# note that the teamvault database user will need SUPERUSER privileges
# during this step in order to activate the unaccent extension
mkdir -p /var/lib/teamvault # or whatever you set as `data_dir` in the config
teamvault upgrade
teamvault plumbing createsuperuser
teamvault run
The data_dir setting in the [teamvault] section of the config file points to a writable directory used for runtime state (currently the huey scheduler's SQLite database). It defaults to /var/lib/teamvault and must exist and be writable by the user running TeamVault.
Update
pip install --upgrade teamvault
teamvault upgrade
Development
Start a PostgreSQL database
Create a database and superuser for TeamVault to use, for example by starting a Docker container:
docker run --rm --detach --publish=5432:5432 --name teamvault-postgres -e POSTGRES_USER=teamvault -e POSTGRES_PASSWORD=teamvault postgres:latest
Run Webpack to serve static files
To compile all JS & SCSS files, you'll need to install all required packages via bun (or yarn/npm) with node >= v18.
Use bun/yarn/npm run serve to start a dev server.
Note: Some MacOS users have reported errors when running the dev server via bun. In this case feel free to switch to NPM.
Configure your Virtualenv via uv
uv sync
Setup TeamVault
export TEAMVAULT_CONFIG_FILE=teamvault.cfg
teamvault setup
vim teamvault.cfg # base_url = http://localhost:8000
# session_cookie_secure = False
# database config as needed
# data_dir = /tmp (or any writable path; default /var/lib/teamvault won't exist locally)
teamvault upgrade
teamvault plumbing createsuperuser
Start the development server
teamvault run
Now open http://localhost:8000
Scheduled background jobs
We use huey to run background jobs. This requires you to run a second process, in parallel to TeamVault itself. You can launch it via manage.py:
teamvault run_huey
Fernet key rotation
TeamVault encrypts all secrets with a Fernet key defined in your config file. To rotate this key:
-
Generate a new key:
teamvault plumbing generate_fernet_key -
Save your current
fernet_keyfrom the config file (you'll need it in step 4). -
Replace
fernet_keyin your config file with the new key. -
Re-encrypt all secrets with the new key:
teamvault plumbing rotate_fernet_key <old_key>This re-encrypts all stored revisions in a single transaction. If anything fails, all changes are rolled back and your data remains encrypted with the old key.
-
Verify TeamVault starts without errors.
Important: The application must be stopped during key rotation to prevent read/write conflicts while secrets are being re-encrypted.
Release process
Run the github action to cut a release with a specific version number.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teamvault-0.13.0.tar.gz.
File metadata
- Download URL: teamvault-0.13.0.tar.gz
- Upload date:
- Size: 8.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31af78fbfd54aae918496b822ac2fb78c5428f2a3841002ec4429a4c95104795
|
|
| MD5 |
e665046bb2ee0e02bfd710220ed193e9
|
|
| BLAKE2b-256 |
d6858856976b0a9fcdf3b07e8d5469978916d04b68769f8c6b8e275802b97221
|
File details
Details for the file teamvault-0.13.0-py3-none-any.whl.
File metadata
- Download URL: teamvault-0.13.0-py3-none-any.whl
- Upload date:
- Size: 8.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1dfe4bf66d3a39f185ad91bf70e4c77184b24ddf995778b8e474f98822340d0
|
|
| MD5 |
4d05efe6c4003fe93b805c7d31ffcfdd
|
|
| BLAKE2b-256 |
9c4fb33d5012f256335f7a82b1e548509f46db12421c862f74907be5c0c0465c
|