Integrate Passbolt into Saltstack to manage secrets in the infrastructure of your organization
Project description
About
This Python module allows you to manage secrets for Saltstack via Passbolt. This makes managing secrets easier than manually encrypting them and storing the encrpyted password in the Saltstack repository.
Additionally, it is possible to only have one source of truth for passwords for users and IT infrastructure while being able to manage access for each password. That means that all users can contribute to the Saltack configuration and manage (view/add/change) secrets within their responsibility.
License
Production Setup
-
Go to your Salt master and install the module with
salt-pipsalt-pip install passbolt-salt
This will install this module and its dependencies.
-
Create a Passbolt account for the Salt master.
-
Copy the private and public PGP key files to
/etc/salt. -
Import the new Passbolt private key on the Salt master:
gpg --import /etc/salt/passbolt_private.asc
-
Create a
/etc/salt/passbolt.inifile with the following content:[PASSBOLT] SERVER = https://passbolt.example.com #SERVER_PUBLIC_KEY_FILE = <optional: server_public.asc> USER_FINGERPRINT = [REPLACE WITH GPG KEY FINGERPRINT] USER_PUBLIC_KEY_FILE = /etc/salt/passbolt_public.asc USER_PRIVATE_KEY_FILE = /etc/salt/passbolt_private.asc PASSPHRASE = [REPLACE WITH PASSBOLT USER PASSWORD]
-
Change file permissions:
chown salt /etc/salt/passbolt* chmod 600 /etc/salt/passbolt*
Use Passwords of Passbolt Group in Pillar
Look into the example directory to see how the integration is done.
-
Create Pillar sls files for the different Salt minions, insert the content below and replace the group UUID.
#!py def run(): from salt_passbolt import fetch_passbolt_passwords return fetch_passbolt_passwords("27b9abd4-af9b-4c9e-9af1-cf8cb963680c")
Hint: you can find the group UUID in the URL of the Passbolt admin interface when editing a group.
-
In a state, reference secrets with their UUID. See the
example/salt/important_secrets/files/secret.conf.password={{ pillar['passbolt']['3ec2a739-8e51-4c67-89fb-4bbfe9147e17'] }}Hint: you can find the secret UUID in the URL of your browser by clicking on the checkbox of a secret.
Performance
All passwords are decrypted with a single process (gpg-agent). If many minions need to access their Pillar at the same time, the gpg-agent becomes a bottleneck. To avoid this bottleneck, the Pillar cache can be enabled for the Salt master with pillar_cache: True. The following crontab entry updates the Pillar cache twice a day:
0 */12 * * * rm -rf /var/cache/salt/master/pillar_cache/* && salt '*' -b1 pillar.items
YAML Replacement Structure
If the Passbolt server is not available, for example during local development, a file with the following format can replace the Python code mentioned in step 8:
passbolt:
3ec2a739-8e51-4c67-89fb-4bbfe9147e17: MY_SECRET
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 passbolt_salt-1.1.0.tar.gz.
File metadata
- Download URL: passbolt_salt-1.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a82a334f11b797f1bec33630851be988a8a3577f941c4fae5dced2e5945511
|
|
| MD5 |
e74672de948634f246df65d73f4ad4c3
|
|
| BLAKE2b-256 |
b53a944094d945be372fc5cc363978d97786a99038a991cc3d184f3761061e72
|
Provenance
The following attestation bundles were made for passbolt_salt-1.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on netzbegruenung/passbolt-salt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
passbolt_salt-1.1.0.tar.gz -
Subject digest:
b3a82a334f11b797f1bec33630851be988a8a3577f941c4fae5dced2e5945511 - Sigstore transparency entry: 1369109513
- Sigstore integration time:
-
Permalink:
netzbegruenung/passbolt-salt@9e06fd9c167b96619f445048ec38d0bf7cec5f3b -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/netzbegruenung
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9e06fd9c167b96619f445048ec38d0bf7cec5f3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file passbolt_salt-1.1.0-py3-none-any.whl.
File metadata
- Download URL: passbolt_salt-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d54f5a79c001377ba5b56b8f5e909426b79407bf8b86a76494015a436d4c3446
|
|
| MD5 |
9a0d0d7d8a53aee04965622d88abe909
|
|
| BLAKE2b-256 |
a2fe7bf81ecf8382de9a13300b6024598ec8df9c1183c64bbc736500e1c932f9
|
Provenance
The following attestation bundles were made for passbolt_salt-1.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on netzbegruenung/passbolt-salt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
passbolt_salt-1.1.0-py3-none-any.whl -
Subject digest:
d54f5a79c001377ba5b56b8f5e909426b79407bf8b86a76494015a436d4c3446 - Sigstore transparency entry: 1369109587
- Sigstore integration time:
-
Permalink:
netzbegruenung/passbolt-salt@9e06fd9c167b96619f445048ec38d0bf7cec5f3b -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/netzbegruenung
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9e06fd9c167b96619f445048ec38d0bf7cec5f3b -
Trigger Event:
push
-
Statement type: