How openstack/barbican works
Barbican is an OpenStack REST service for securely storing, provisioning, and managing secrets and keys. A client request enters the WSGI/API stack, reaches versioned resource controllers, and uses validation and persistence; secret operations can invoke storage and crypto plugins. Orders also run through background task processing, which can record retries. The README documents symmetric, asymmetric, and raw secret lifecycles; the tree additionally shows containers, ACLs, quotas, consumers, and transport keys. Some controller and integration behavior is documented or indexed but not excerpted, so uncertain links are omitted.
Main entry points: server.py Queue RPC · repositories.py Persistence · resources.py Secret operations · app.py API application
Components 18
API and policy
- WSGI entry
barbican/wsgi/api.py - API application
barbican/api/app.py - Version routing
barbican/api/controllers/versions.py - Resource controllers
barbican/api/controllers - Request validation
barbican/common/validators.py - Access policy
barbican/common/policy.py
Secret domain
- Secret operations
barbican/plugin/resources.py - Order processing
barbican/tasks/resources.py - Domain models
barbican/model/models.py - Persistence
barbican/model/repositories.py
Crypto and storage
- Crypto selection
barbican/plugin/crypto/manager.py - Crypto backends
barbican/plugin/crypto - Secret-store plugins
barbican/plugin/interface
Background processing
- Queue RPC
barbican/queue/server.py - Queue client
barbican/queue/client.py - Worker process
barbican/cmd/worker.py - Retry scheduling
barbican/queue/retry_scheduler.py
Other components
- API client
Connections 19
- API client → WSGI entry: sends requests
- WSGI entry → API application: loads application
barbican/wsgi/api.py - API application → Version routing: creates controller
barbican/api/app.py - API application → Persistence: initializes database
barbican/api/app.py - Version routing → Resource controllers: routes resources
barbican/api/controllers/versions.py - Resource controllers → Request validation: validates input
barbican/api/controllers/__init__.py - Resource controllers → Access policy: checks permissions
- Secret operations → Persistence: persists metadata
barbican/plugin/resources.py - Secret operations → Crypto selection: selects crypto
barbican/plugin/resources.py - Secret operations → Secret-store plugins: uses storage backend
barbican/plugin/resources.py - Crypto selection → Crypto backends: loads implementations
barbican/plugin/crypto/manager.py - Order processing → Secret operations: generates secrets
barbican/tasks/resources.py - Order processing → Persistence: loads orders
barbican/tasks/resources.py - Queue RPC → Order processing: dispatches tasks
barbican/queue/server.py - Queue RPC → Persistence: stores retries
barbican/queue/server.py - Worker process → Queue RPC: starts server
barbican/cmd/worker.py - Queue client → Queue RPC: sends RPC
barbican/queue/client.py - Retry scheduling → Queue RPC: schedules retries
- Domain models → Persistence: stored by
barbican/model/models.py