The pam Secret Server SDK
The pam Secret Server Python SDK contains classes that interact with Secret Server via the REST API.
Install
python -m pip install revbits_ansible
Secret Server
With API key you can authorize the SecretServer class to fetch secrets.
Initializing SecretServer
To instantiate the SecretServer class, it requires a base_url, api_key and an optional api_path_uri (defaults to "/api/v1")
from pam.revbits_ansible.server import ServerSecret
secret_server = SecretServer("https://pam.revbits.com", api_key)
Secrets can be fetched using the get_pam_secret method, which takes a string key of the secret and, returns a decoded value :
secret = secret_server.get_pam_secret('DB_HOST')
print(f"secret: {secret}")
from pam.revbits_ansible.server import ServerSecret
secret = ServerSecret(**secret_server.get_pam_secret('DB_HOST'))
DB_HOST = secret
Create a Build Environment (optional)
The SDK requires Python 3.6 or higher.
First, ensure Python is in $PATH, then run:
# Clone the repo
git clone https://github.com/RevBits/PAM-ansible-plugin
cd PAM-ansible-plugin
# Create a virtual environment
python -m venv venv
. venv/bin/activate
# Install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt
To build the package, use Flit:
flit build
Metadata
Release files for revbits_ansible 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| revbits_ansible-1.3.1.tar.gz | 8.2 kB | Without provenance | Details for revbits_ansible-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| revbits_ansible-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for revbits_ansible-1.3.1-py3-none-any.whl |
Total release size: 16.2 kB
Release files / revbits_ansible-1.3.1.tar.gz
| Download URL | revbits_ansible-1.3.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa2e9920944c33c152cc0450bddef2f2a9abb8191e2a623a1f76b74e8b87b110
|
|
BLAKE2b-256 checksum How to use checksums |
f35d260c2a367cafca62a465b1e16decd0f7e54c03610222fbf719cba5546f24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / revbits_ansible-1.3.1-py3-none-any.whl
| Download URL | revbits_ansible-1.3.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4622b68cbb559bcc820474ec13417c60e26827f4dc1ecb76417b9ed1b8dc257
|
|
BLAKE2b-256 checksum How to use checksums |
a1e89e0345cfae881b7d2ab13d60a539fd9664d16d6f8c220eb7786eafa5600f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for revbits_ansible 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.