blob: dd2b3d1d6153991714b873543e353bbe45780248 [file] [log] [blame]
Petr Jedinýdd6387a2017-08-01 15:50:17 +02001
Petr Jediný1ff6f562017-08-09 14:38:09 +02002================
3Barbican formula
4================
Petr Jedinýdd6387a2017-08-01 15:50:17 +02005
6Barbican is a REST API designed for the secure storage, provisioning and
7management of secrets such as passwords, encryption keys and X.509 Certificates.
8It is aimed at being useful for all environments, including large ephemeral
9Clouds.
10
11Sample pillars
12==============
13
Petr Jediný1ff6f562017-08-09 14:38:09 +020014Barbican cluster service
Petr Jedinýdd6387a2017-08-01 15:50:17 +020015
16.. code-block:: yaml
17
18 barbican:
19 server:
20 enabled: true
21 version: ocata
Petr Jediný1ff6f562017-08-09 14:38:09 +020022 host_href: ''
23 is_proxied: true
24 plugin:
25 simple_crypto:
26 kek: "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY="
27 store:
28 software:
29 crypto_plugin: simple_crypto
30 store_plugin: store_crypto
31 global_default: True
32 database:
33 engine: "mysql+pymysql"
34 host: 10.0.106.20
35 port: 3306
36 name: barbican
37 user: barbican
38 password: password
39 bind:
40 address: 10.0.106.20
41 port: 9311
42 admin_port: 9312
43 identity:
44 engine: keystone
45 host: 10.0.106.20
46 port: 35357
47 domain: default
48 tenant: service
49 user: barbican
50 password: password
51 message_queue:
52 engine: rabbitmq
53 user: openstack
54 password: password
55 virtual_host: '/openstack'
56 members:
57 - host: 10.10.10.10
58 port: 5672
59 - host: 10.10.10.11
60 port: 5672
61 - host: 10.10.10.12
62 port: 5672
63 cache:
64 members:
65 - host: 10.10.10.10
66 port: 11211
67 - host: 10.10.10.11
68 port: 11211
69 - host: 10.10.10.12
70 port: 11211
71
72Running behind loadbalancer
73
74If you are running behind loadbalancer, set the `host_href` to load balancer's
75address. You can set `host_href` empty and the api attempts autodetect correct
76address from http requests.
77
78.. code-block:: yaml
79
80 barbican:
81 server:
82 enabled: true
83 version: ocata
84 host_href: ''
85
86
87Running behind proxy
88
89If you are running behind proxy, set the `is_proxied` parameter to `true`. This
90will allow `host_href` autodetection with help of proxy headers such as
91`X-FORWARDED-FOR` and `X-FORWARDED-PROTO`.
92
93.. code-block:: yaml
94
95 barbican:
96 server:
97 enabled: true
98 version: ocata
99 host_href: ''
100 is_proxied: true
101
102Queuing asynchronous messaging
103
104By default is `async_queues_enable` set `false` to invoke worker tasks
105synchronously (i.e. no-queue standalone mode). To enable queuing asynchronous
106messaging you need to set it true.
107
108.. code-block:: yaml
109
110 barbican:
111 server:
112 enabled: true
113 version: ocata
114 async_queues_enable: true
115
116Keystone notification listener
117
118To enable keystone notification listener, set the `ks_notification_enable`
119to true.
120`ks_notifications_allow_requeue` enables requeue feature in case of
121notification processing error. Enable this only when underlying transport
122supports this feature.
123
124
125.. code-block:: yaml
126
127 barbican:
128 server:
129 enabled: true
130 version: ocata
131 ks_notifications_enable: true
132 ks_notifications_allow_requeue: true
133
134
Petr Jediný6e745fb2017-09-05 10:20:05 +0200135MySQL server has gone away
136
137MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
138idle connections. This can result in 'MySQL Gone Away' exceptions. If you
139notice this, you can lower `sql_idle_timeout` to ensure that SQLAlchemy
Petr Jediný09886ec2017-09-06 22:20:38 +0200140reconnects before MySQL can drop the connection. If you run MySQL with HAProxy
141you need to consider haproxy client/server timeout parameters.
Petr Jediný6e745fb2017-09-05 10:20:05 +0200142
143.. code-block:: yaml
144
145 barbican:
146 server:
147 enabled: true
148 version: ocata
149 database:
150 engine: "mysql+pymysql"
151 host: 10.0.106.20
152 port: 3306
153 name: barbican
154 user: barbican
155 password: password
Petr Jediný09886ec2017-09-06 22:20:38 +0200156 sql_idle_timeout: 180
Petr Jediný6e745fb2017-09-05 10:20:05 +0200157
158
Kirill Bespalov95aa8022017-10-31 16:35:06 +0300159Configuring TLS communications
160------------------------------
161
Kirill Bespalov8d133302017-11-01 12:14:28 +0300162In order to trust remote server's certificate during establishing tls
163connection the CA cert must be provided at client side. By default
164system wide installed CA certs are used. You can change this behavior
165by specifying cacert_file and cacert params (optional).
166See examples below:
167
168
169- **RabbitMQ**
Kirill Bespalov95aa8022017-10-31 16:35:06 +0300170
171.. code-block:: yaml
172
173 barbican:
174 server:
175 message_queue:
176 port: 5671
177 ssl:
178 enabled: True
179 cacert: cert body if the cacert_file does not exists
180 cacert_file: /etc/openstack/rabbitmq-ca.pem
181
182
Kirill Bespalov8d133302017-11-01 12:14:28 +0300183- **MySQL**
184
185.. code-block:: yaml
186
187 barbican:
188 server:
189 database:
190 ssl:
191 enabled: True
192 cacert: cert body if the cacert_file does not exists
193 cacert_file: /etc/openstack/mysql-ca.pem
194
Kirill Bespalov95aa8022017-10-31 16:35:06 +0300195
Petr Jediný1ff6f562017-08-09 14:38:09 +0200196Configuring plugins
197-------------------
198
199Dogtag KRA
200
201.. code block:: yaml
202
203 barbican:
204 server:
205 plugin:
206 dogtag:
207 pem_path: '/etc/barbican/kra_admin_cert.pem'
208 dogtag_host: localhost
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200209 dogtag_port: 8443
Petr Jediný1ff6f562017-08-09 14:38:09 +0200210 nss_db_path: '/etc/barbican/alias'
211 nss_db_path_ca: '/etc/barbican/alias-ca'
212 nss_password: 'password123'
213 simple_cmc_profile: 'caOtherCert'
214 ca_expiration_time: 1
215 plugin_working_dir: '/etc/barbican/dogtag'
216
217KMIP HSM
218
219.. code block:: yaml
220
221 barbican:
222 server:
223 plugin:
224 kmip:
225 username: 'admin'
226 password: 'password'
227 host: localhost
228 port: 5696
229 keyfile: '/path/to/certs/cert.key'
230 certfile: '/path/to/certs/cert.crt'
231 ca_certs: '/path/to/certs/LocalCA.crt'
232
233
234PKCS11 HSM
235
236.. code block:: yaml
237
238 barbican:
239 server:
240 plugin:
241 p11_crypto:
242 library_path: '/usr/lib/libCryptoki2_64.so'
243 login: 'mypassword'
244 mkek_label: 'an_mkek'
245 mkek_length: 32
246 hmac_label: 'my_hmac_label'
247
248
249
250Software Only Crypto
251
252`kek` is key encryption key created from 32 bytes encoded as Base64. You should
253not use this in production.
254
255.. code block:: yaml
256
257 barbican:
258 server:
259 plugin:
260 simple_crypto:
261 kek: 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY='
262
263
264Secret stores
265-------------
266
267.. code-block:: yaml
268
269 barbican:
270 server:
271 plugin:
272 simple_crypto:
273 kek: "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY="
274 p11_crypto:
275 library_path: '/usr/lib/libCryptoki2_64.so'
276 login: 'mypassword'
277 mkek_label: 'an_mkek'
278 mkek_length: 32
279 hmac_label: 'my_hmac_label'
280 kmip:
281 username: 'admin'
282 password: 'password'
283 host: localhost
284 port: 5696
285 keyfile: '/path/to/certs/cert.key'
286 certfile: '/path/to/certs/cert.crt'
287 ca_certs: '/path/to/certs/LocalCA.crt'
288 dogtag:
289 pem_path: '/etc/barbican/kra_admin_cert.pem'
290 dogtag_host: localhost
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200291 dogtag_port: 8443
Petr Jediný1ff6f562017-08-09 14:38:09 +0200292 nss_db_path: '/etc/barbican/alias'
293 nss_db_path_ca: '/etc/barbican/alias-ca'
294 nss_password: 'password123'
295 simple_cmc_profile: 'caOtherCert'
296 ca_expiration_time: 1
297 plugin_working_dir: '/etc/barbican/dogtag'
298 store:
299 software:
300 crypto_plugin: simple_crypto
301 store_plugin: store_crypto
302 global_default: True
303 kmip:
304 store_plugin: kmip_plugin
305 dogtag:
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200306 store_plugin: dogtag_crypto
Petr Jediný1ff6f562017-08-09 14:38:09 +0200307 pkcs11:
308 store_plugin: store_crypto
309 crypto_plugin: p11_crypto
310
Petr Jedinýdd6387a2017-08-01 15:50:17 +0200311
312Documentation and Bugs
313======================
314
315To learn how to install and update salt-formulas, consult the documentation
316available online at:
317
318 http://salt-formulas.readthedocs.io/
319
320In the unfortunate event that bugs are discovered, they should be reported to
321the appropriate issue tracker. Use GitHub issue tracker for specific salt
322formula:
323
324 https://github.com/salt-formulas/salt-formula-barbican/issues
325
326For feature requests, bug reports or blueprints affecting entire ecosystem,
327use Launchpad salt-formulas project:
328
329 https://launchpad.net/salt-formulas
330
331Developers wishing to work on the salt-formulas projects should always base
332their work on master branch and submit pull request against specific formula.
333
334You should also subscribe to mailing list (salt-formulas@freelists.org):
335
336 https://www.freelists.org/list/salt-formulas
337
338Any questions or feedback is always welcome so feel free to join our IRC
339channel:
340
341 #salt-formulas @ irc.freenode.net
342
343Read more
344=========
345
346* https://docs.openstack.org/barbican/latest/