71829664b2
get_or_create_project() first calls a get (query of the database). If that fails, then it calls create. The issues is when there are two threads and both fail the original get, then each will call create. One of those creates will fail, resulting in the traceback. One way to protect this critical region is to call create first, then if that fails, call get. In this case, get_or_create_project() is called for every Barbican API operation. The create action (which is slow), happens once per project for the life of the cloud. The get action happens every other time. For performance gains, I left call get first, since that call succeeds almost always. Change-Id: I2f13b495a6b45e226e0742291f76ee88dbcf52df Closes-bug: #1726203 |
||
---|---|---|
api-guide/source | ||
api-ref/source | ||
barbican | ||
bin | ||
devstack | ||
doc/source | ||
etc | ||
functionaltests | ||
releasenotes | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.testr.conf | ||
apiary.apib | ||
babel.cfg | ||
bindep.txt | ||
HACKING.rst | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
Team and repository tags
Barbican
Barbican is a REST API designed for the secure storage, provisioning and management of secrets. It is aimed at being useful for all environments, including large ephemeral Clouds.
Barbican is an OpenStack project developed by the Barbican Project Team with support from Rackspace Hosting, EMC, Ericsson, Johns Hopkins University, HP, Red Hat, Cisco Systems, and many more.
The full documentation can be found on the Barbican Developer Documentation Site.
If you have a technical question, you can ask it at Ask OpenStack with the barbican
tag, or you can
send an email to the OpenStack General mailing list at
openstack@lists.openstack.org
with the prefix [barbican]
in the
subject.
To file a bug, use our bug tracker on Launchpad.
For development questions or discussion, hop on the OpenStack-dev mailing list
at openstack-dev@lists.openstack.org
and let us know what you think, just add
[barbican]
to the subject. You can also join our IRC channel
#openstack-barbican
on Freenode.
Barbican began as part of a set of applications that make up the CloudKeep ecosystem. The other systems are:
- Postern - Go based agent that provides access to secrets from the Barbican API.
- Palisade - AngularJS based web ui for the Barbican API.
- Python-barbicanclient - A convenient Python-based library to interact with the Barbican API.
Getting Started
Please visit our Users, Developers and Operators documentation for details.
Why Should You Use Barbican?
The current state of key management is atrocious. While Windows does have some decent options through the use of the Data Protection API (DPAPI) and Active Directory, Linux lacks a cohesive story around how to manage keys for application use.
Barbican was designed to solve this problem. The system was motivated by internal Rackspace needs, requirements from OpenStack and a realization that the current state of the art could use some help.
Barbican will handle many types of secrets, including:
- Symmetric Keys - Used to perform reversible encryption of data at rest, typically using the AES algorithm set. This type of key is required to enable features like encrypted Swift containers and Cinder volumes, encrypted Cloud Backups, etc.
- Asymmetric Keys - Asymmetric key pairs (sometimes referred to as public / private keys) are used in many scenarios where communication between untrusted parties is desired. The most common case is with SSL/TLS certificates, but also is used in solutions like SSH keys, S/MIME (mail) encryption and digital signatures.
- Raw Secrets - Barbican stores secrets as a base64 encoded block of data (encrypted, naturally). Clients can use the API to store any secrets in any format they desire. The Postern agent is capable of presenting these secrets in various formats to ease integration.
For the symmetric and asymmetric key types, Barbican supports full life cycle management including provisioning, expiration, reporting, etc. A plugin system allows for multiple certificate authority support (including public and private CAs).
Design Goals
- Provide a central secret-store capable of distributing secret / keying material to all types of deployments including ephemeral Cloud instances.
- Support reasonable compliance regimes through reporting and auditability.
- Application adoption costs should be minimal or non-existent.
- Build a community and ecosystem by being open-source and extensible.
- Improve security through sane defaults and centralized management of policies for all secrets.
- Provide an out of band communication mechanism to notify and protect sensitive assets.