blob: cd6b88aad2267b4273dbbdc99ee836af46c2e6b3 [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
162**RabbitMQ**
163
164.. code-block:: yaml
165
166 barbican:
167 server:
168 message_queue:
169 port: 5671
170 ssl:
171 enabled: True
172 cacert: cert body if the cacert_file does not exists
173 cacert_file: /etc/openstack/rabbitmq-ca.pem
174
175
176
Petr Jediný1ff6f562017-08-09 14:38:09 +0200177Configuring plugins
178-------------------
179
180Dogtag KRA
181
182.. code block:: yaml
183
184 barbican:
185 server:
186 plugin:
187 dogtag:
188 pem_path: '/etc/barbican/kra_admin_cert.pem'
189 dogtag_host: localhost
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200190 dogtag_port: 8443
Petr Jediný1ff6f562017-08-09 14:38:09 +0200191 nss_db_path: '/etc/barbican/alias'
192 nss_db_path_ca: '/etc/barbican/alias-ca'
193 nss_password: 'password123'
194 simple_cmc_profile: 'caOtherCert'
195 ca_expiration_time: 1
196 plugin_working_dir: '/etc/barbican/dogtag'
197
198KMIP HSM
199
200.. code block:: yaml
201
202 barbican:
203 server:
204 plugin:
205 kmip:
206 username: 'admin'
207 password: 'password'
208 host: localhost
209 port: 5696
210 keyfile: '/path/to/certs/cert.key'
211 certfile: '/path/to/certs/cert.crt'
212 ca_certs: '/path/to/certs/LocalCA.crt'
213
214
215PKCS11 HSM
216
217.. code block:: yaml
218
219 barbican:
220 server:
221 plugin:
222 p11_crypto:
223 library_path: '/usr/lib/libCryptoki2_64.so'
224 login: 'mypassword'
225 mkek_label: 'an_mkek'
226 mkek_length: 32
227 hmac_label: 'my_hmac_label'
228
229
230
231Software Only Crypto
232
233`kek` is key encryption key created from 32 bytes encoded as Base64. You should
234not use this in production.
235
236.. code block:: yaml
237
238 barbican:
239 server:
240 plugin:
241 simple_crypto:
242 kek: 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY='
243
244
245Secret stores
246-------------
247
248.. code-block:: yaml
249
250 barbican:
251 server:
252 plugin:
253 simple_crypto:
254 kek: "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY="
255 p11_crypto:
256 library_path: '/usr/lib/libCryptoki2_64.so'
257 login: 'mypassword'
258 mkek_label: 'an_mkek'
259 mkek_length: 32
260 hmac_label: 'my_hmac_label'
261 kmip:
262 username: 'admin'
263 password: 'password'
264 host: localhost
265 port: 5696
266 keyfile: '/path/to/certs/cert.key'
267 certfile: '/path/to/certs/cert.crt'
268 ca_certs: '/path/to/certs/LocalCA.crt'
269 dogtag:
270 pem_path: '/etc/barbican/kra_admin_cert.pem'
271 dogtag_host: localhost
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200272 dogtag_port: 8443
Petr Jediný1ff6f562017-08-09 14:38:09 +0200273 nss_db_path: '/etc/barbican/alias'
274 nss_db_path_ca: '/etc/barbican/alias-ca'
275 nss_password: 'password123'
276 simple_cmc_profile: 'caOtherCert'
277 ca_expiration_time: 1
278 plugin_working_dir: '/etc/barbican/dogtag'
279 store:
280 software:
281 crypto_plugin: simple_crypto
282 store_plugin: store_crypto
283 global_default: True
284 kmip:
285 store_plugin: kmip_plugin
286 dogtag:
Petr Jedinýdcc90f82017-10-02 13:46:10 +0200287 store_plugin: dogtag_crypto
Petr Jediný1ff6f562017-08-09 14:38:09 +0200288 pkcs11:
289 store_plugin: store_crypto
290 crypto_plugin: p11_crypto
291
Petr Jedinýdd6387a2017-08-01 15:50:17 +0200292
293Documentation and Bugs
294======================
295
296To learn how to install and update salt-formulas, consult the documentation
297available online at:
298
299 http://salt-formulas.readthedocs.io/
300
301In the unfortunate event that bugs are discovered, they should be reported to
302the appropriate issue tracker. Use GitHub issue tracker for specific salt
303formula:
304
305 https://github.com/salt-formulas/salt-formula-barbican/issues
306
307For feature requests, bug reports or blueprints affecting entire ecosystem,
308use Launchpad salt-formulas project:
309
310 https://launchpad.net/salt-formulas
311
312Developers wishing to work on the salt-formulas projects should always base
313their work on master branch and submit pull request against specific formula.
314
315You should also subscribe to mailing list (salt-formulas@freelists.org):
316
317 https://www.freelists.org/list/salt-formulas
318
319Any questions or feedback is always welcome so feel free to join our IRC
320channel:
321
322 #salt-formulas @ irc.freenode.net
323
324Read more
325=========
326
327* https://docs.openstack.org/barbican/latest/