castellan
Generic Key Manager interface for OpenStack
What it is and what it does
Castellan is a generic key manager abstraction layer for OpenStack that provides a consistent Python interface to cryptographic key storage and retrieval. Rather than coupling OpenStack services directly to a specific key manager implementation, Castellan acts as a plugin-based gateway, allowing different backends to be swapped without changing application code.
The package depends on cryptography, python-barbicanclient, and several oslo libraries for configuration, logging, and context management. It uses stevedore for plugin discovery and keystoneauth1 for OpenStack authentication. This makes it suitable for OpenStack operators and developers building services that need to manage secrets securely without hard-coding a particular key manager choice.
Use it for:
- Abstract key manager interactions in OpenStack services so they can work with multiple backends
- Store and retrieve encryption keys for data protection in OpenStack deployments
- Integrate with key management systems through a unified API
- Build OpenStack applications that need cryptographic key management without backend lock-in
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Castellan provides a unified interface for interacting with key management services in OpenStack environments, abstracting away the complexity of different key manager backends.
Yes, if you are building or operating OpenStack services that need key management. The package is actively maintained, has no known vulnerabilities, and provides genuine value by decoupling your code from a specific key manager. If you are not working within an OpenStack environment or do not need key manager abstraction, it is not relevant.
Install
castellan on PyPI
pip
pip install castellanuv
uv add castellanpoetry
poetry add castellanInstalling castellan
Before you install
Low install friction with a pure-Python wheel and active maintenance. The dependency chain includes 11 runtime packages, mostly from the oslo and OpenStack ecosystems; all are standard library-style components with established track records.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; suitable for proprietary OpenStack deployments.
Quickstart
pip install castellan
from castellan import key_manager
manager = key_manager.KeyManager()
key = manager.create_key()
Requires Python 3.11 or later; intended for use within OpenStack environments where a key manager backend is configured and accessible.
Verify before relying
- Whether the package works standalone or requires a running OpenStack/Barbican deployment
- Configuration details and environment variables needed to initialize the key manager
- Supported key manager backends beyond python-barbicanclient
- Specific key creation and retrieval method signatures and parameters
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — pbr, cryptography, python-barbicanclient, oslo.config, oslo.context, oslo.i18n, oslo.log, oslo.utils, stevedore, keystoneauth1, requests |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 132,956/month — #11,533 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: castellan-5.8.0-py3-none-any.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
keystoneOpenStack Keystone provides authentication,…
permissive · top 15,000 on PyPI
keystoneauth1Provides authentication plugins, API discovery,…
permissive · top 5,000 on PyPI
cursiveCursive validates digital signatures using…
permissive · top 15,000 on PyPI
python-barbicanclientPython client library and command-line tool for…
permissive · top 15,000 on PyPI
os-kenos-ken is a component-based software defined…
permissive · top 15,000 on PyPI
python-swiftclientPython client library for OpenStack Object…
permissive · top 15,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
keystonemiddlewareProvides authentication and authorization…
permissive · top 15,000 on PyPI
python-openstackclientA unified command-line client for OpenStack…
permissive · top 5,000 on PyPI
obspecDefines a Python protocol for abstracting…
permissive · top 15,000 on PyPI