blob: 257037dc40c936c2c2533f1d49f6926f9b21e9f0 [file] [log] [blame]
Filip Pytloun943d6882015-10-06 16:28:32 +02001==================
2OpenStack Keystone
3==================
4
Jakub Pavlikffc280d2016-05-20 11:19:14 +02005Keystone provides authentication, authorization and service discovery
6mechanisms via HTTP primarily for use by projects in the OpenStack family. It
7is most commonly deployed as an HTTP interface to existing identity systems,
8such as LDAP.
Filip Pytloun943d6882015-10-06 16:28:32 +02009
10From Kilo release Keystone v3 endpoint has definition without version in url
11
12.. code-block:: bash
13
14 +----------------------------------+-----------+--------------------------+--------------------------+---------------------------+----------------------------------+
15 | id | region | publicurl | internalurl | adminurl | service_id |
16 +----------------------------------+-----------+--------------------------+--------------------------+---------------------------+----------------------------------+
17 | 91663a8db11c487c9253c8c456863494 | RegionOne | http://10.0.150.37:5000/ | http://10.0.150.37:5000/ | http://10.0.150.37:35357/ | 0fd2dba3153d45a1ba7f709cfc2d69c9 |
18 +----------------------------------+-----------+--------------------------+--------------------------+---------------------------+----------------------------------+
19
20
21Sample pillars
22==============
23
Alexander Noskov78b81e02016-12-05 16:20:50 +040024.. caution::
Adam Tengler7c66c882016-03-14 19:35:49 +010025
Jakub Pavlikffc280d2016-05-20 11:19:14 +020026 When you use localhost as your database host (keystone:server:
27 atabase:host), sqlalchemy will try to connect to /var/run/mysql/
28 mysqld.sock, may cause issues if you located your mysql socket elsewhere
Adam Tengler7c66c882016-03-14 19:35:49 +010029
Filip Pytloun943d6882015-10-06 16:28:32 +020030Full stacked keystone
31
32.. code-block:: yaml
33
34 keystone:
35 server:
36 enabled: true
37 version: juno
38 service_token: 'service_tokeen'
39 service_tenant: service
40 service_password: 'servicepwd'
41 admin_tenant: admin
42 admin_name: admin
43 admin_password: 'adminpwd'
44 admin_email: stackmaster@domain.com
45 roles:
46 - admin
47 - Member
48 - image_manager
49 bind:
50 address: 0.0.0.0
51 private_address: 127.0.0.1
52 private_port: 35357
53 public_address: 127.0.0.1
54 public_port: 5000
55 api_version: 2.0
56 region: RegionOne
57 database:
58 engine: mysql
59 host: '127.0.0.1'
60 name: 'keystone'
61 password: 'LfTno5mYdZmRfoPV'
62 user: 'keystone'
63
64Keystone public HTTPS API
65
66.. code-block:: yaml
67
68 keystone:
69 server:
70 enabled: true
71 version: juno
72 ...
73 services:
74 - name: nova
75 type: compute
76 description: OpenStack Compute Service
77 user:
78 name: nova
79 password: password
80 bind:
81 public_address: cloud.domain.com
82 public_protocol: https
83 public_port: 8774
84 internal_address: 10.0.0.20
85 internal_port: 8774
86 admin_address: 10.0.0.20
87 admin_port: 8774
88
89Keystone memcached storage for tokens
90
91.. code-block:: yaml
92
93 keystone:
94 server:
95 enabled: true
96 version: juno
97 ...
98 token_store: cache
99 cache:
100 engine: memcached
101 host: 127.0.0.1
102 port: 11211
103 services:
104 ...
105
106Keystone clustered memcached storage for tokens
107
108.. code-block:: yaml
109
110 keystone:
111 server:
112 enabled: true
113 version: juno
114 ...
115 token_store: cache
116 cache:
117 engine: memcached
118 members:
119 - host: 192.160.0.1
120 port: 11211
121 - host: 192.160.0.2
122 port: 11211
123 services:
124 ...
125
126Keystone client
127
128.. code-block:: yaml
129
130 keystone:
131 client:
132 enabled: true
133 server:
134 host: 10.0.0.2
135 public_port: 5000
136 private_port: 35357
137 service_token: 'token'
138 admin_tenant: admin
139 admin_name: admin
140 admin_password: 'passwd'
141
142Keystone cluster
143
144.. code-block:: yaml
145
146 keystone:
147 control:
148 enabled: true
149 provider:
150 os15_token:
151 host: 10.0.0.2
152 port: 35357
153 token: token
154 os15_tcp_core_stg:
155 host: 10.0.0.5
156 port: 5000
157 tenant: admin
158 name: admin
159 password: password
160
161Keystone fernet tokens for OpenStack Kilo release
162
163.. code-block:: yaml
164
165 keystone:
166 server:
167 ...
168 tokens:
169 engine: fernet
Jakub Pavlik6b0b74a2016-09-01 10:49:14 +0200170 max_active_keys: 3
Filip Pytloun943d6882015-10-06 16:28:32 +0200171 ...
172
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300173Keystone auth methods
174
175.. code-block:: yaml
176
177 keystone:
178 server:
179 ...
180 auth_methods:
181 - external
182 - password
183 - token
184 - oauth1
185 ...
186
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100187Keystone domain with LDAP backend, using SQL for role/project assignment
188
189.. code-block:: yaml
190
191 keystone:
192 server:
193 domain:
Filip Pytlounaf25d8d2016-01-12 14:21:39 +0100194 description: "Testing domain"
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100195 backend: ldap
196 assignment:
197 backend: sql
198 ldap:
Ales Komarekaabbda62016-03-15 08:38:35 +0100199 url: "ldaps://idm.domain.com"
200 suffix: "dc=cloud,dc=domain,dc=com"
201 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100202 uid: keystone
Ales Komarekaabbda62016-03-15 08:38:35 +0100203 password: password
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100204
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100205Using LDAP backend for default domain
206
207.. code-block:: yaml
208
209 keystone:
210 server:
211 backend: ldap
212 assignment:
213 backend: sql
214 ldap:
Ales Komarekaabbda62016-03-15 08:38:35 +0100215 url: "ldaps://idm.domain.com"
216 suffix: "dc=cloud,dc=domain,dc=com"
217 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100218 uid: keystone
Ales Komarekaabbda62016-03-15 08:38:35 +0100219 password: password
220
221Simple service endpoint definition (defaults to RegionOne)
222
223.. code-block:: yaml
224
225 keystone:
226 server:
227 service:
228 ceilometer:
229 type: metering
230 description: OpenStack Telemetry Service
231 user:
232 name: ceilometer
233 password: password
234 bind:
235 ...
236
237Region-aware service endpoints definition
238
239.. code-block:: yaml
240
241 keystone:
242 server:
243 service:
244 ceilometer_region01:
245 service: ceilometer
246 type: metering
247 region: region01
248 description: OpenStack Telemetry Service
249 user:
250 name: ceilometer
251 password: password
252 bind:
253 ...
254 ceilometer_region02:
255 service: ceilometer
256 type: metering
257 region: region02
258 description: OpenStack Telemetry Service
259 bind:
260 ...
261
Jakub Pavlik72e31d62016-04-08 16:26:57 +0200262Enable ceilometer notifications
263
264.. code-block:: yaml
265
266 keystone:
267 server:
268 notification: true
269 message_queue:
270 engine: rabbitmq
271 host: 127.0.0.1
272 port: 5672
273 user: openstack
274 password: password
275 virtual_host: '/openstack'
276 ha_queues: true
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100277
Jakub Pavlik205ef802016-12-14 12:48:42 +0100278Client-side RabbitMQ HA setup
279
280.. code-block:: yaml
281
282 keystone:
283 server:
284 ....
285 message_queue:
286 engine: rabbitmq
287 members:
288 - host: 10.0.16.1
289 - host: 10.0.16.2
290 - host: 10.0.16.3
291 user: openstack
292 password: pwd
293 virtual_host: '/openstack'
294 ....
295
Petr Michalec98fc6d62016-12-03 11:30:35 +0100296Enable CADF audit notification
297
298.. code-block:: yaml
299
300 keystone:
301 server:
302 notification: true
303 notification_format: cadf
304
Alexander Noskov78b81e02016-12-05 16:20:50 +0400305Run keystone under Apache
306
307.. code-block:: yaml
308
309 keystone:
310 server:
311 service_name: apache2
312 apache:
313 server:
314 enabled: true
315 default_mpm: event
316 site:
317 keystone:
318 enabled: true
319 type: keystone
320 name: wsgi
321 host:
322 name: ${linux:network:fqdn}
323 modules:
324 - wsgi
325
326Enable Federated keystone
327
328.. code-block:: yaml
329
330 keystone:
331 server:
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300332 auth_methods:
333 - password
334 - token
335 - saml2
Alexander Noskov78b81e02016-12-05 16:20:50 +0400336 websso:
337 protocol: saml2
338 remote_id_attribute: Shib-Identity-Provider
339 federation_driver: keystone.contrib.federation.backends.sql.Federation
Oleksii Chupryn5f110b02017-03-30 09:54:27 +0300340 federated_domain_name: Federated
Alexander Noskov78b81e02016-12-05 16:20:50 +0400341 trusted_dashboard:
342 - http://${_param:proxy_vip_address_public}/horizon/auth/websso/
Oleksii Chupryn45e4d602017-03-07 16:40:44 +0200343 shib_url_scheme: https
Alexander Noskov78b81e02016-12-05 16:20:50 +0400344 apache:
345 server:
346 pkgs:
347 - apache2
348 - libapache2-mod-shib2
349 modules:
350 - wsgi
351 - shib2
Ales Komarek74a3ba62016-10-05 12:16:52 +0200352
mnederlof5d9ccac2017-03-02 15:47:50 +0100353Use a custom identity driver with custom options
354
355.. code-block:: yaml
356
357 keystone:
358 server:
359 backend: k2k
360 k2k:
361 auth_url: 'https://keystone.example.com/v2.0'
362 read_user: 'example_user'
363 read_pass: 'password'
364 read_tenant_id: 'admin'
365 identity_driver: 'sql'
366 id_prefix: 'k2k:'
367 domain: 'default'
368 caching: true
369 cache_time: 600
370
Ondrej Smola16e1bb72017-04-18 23:37:49 +0200371Enable CORS parameters
372
373.. code-block:: yaml
374
375 keystone:
376 server:
377 cors:
378 allowed_origin: https:localhost.local,http:localhost.local
379 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
380 allow_methods: GET,PUT,POST,DELETE,PATCH
381 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
382 allow_credentials: True
383 max_age: 86400
384
385
mnederlof5d9ccac2017-03-02 15:47:50 +0100386
Ales Komarek74a3ba62016-10-05 12:16:52 +0200387Keystone client
388---------------
389
390Service endpoints enforcement with service token
391
392.. code-block:: yaml
393
394 keystone:
395 client:
396 enabled: true
397 server:
398 keystone01:
399 admin:
400 host: 10.0.0.2
401 port: 35357
402 token: 'service_token'
403 service:
404 nova:
405 type: compute
406 description: OpenStack Compute Service
407 endpoints:
408 - region: region01
409 public_address: 172.16.10.1
410 public_port: 8773
411 public_path: '/v2'
412 internal_address: 172.16.10.1
413 internal_port: 8773
414 internal_path: '/v2'
415 admin_address: 172.16.10.1
416 admin_port: 8773
417 admin_path: '/v2'
418
419Project, users, roles enforcement with admin user
420
421.. code-block:: yaml
422
423 keystone:
424 client:
425 enabled: true
426 server:
427 keystone01:
428 admin:
429 host: 10.0.0.2
430 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100431 project: admin
Ales Komarek74a3ba62016-10-05 12:16:52 +0200432 user: admin
433 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100434 region_name: RegionOne
435 protocol: https
Ales Komarek74a3ba62016-10-05 12:16:52 +0200436 roles:
437 - admin
438 - member
439 project:
440 tenant01:
441 description: "test env"
Jiri Broulik59000e92017-02-06 18:14:06 +0100442 quota:
443 instances: 100
444 cores: 24
445 ram: 151200
446 floating_ips: 50
447 fixed_ips: -1
448 metadata_items: 128
449 injected_files: 5
450 injected_file_content_bytes: 10240
451 injected_file_path_bytes: 255
452 key_pairs: 100
453 security_groups: 20
454 security_group_rules: 40
455 server_groups: 20
456 server_group_members: 20
Ales Komarek74a3ba62016-10-05 12:16:52 +0200457 user:
458 user01:
459 email: jdoe@domain.com
460 is_admin: true
461 password: some
462 user02:
463 email: jdoe2@domain.com
464 password: some
465 roles:
466 - custom-roles
467
Richard Felkl5ff315e2017-02-01 23:26:23 +0100468Multiple servers example
469
470.. code-block:: yaml
471
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100472 keystone:
473 client:
474 enabled: true
475 server:
476 keystone01:
477 admin:
478 host: 10.0.0.2
479 port: 5000
480 project: 'admin'
481 user: admin
482 password: 'workshop'
483 region_name: RegionOne
484 protocol: https
485 keystone02:
486 admin:
487 host: 10.0.0.3
488 port: 5000
489 project: 'admin'
490 user: admin
491 password: 'workshop'
492 region_name: RegionOne
Richard Felkl5ff315e2017-02-01 23:26:23 +0100493
Jiri Broulik59000e92017-02-06 18:14:06 +0100494
495Tenant quotas
496
497.. code-block:: yaml
498
499 keystone:
500 client:
501 enabled: true
502 server:
503 keystone01:
504 admin:
505 host: 10.0.0.2
506 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100507 project: admin
Jiri Broulik59000e92017-02-06 18:14:06 +0100508 user: admin
509 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100510 region_name: RegionOne
511 protocol: https
Jiri Broulik59000e92017-02-06 18:14:06 +0100512 roles:
513 - admin
514 - member
515 project:
516 tenant01:
517 description: "test env"
518 quota:
519 instances: 100
520 cores: 24
521 ram: 151200
522 floating_ips: 50
523 fixed_ips: -1
524 metadata_items: 128
525 injected_files: 5
526 injected_file_content_bytes: 10240
527 injected_file_path_bytes: 255
528 key_pairs: 100
529 security_groups: 20
530 security_group_rules: 40
531 server_groups: 20
532 server_group_members: 20
533
Oleksii Chupryn4fec2132017-04-03 17:35:28 +0300534Extra config params in keystone.conf (since Mitaka release)
535
536.. code-block:: yaml
537
538 keystone:
539 server:
540 ....
541 extra_config:
542 ini_section1:
543 param1: value
544 param2: value
545 ini_section2:
546 param1: value
547 param2: value
548 ....
549
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200550Configuration of policy.json file
551
552.. code-block:: yaml
553
554
555 keystone:
556 server:
557 ....
558 policy:
559 admin_or_token_subject: 'rule:admin_required or rule:token_subject'
560
Jiri Broulik59000e92017-02-06 18:14:06 +0100561Usage
562=====
563
564Apply state `keystone.client.service` first and then `keystone.client` state.
565
566
Jakub Pavlikffc280d2016-05-20 11:19:14 +0200567Documentation and Bugs
Ales Komarek74a3ba62016-10-05 12:16:52 +0200568======================
Filip Pytloun943d6882015-10-06 16:28:32 +0200569
Jakub Pavlikffc280d2016-05-20 11:19:14 +0200570To learn how to deploy OpenStack Salt, consult the documentation available
571online at:
572
573 https://wiki.openstack.org/wiki/OpenStackSalt
574
575In the unfortunate event that bugs are discovered, they should be reported to
576the appropriate bug tracker. If you obtained the software from a 3rd party
577operating system vendor, it is often wise to use their own bug tracker for
578reporting problems. In all other cases use the master OpenStack bug tracker,
579available at:
580
581 http://bugs.launchpad.net/openstack-salt
582
583Developers wishing to work on the OpenStack Salt project should always base
584their work on the latest formulas code, available from the master GIT
585repository at:
586
587 https://git.openstack.org/cgit/openstack/salt-formula-keystone
588
589Developers should also join the discussion on the IRC list, at:
590
591 https://wiki.openstack.org/wiki/Meetings/openstack-salt
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100592
593Documentation and Bugs
594======================
595
596To learn how to install and update salt-formulas, consult the documentation
597available online at:
598
599 http://salt-formulas.readthedocs.io/
600
601In the unfortunate event that bugs are discovered, they should be reported to
602the appropriate issue tracker. Use Github issue tracker for specific salt
603formula:
604
605 https://github.com/salt-formulas/salt-formula-keystone/issues
606
607For feature requests, bug reports or blueprints affecting entire ecosystem,
608use Launchpad salt-formulas project:
609
610 https://launchpad.net/salt-formulas
611
612You can also join salt-formulas-users team and subscribe to mailing list:
613
614 https://launchpad.net/~salt-formulas-users
615
616Developers wishing to work on the salt-formulas projects should always base
617their work on master branch and submit pull request against specific formula.
618
619 https://github.com/salt-formulas/salt-formula-keystone
620
621Any questions or feedback is always welcome so feel free to join our IRC
622channel:
623
624 #salt-formulas @ irc.freenode.net