Skip to main content

Keyring backend using Kubernetes secrets.

Project description

Kubernetes Secrets Keyring Backend

Keyring backend that uses Kubernetes secrets. It uses kubectl commands to set, read, and delete credentials stored as Kubernetes secrets.

It automatically installs as backend with priority 20 (by default, can be adjusted with the KUBERNETES_KEYRING_PRIORITY environment variable) if installed on a system within a Kubernetes cluster, above any keyring present by default. This means after installing this package, you can use keyring exactly as usual without any need to reference this package. If installed on a system without Kubernetes, it should have no effect, as it checks if KUBERNETES_SERVICE_HOST is set and assigns itself a negative priority otherwise.

The usual keyring commands can be used with this package to set and manage the credentials. Kubernetes secrets are immutable, so you need to delete a secret before you can set a new password if the password changed.

The keyring package can be used as normal within code to get credentials saved as Kubernetes secrets, without any modifications to the code from what is done on regular Windows servers using the credential manager backend.

Install Normally

To install use the command: pip install kubernetes-secrets-keyring

Install for Debugging

The following describes how to install and use within the git repo (for instance, if making changes). Make sure to set the current directory to the root of the repo for the following commands.

To install as Python package use the command: pip install .

To test simply run pytest command.

To build use the command: python -m build

Project details


Download files

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

Source Distribution

kubernetes_secrets_keyring-0.2.5.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page