blob: 957c72a5c9c4c87fd050befc42c42df3be5e0e02 [file] [log] [blame]
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +03001=====
2Usage
3=====
Filip Pytloun943d6882015-10-06 16:28:32 +02004
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
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030014 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
15 | id | region | publicurl | internalurl | adminurl | service_id |
16 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
17 | 91663a8d...494 | RegionOne | http://10.0.150.37:5000/ | http://10.0.150.37:5000/ | http://10.0.150.37:35357/ | 0fd2dba...9c9 |
18 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
Filip Pytloun943d6882015-10-06 16:28:32 +020019
20Sample pillars
21==============
22
Alexander Noskov78b81e02016-12-05 16:20:50 +040023.. caution::
Adam Tengler7c66c882016-03-14 19:35:49 +010024
Jakub Pavlikffc280d2016-05-20 11:19:14 +020025 When you use localhost as your database host (keystone:server:
26 atabase:host), sqlalchemy will try to connect to /var/run/mysql/
27 mysqld.sock, may cause issues if you located your mysql socket elsewhere
Adam Tengler7c66c882016-03-14 19:35:49 +010028
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030029Full stacked Keystone:
Filip Pytloun943d6882015-10-06 16:28:32 +020030
31.. code-block:: yaml
32
33 keystone:
34 server:
35 enabled: true
36 version: juno
37 service_token: 'service_tokeen'
38 service_tenant: service
39 service_password: 'servicepwd'
40 admin_tenant: admin
41 admin_name: admin
42 admin_password: 'adminpwd'
43 admin_email: stackmaster@domain.com
Dzmitry Stremkouskid9a2b652018-10-25 16:37:00 +020044 enable_proxy_headers_parsing: True
Filip Pytloun943d6882015-10-06 16:28:32 +020045 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
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030064Keystone public HTTPS API:
Filip Pytloun943d6882015-10-06 16:28:32 +020065
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
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030089Keystone with custom policies. Keys with specified rules
90are created or set to this value if they already exists.
91Keys with no value (like our ``existing_rule``) are deleted
92from the policy file:
Adam Tenglerb1ebaca2017-05-04 21:06:08 +000093
94.. code-block:: yaml
95
96 keystone:
97 server:
98 enabled: true
99 policy:
100 new_rule: "rule:admin_required"
101 existing_rule:
102
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300103Keystone memcached storage for tokens:
Filip Pytloun943d6882015-10-06 16:28:32 +0200104
105.. code-block:: yaml
106
107 keystone:
108 server:
109 enabled: true
110 version: juno
111 ...
112 token_store: cache
113 cache:
114 engine: memcached
115 host: 127.0.0.1
116 port: 11211
117 services:
118 ...
119
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300120Keystone clustered memcached storage for tokens:
Filip Pytloun943d6882015-10-06 16:28:32 +0200121
122.. code-block:: yaml
123
124 keystone:
125 server:
126 enabled: true
127 version: juno
128 ...
129 token_store: cache
130 cache:
131 engine: memcached
132 members:
133 - host: 192.160.0.1
134 port: 11211
135 - host: 192.160.0.2
136 port: 11211
137 services:
138 ...
139
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300140Keystone client:
Filip Pytloun943d6882015-10-06 16:28:32 +0200141
142.. code-block:: yaml
143
144 keystone:
145 client:
146 enabled: true
147 server:
148 host: 10.0.0.2
149 public_port: 5000
150 private_port: 35357
151 service_token: 'token'
152 admin_tenant: admin
153 admin_name: admin
154 admin_password: 'passwd'
155
156Keystone cluster
157
158.. code-block:: yaml
159
160 keystone:
161 control:
162 enabled: true
163 provider:
164 os15_token:
165 host: 10.0.0.2
166 port: 35357
167 token: token
168 os15_tcp_core_stg:
169 host: 10.0.0.5
170 port: 5000
171 tenant: admin
172 name: admin
173 password: password
174
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300175Keystone fernet tokens for OpenStack Kilo release:
Filip Pytloun943d6882015-10-06 16:28:32 +0200176
177.. code-block:: yaml
178
179 keystone:
180 server:
181 ...
182 tokens:
183 engine: fernet
Jakub Pavlik6b0b74a2016-09-01 10:49:14 +0200184 max_active_keys: 3
Filip Pytloun943d6882015-10-06 16:28:32 +0200185 ...
186
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300187Keystone auth methods:
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300188
189.. code-block:: yaml
190
191 keystone:
192 server:
193 ...
194 auth_methods:
195 - external
196 - password
197 - token
198 - oauth1
199 ...
200
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300201Keystone domain with LDAP backend, using SQL for
202role/project assignment:
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100203
204.. code-block:: yaml
205
206 keystone:
207 server:
208 domain:
Ramon Melero96ff9122017-08-15 11:02:50 -0500209 external:
210 description: "Testing domain"
211 backend: ldap
212 assignment:
213 backend: sql
214 ldap:
215 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
218 uid: keystone
219 password: password
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100220
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300221Use driver aliases for drivers instead of class path's:
Dzmitry Stremkouskia0db50f2018-03-26 20:41:36 +0200222
223.. code-block:: yaml
224
225 keystone:
226 server:
227 domain:
228 test:
229 description: "Test domain"
230 backend: ldap
231 assignment:
232 backend: sql
233 driver: sql
234 identity:
235 backend: ldap
236 driver: keystone.identity.backends.ldap.Identity
237 ldap:
238 url: "ldaps://idm.domain.com"
239 ...
240
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300241Using LDAP backend for default domain:
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100242
243.. code-block:: yaml
244
245 keystone:
246 server:
247 backend: ldap
248 assignment:
249 backend: sql
250 ldap:
Ales Komarekaabbda62016-03-15 08:38:35 +0100251 url: "ldaps://idm.domain.com"
252 suffix: "dc=cloud,dc=domain,dc=com"
253 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100254 uid: keystone
Ales Komarekaabbda62016-03-15 08:38:35 +0100255 password: password
256
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300257Using LDAP backend for default domain with
258``user_enabled`` field emulation:
kovchynnykov74125082018-02-05 13:17:43 +0200259
260.. code-block:: yaml
261
262 keystone:
263 server:
264 backend: ldap
265 assignment:
266 backend: sql
267 ldap:
268 url: "ldap://idm.domain.com"
269 suffix: "ou=Openstack Service Users,o=domain.com"
270 bind_user: keystone
271 password: password
272 # Define LDAP "group" object class and "membership" attribute
273 group_objectclass: groupOfUniqueNames
274 group_member_attribute: uniqueMember
275 # User will receive "enabled" attribute basing on membership in "os-user-enabled" group
276 user_enabled_emulation: True
277 user_enabled_emulation_dn: "cn=os-user-enabled,ou=Openstack,o=domain.com"
278 user_enabled_emulation_use_group_config: True
279
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300280If the members of the group ``objectclass`` are user IDs
281rather than DNs, set ``group_members_are_ids`` to ``true``.
282This is the case when using ``posixGroup` as the group
283``objectclass`` and ``OpenDirectory``:
Aleksieiev, Oleksii3f1d7a52018-06-06 15:14:29 -0700284
285.. code-block:: yaml
286
287 keystone:
288 server:
289 backend: ldap
290 assignment:
291 backend: sql
292 ldap:
293 url: "ldaps://idm.domain.com"
294 suffix: "dc=cloud,dc=domain,dc=com"
295 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
296 uid: keystone
297 password: password
298 group_members_are_ids: True
299
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300300Simple service endpoint definition (defaults to ``RegionOne``):
Ales Komarekaabbda62016-03-15 08:38:35 +0100301
302.. code-block:: yaml
303
304 keystone:
305 server:
306 service:
307 ceilometer:
308 type: metering
309 description: OpenStack Telemetry Service
310 user:
311 name: ceilometer
312 password: password
313 bind:
314 ...
315
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300316Region-aware service endpoints definition:
Ales Komarekaabbda62016-03-15 08:38:35 +0100317
318.. code-block:: yaml
319
320 keystone:
321 server:
322 service:
323 ceilometer_region01:
324 service: ceilometer
325 type: metering
326 region: region01
327 description: OpenStack Telemetry Service
328 user:
329 name: ceilometer
330 password: password
331 bind:
332 ...
333 ceilometer_region02:
334 service: ceilometer
335 type: metering
336 region: region02
337 description: OpenStack Telemetry Service
338 bind:
339 ...
340
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300341Enable Ceilometer notifications:
Jakub Pavlik72e31d62016-04-08 16:26:57 +0200342
343.. code-block:: yaml
344
345 keystone:
346 server:
347 notification: true
348 message_queue:
349 engine: rabbitmq
350 host: 127.0.0.1
351 port: 5672
352 user: openstack
353 password: password
354 virtual_host: '/openstack'
355 ha_queues: true
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100356
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300357Client-side RabbitMQ HA setup:
Jakub Pavlik205ef802016-12-14 12:48:42 +0100358
359.. code-block:: yaml
360
361 keystone:
362 server:
363 ....
364 message_queue:
365 engine: rabbitmq
366 members:
367 - host: 10.0.16.1
368 - host: 10.0.16.2
369 - host: 10.0.16.3
370 user: openstack
371 password: pwd
372 virtual_host: '/openstack'
373 ....
374
Kirill Bespalov00984452017-08-01 17:44:11 +0300375Client-side RabbitMQ TLS configuration:
376
377|
378
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300379By default system-wide CA certs are used. Nothing should be
380specified except ``ssl.enabled``.
Kirill Bespalov00984452017-08-01 17:44:11 +0300381
382.. code-block:: yaml
383
384 keystone:
385 server:
386 ....
387 message_queue:
388 ssl:
389 enabled: True
390
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300391Use ``cacert_file`` option to specify the CA-cert
392file path explicitly:
Kirill Bespalov00984452017-08-01 17:44:11 +0300393
394.. code-block:: yaml
395
396 keystone:
397 server:
398 ....
399 message_queue:
400 ssl:
401 enabled: True
402 cacert_file: /etc/ssl/rabbitmq-ca.pem
403
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300404To manage content of the ``cacert_file`` use the ``cacert``
405option:
Kirill Bespalov00984452017-08-01 17:44:11 +0300406
407.. code-block:: yaml
408
409 keystone:
410 server:
411 ....
412 message_queue:
413 ssl:
414 enabled: True
415 cacert: |
416
417 -----BEGIN CERTIFICATE-----
418 ...
419 -----END CERTIFICATE-------
420
421 cacert_file: /etc/openstack/rabbitmq-ca.pem
422
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300423.. note::
Kirill Bespalov00984452017-08-01 17:44:11 +0300424
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300425 * The ``message_queue.port`` is set to ``5671`` (AMQPS) by
426 default if ``ssl.enabled=True``.
427 * Use ``message_queue.ssl.version`` if you need to specify
428 protocol version. By default, is ``TLSv1`` for python <
429 2.7.9 and ``TLSv1_2`` for version above.
Kirill Bespalov00984452017-08-01 17:44:11 +0300430
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300431Enable CADF audit notification:
Petr Michalec98fc6d62016-12-03 11:30:35 +0100432
433.. code-block:: yaml
434
435 keystone:
436 server:
437 notification: true
438 notification_format: cadf
439
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300440Run Keystone under Apache:
Alexander Noskov78b81e02016-12-05 16:20:50 +0400441
442.. code-block:: yaml
443
444 keystone:
445 server:
446 service_name: apache2
447 apache:
448 server:
449 enabled: true
450 default_mpm: event
451 site:
452 keystone:
453 enabled: true
454 type: keystone
455 name: wsgi
456 host:
457 name: ${linux:network:fqdn}
458 modules:
459 - wsgi
460
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300461Enable SAML2 Federated keystone:
Alexander Noskov78b81e02016-12-05 16:20:50 +0400462
463.. code-block:: yaml
464
465 keystone:
466 server:
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300467 auth_methods:
468 - password
469 - token
470 - saml2
Oleksii Chuprynebe09a52017-04-21 11:08:14 +0300471 federation:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300472 saml2:
473 protocol: saml2
474 remote_id_attribute: Shib-Identity-Provider
475 shib_url_scheme: https
476 shib_compat_valid_user: 'on'
Alexander Noskov78b81e02016-12-05 16:20:50 +0400477 federation_driver: keystone.contrib.federation.backends.sql.Federation
Oleksii Chupryn5f110b02017-03-30 09:54:27 +0300478 federated_domain_name: Federated
Alexander Noskov78b81e02016-12-05 16:20:50 +0400479 trusted_dashboard:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300480 - https://${_param:cluster_public_host}/horizon/auth/websso/
Alexander Noskov78b81e02016-12-05 16:20:50 +0400481 apache:
482 server:
483 pkgs:
484 - apache2
485 - libapache2-mod-shib2
486 modules:
487 - wsgi
488 - shib2
Ales Komarek74a3ba62016-10-05 12:16:52 +0200489
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300490Enable OIDC Federated Keystone:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300491
492.. code-block:: yaml
493
494 keystone:
495 server:
496 auth_methods:
497 - password
498 - token
499 - oidc
500 federation:
501 oidc:
502 protocol: oidc
503 remote_id_attribute: HTTP_OIDC_ISS
504 remote_id_attribute_value: https://accounts.google.com
505 oidc_claim_prefix: "OIDC-"
506 oidc_response_type: id_token
507 oidc_scope: "openid email profile"
508 oidc_provider_metadata_url: https://accounts.google.com/.well-known/openid-configuration
509 oidc_client_id: <openid_client_id>
510 oidc_client_secret: <openid_client_secret>
511 oidc_crypto_passphrase: openstack
512 oidc_redirect_uri: https://key.example.com:5000/v3/auth/OS-FEDERATION/websso/oidc/redirect
513 oidc_oauth_introspection_endpoint: https://www.googleapis.com/oauth2/v1/tokeninfo
514 oidc_oauth_introspection_token_param_name: access_token
515 oidc_oauth_remote_user_claim: user_id
516 oidc_ssl_validate_server: 'off'
517 federated_domain_name: Federated
518 federation_driver: keystone.contrib.federation.backends.sql.Federation
519 trusted_dashboard:
520 - https://${_param:cluster_public_host}/auth/websso/
521 apache:
522 server:
523 pkgs:
524 - apache2
525 - libapache2-mod-auth-openidc
526 modules:
527 - wsgi
528 - auth_openidc
529
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300530.. note:: Ubuntu Trusty repository doesn't contain
531 ``libapache2-mod-auth-openidc`` package. Additonal
532 repository should be added to the source list.
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300533
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300534Use a custom identity driver with custom options:
mnederlof5d9ccac2017-03-02 15:47:50 +0100535
536.. code-block:: yaml
537
538 keystone:
539 server:
540 backend: k2k
541 k2k:
542 auth_url: 'https://keystone.example.com/v2.0'
543 read_user: 'example_user'
544 read_pass: 'password'
545 read_tenant_id: 'admin'
546 identity_driver: 'sql'
547 id_prefix: 'k2k:'
548 domain: 'default'
549 caching: true
550 cache_time: 600
551
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300552Enable CORS parameters:
Ondrej Smola16e1bb72017-04-18 23:37:49 +0200553
554.. code-block:: yaml
555
556 keystone:
557 server:
558 cors:
559 allowed_origin: https:localhost.local,http:localhost.local
560 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
561 allow_methods: GET,PUT,POST,DELETE,PATCH
562 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
563 allow_credentials: True
564 max_age: 86400
565
Ales Komarek74a3ba62016-10-05 12:16:52 +0200566Keystone client
567---------------
568
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300569Service endpoints enforcement with service token:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200570
571.. code-block:: yaml
572
573 keystone:
574 client:
575 enabled: true
576 server:
577 keystone01:
578 admin:
579 host: 10.0.0.2
580 port: 35357
581 token: 'service_token'
582 service:
583 nova:
584 type: compute
585 description: OpenStack Compute Service
586 endpoints:
587 - region: region01
588 public_address: 172.16.10.1
589 public_port: 8773
590 public_path: '/v2'
591 internal_address: 172.16.10.1
592 internal_port: 8773
593 internal_path: '/v2'
594 admin_address: 172.16.10.1
595 admin_port: 8773
596 admin_path: '/v2'
597
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300598Project, users, roles enforcement with admin user:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200599
600.. code-block:: yaml
601
602 keystone:
603 client:
604 enabled: true
605 server:
606 keystone01:
607 admin:
608 host: 10.0.0.2
609 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100610 project: admin
Ales Komarek74a3ba62016-10-05 12:16:52 +0200611 user: admin
612 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100613 region_name: RegionOne
614 protocol: https
Ales Komarek74a3ba62016-10-05 12:16:52 +0200615 roles:
616 - admin
617 - member
618 project:
619 tenant01:
620 description: "test env"
Jiri Broulik59000e92017-02-06 18:14:06 +0100621 quota:
622 instances: 100
623 cores: 24
624 ram: 151200
625 floating_ips: 50
626 fixed_ips: -1
627 metadata_items: 128
628 injected_files: 5
629 injected_file_content_bytes: 10240
630 injected_file_path_bytes: 255
631 key_pairs: 100
632 security_groups: 20
633 security_group_rules: 40
634 server_groups: 20
635 server_group_members: 20
Ales Komarek74a3ba62016-10-05 12:16:52 +0200636 user:
637 user01:
638 email: jdoe@domain.com
639 is_admin: true
640 password: some
641 user02:
642 email: jdoe2@domain.com
643 password: some
644 roles:
645 - custom-roles
646
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300647Multiple servers example:
Richard Felkl5ff315e2017-02-01 23:26:23 +0100648
649.. code-block:: yaml
650
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100651 keystone:
652 client:
653 enabled: true
654 server:
655 keystone01:
656 admin:
657 host: 10.0.0.2
658 port: 5000
659 project: 'admin'
660 user: admin
661 password: 'workshop'
662 region_name: RegionOne
663 protocol: https
664 keystone02:
665 admin:
666 host: 10.0.0.3
667 port: 5000
668 project: 'admin'
669 user: admin
670 password: 'workshop'
671 region_name: RegionOne
Richard Felkl5ff315e2017-02-01 23:26:23 +0100672
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300673Tenant quotas:
Jiri Broulik59000e92017-02-06 18:14:06 +0100674
675.. code-block:: yaml
676
677 keystone:
678 client:
679 enabled: true
680 server:
681 keystone01:
682 admin:
683 host: 10.0.0.2
684 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100685 project: admin
Jiri Broulik59000e92017-02-06 18:14:06 +0100686 user: admin
687 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100688 region_name: RegionOne
689 protocol: https
Jiri Broulik59000e92017-02-06 18:14:06 +0100690 roles:
691 - admin
692 - member
693 project:
694 tenant01:
695 description: "test env"
696 quota:
697 instances: 100
698 cores: 24
699 ram: 151200
700 floating_ips: 50
701 fixed_ips: -1
702 metadata_items: 128
703 injected_files: 5
704 injected_file_content_bytes: 10240
705 injected_file_path_bytes: 255
706 key_pairs: 100
707 security_groups: 20
708 security_group_rules: 40
709 server_groups: 20
710 server_group_members: 20
711
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300712Extra config params in ``keystone.conf``
713(since Mitaka release):
Oleksii Chupryn4fec2132017-04-03 17:35:28 +0300714
715.. code-block:: yaml
716
717 keystone:
718 server:
719 ....
720 extra_config:
721 ini_section1:
722 param1: value
723 param2: value
724 ini_section2:
725 param1: value
726 param2: value
727 ....
728
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300729Configuration of ``policy.json`` file:
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200730
731.. code-block:: yaml
732
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200733 keystone:
734 server:
735 ....
736 policy:
737 admin_or_token_subject: 'rule:admin_required or rule:token_subject'
738
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300739Manage ``os-cloud-config`` yml with ``keystone.client``:
Vasyl Saienkod1902592018-03-30 12:51:54 +0300740
741.. code-block:: yaml
742
743 keystone:
744 client:
745 os_client_config:
746 enabled: true
747 cfgs:
748 root:
749 file: /root/.config/openstack/clouds.yml
750 content:
751 clouds:
752 admin_identity:
753 region_name: RegioneOne
754 auth:
755 username: admin
756 password: secretpassword
757 user_domain_name: Default
758 project_name: admin
759 project_domain_name: Default
760 auth_url: "http://1.2.3.4:5000"
761
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300762Setting up default admin project name and domain:
Andrey4b287f02017-10-03 18:40:25 -0500763
764.. code-block:: yaml
765
Andrey4b287f02017-10-03 18:40:25 -0500766 keystone:
767 server:
768 ....
769 admin_project:
770 name: "admin"
771 domain: "default"
772
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400773Enhanced logging with logging.conf
774----------------------------------
775
776By default logging.conf is disabled.
777
778That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400779
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300780* ``openstack_log_appender``
781 Set to true to enable ``log_config_append`` for all OpenStack services
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400782
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300783* ``openstack_fluentd_handler_enabled``
784 Set to true to enable ``FluentHandler`` for all Openstack services
785
786* ``openstack_ossyslog_handler_enabled``
787 Set to true to enable ``OSSysLogHandler`` for all Openstack services
788
789Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
790are available.
791
792Also, it is possible to configure this with pillar:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400793
794.. code-block:: yaml
795
796 keystone:
797 server:
798 logging:
799 log_appender: true
800 log_handlers:
801 watchedfile:
802 enabled: true
803 fluentd:
804 enabled: true
Oleksii Chupryn6529bb32018-02-07 11:55:38 +0200805 ossyslog:
806 enabled: true
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400807
Jiri Broulik59000e92017-02-06 18:14:06 +0100808Usage
809=====
810
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300811#. Apply the :command:`keystone.client.service` state.
812#. Apply the :command:`keystone.client` state.
Jiri Broulik59000e92017-02-06 18:14:06 +0100813
814
Oleksii Grudev5707e5c2018-06-18 17:31:22 +0300815Fernet-keys rotation without gluster
816------------------------------------
817
818In the future fernet keys supposed to be rotated with rsync+ssh instead of using glusterfs. By default it is assumed
819that the script will run on primary control node (ctl01) and will rotate and transfer fernet keys to secondary
820controller nodes (ctl02, ctl03). Following parameter should be set on cluster level:
821
822keystone_node_role
823
824and fernet_rotation_driver should be set to 'rsync'
825
826By default this parameter is set to "secondary" on system level along with other parameters:
827.. code-block:: yaml
828
829 keystone:
830 server:
831 role: ${_param:keystone_node_role}
832 tokens:
833 fernet_sync_nodes_list:
834 control02:
835 name: ctl02
836 enabled: True
837 control03:
838 name: ctl03
839 enabled: True
840 fernet_rotation_driver: rsync
841
842Prior to running keystone salt states ssh key should be generated and its public part should be placed on secondary controllers.
843It can be accomplished by running following orchestration state before keystone states:
844
845salt-run state.orchestrate keystone.orchestrate.deploy
846
847Currently the default fernet rotation driver is a shared filesystem
848
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300849Enable x509 and ssl communication between Keystone and Galera cluster.
850---------------------
851By default communication between Keystone and Galera is unsecure.
852
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300853keystone:
854 server:
855 database:
856 x509:
857 enabled: True
858
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300859You able to set custom certificates in pillar:
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300860
861keystone:
862 server:
863 database:
864 x509:
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300865 cacert: (certificate content)
866 cert: (certificate content)
867 key: (certificate content)
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300868
869You can read more about it here:
870 https://docs.openstack.org/security-guide/databases/database-access-control.html
871
Oleksandr Bryndzii49a50832019-02-26 15:38:54 +0200872Enhanced max_active_keys setup
873------------------------------
874
875Rotating keys too frequently, or with ``[fernet_tokens] max_active_keys`` set too low,
876will cause tokens to become invalid prior to their expiration. As tokens may be fetched
877beyond their initial expiration period, keys should not be fully rotated within the
878period of ``[token] expiration`` + ``[token] allow_expired_window`` seconds to prevent the
879tokens becoming unavailable. As an example, the max_active_keys default value can be
880adjusted according to the following specified values:
881``[token] allow_expired_window`` = 86400 (24 hours)
882``[token] expiration`` = 3600 (1 hour)
883rotation_frequency = 1 (1 hour)
884``[fernet_token]max_active_keys`` = (24 + 1)/1 + 2 = 27
885
886.. code-block:: yaml
887
888 keystone:
889 server:
890 ...
891 tokens:
892 engine: fernet
893 expiration: 3600
894 allow_expired_window: 86400
895 max_active_keys: 27
896 ...
897
Oleksandr Shyshko004f17b2019-02-21 12:51:25 +0000898Enable security compliance policies.
899-----------------------------------
900By default security compliance policies disabled. You are able to define follow params independency each other.
901
902Notice: To ignore `change_password_upon_first_use` requirement for specific users, such as service users,
903set the `options` attribute `ignore_change_password_upon_first_use`
904to `True` for the desired user via the update user API
905
906Notice: Symbol "$" should have escape character and looks like "$$".
907
908.. code-block:: yaml
909
910keystone:
911 server:
912 security_compliance:
Oleksandr Shyshko3d95b712019-04-19 11:50:49 +0300913 disable_user_account_days_inactive: 365
914 lockout_failure_attempts: 60
Oleksandr Shyshko004f17b2019-02-21 12:51:25 +0000915 lockout_duration: 600
Oleksandr Shyshko3d95b712019-04-19 11:50:49 +0300916 password_expires_days: 730
917 unique_last_password_count: 5
Oleksandr Shyshko004f17b2019-02-21 12:51:25 +0000918 minimum_password_age: 0
Oleksandr Shyshko3d95b712019-04-19 11:50:49 +0300919 password_regex: '^[a-zA-Z0-9~!@#%^&\*_=+]{32,}$$'
920 password_regex_description: |
921 'Your password could contains capital letters, lowercase letters, digits, symbols "~ ! @ # % ^ & * _ = +" and have a minimum length of 32 characters'
922 change_password_upon_first_use: False
Oleksandr Shyshkoa0b79e22019-02-27 15:02:30 +0000923
924Define extra user options.
925-------------------------
926
927 To ignore `change_password_upon_first_use` requirement for specific users,
928such as service users, set the `options` attribute `ignore_change_password_upon_first_use`
929to `True` for the desired user via the update user API.
930
931 To ignore `password_expires_days` requirement for specific users,
932such as service users, set the `options` attribute `ignore_password_expiry`
933to `True` for the desired user via the update user API.
934
935 To ignore `lockout_failure_attempts` requirement for specific users,
936such as service users, set the `options` attribute `ignore_lockout_failure_attempts`
937to `True` for the desired user via the update user API.
938
939 Also If there exists a user who should not be able to change her own password via
940the keystone password change API, keystone supports setting that user’s option `lock_password`
941to True via the user update API.
942
943#For release since Q
944.. code-block:: yaml
945
946keystone:
947 client:
948 resources:
949 v3:
950 users:
951 cinder:
952 options:
953 ignore_change_password_upon_first_use: True
954 ignore_password_expiry: False
955 ignore_lockout_failure_attempts: False
956 lock_password: True
957.. code-block::
958
959#For all early releases
960.. code-block:: yaml
961
962keystone:
963 client:
964 server:
965 identity:
966 project:
967 service:
968 user:
969 cinder:
970 options:
971 ignore_change_password_upon_first_use: True
972 ignore_password_expiry: False
973 ignore_lockout_failure_attempts: False
974 lock_password: True
975.. code-block::
976
Oleksandr Bryndziiad0ffc52019-05-02 15:40:31 +0300977Keystone configmap setup:
978---------------
979# Default type:
980.. code-block:: yaml
981
982 keystone:
983 server:
984 configmap:
985 DEFAULT:
986 debug: true
987 rate_limit_except_level: debug
988 auth:
989 methods: 'external,password,token'
990 tokenless_auth:
991 trusted_issuer: 'O=Mirantis,L=Prague,CN=Salt Master CA,C=cz'
992
993.. code-block::
994
995
996# type: 'MultiOpt' for multiline values:
997.. code-block:: yaml
998
999 keystone:
1000 server:
1001 configmap:
1002 tokenless_auth:
1003 trusted_issuer:
1004 type: 'MultiOpt'
1005 values:
1006 value1: 'O=Mirantis,L=Prague,CN=Salt Master CA,C=cz'
1007 value2: 'O=Mirantis,L=Kharkiv,CN=Salt Master CA2,C=ua'
1008
1009.. code-block::
1010
Vasyl Saienko52bed882018-09-10 10:52:39 +00001011Upgrades
1012========
1013
1014Each openstack formula provide set of phases (logical bloks) that will help to
1015build flexible upgrade orchestration logic for particular components. The list
1016of phases and theirs descriptions are listed in table below:
1017
1018+-------------------------------+------------------------------------------------------+
1019| State | Description |
1020+===============================+======================================================+
1021| <app>.upgrade.service_running | Ensure that all services for particular application |
1022| | are enabled for autostart and running |
1023+-------------------------------+------------------------------------------------------+
1024| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1025| | disabled for autostart and dead |
1026+-------------------------------+------------------------------------------------------+
1027| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1028| | are installed to latest available version. |
1029| | This will not upgrade data plane packages like qemu |
1030| | and openvswitch as usually minimal required version |
1031| | in openstack services is really old. The data plane |
1032| | packages should be upgraded separately by `apt-get |
1033| | upgrade` or `apt-get dist-upgrade` |
1034| | Applying this state will not autostart service. |
1035+-------------------------------+------------------------------------------------------+
1036| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1037+-------------------------------+------------------------------------------------------+
1038| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1039| | cloud before running upgrade. |
1040| | Only non destructive actions will be applied during |
1041| | this phase. Perform service built in service check |
1042| | like (keystone-manage doctor and nova-status upgrade)|
1043+-------------------------------+------------------------------------------------------+
1044| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1045| | phase resources will be gracefully removed from |
1046| | current node if it is allowed. Services for upgraded |
1047| | application will be set to admin disabled state to |
1048| | make sure node will not participate in resources |
1049| | scheduling. For example on gtw nodes this will set |
1050| | all agents to admin disable state and will move all |
1051| | routers to other agents. |
1052+-------------------------------+------------------------------------------------------+
1053| <app>.upgrade.upgrade | This state will basically upgrade application on |
1054| | particular target. Stop services, render |
1055| | configuration, install new packages, run offline |
1056| | dbsync (for ctl), start services. Data plane should |
1057| | not be affected, only OpenStack python services. |
1058+-------------------------------+------------------------------------------------------+
1059| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1060+-------------------------------+------------------------------------------------------+
1061| <app>.upgrade.post | This phase should be launched only when upgrade of |
1062| | the cloud is completed. Cleanup temporary files, |
1063| | perform other post upgrade tasks. |
1064+-------------------------------+------------------------------------------------------+
1065| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1066| | operations, verify do not have dead network |
1067| | agents/compute services) |
1068+-------------------------------+------------------------------------------------------+
1069
1070
Jakub Pavlikffc280d2016-05-20 11:19:14 +02001071Documentation and Bugs
Ales Komarek74a3ba62016-10-05 12:16:52 +02001072======================
Filip Pytloun943d6882015-10-06 16:28:32 +02001073
Jakub Pavlikffc280d2016-05-20 11:19:14 +02001074To learn how to deploy OpenStack Salt, consult the documentation available
1075online at:
1076
1077 https://wiki.openstack.org/wiki/OpenStackSalt
1078
1079In the unfortunate event that bugs are discovered, they should be reported to
1080the appropriate bug tracker. If you obtained the software from a 3rd party
1081operating system vendor, it is often wise to use their own bug tracker for
1082reporting problems. In all other cases use the master OpenStack bug tracker,
1083available at:
1084
1085 http://bugs.launchpad.net/openstack-salt
1086
1087Developers wishing to work on the OpenStack Salt project should always base
1088their work on the latest formulas code, available from the master GIT
1089repository at:
1090
1091 https://git.openstack.org/cgit/openstack/salt-formula-keystone
1092
1093Developers should also join the discussion on the IRC list, at:
1094
1095 https://wiki.openstack.org/wiki/Meetings/openstack-salt