blob: dc58f40e9debe9d87efcc08679be5f405b614742 [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-"
Oleksii Molchanov655af6d2022-08-11 12:36:02 +0300506 oidc_claim_delimiter: ;
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300507 oidc_response_type: id_token
508 oidc_scope: "openid email profile"
509 oidc_provider_metadata_url: https://accounts.google.com/.well-known/openid-configuration
510 oidc_client_id: <openid_client_id>
511 oidc_client_secret: <openid_client_secret>
512 oidc_crypto_passphrase: openstack
513 oidc_redirect_uri: https://key.example.com:5000/v3/auth/OS-FEDERATION/websso/oidc/redirect
514 oidc_oauth_introspection_endpoint: https://www.googleapis.com/oauth2/v1/tokeninfo
515 oidc_oauth_introspection_token_param_name: access_token
516 oidc_oauth_remote_user_claim: user_id
517 oidc_ssl_validate_server: 'off'
518 federated_domain_name: Federated
519 federation_driver: keystone.contrib.federation.backends.sql.Federation
520 trusted_dashboard:
521 - https://${_param:cluster_public_host}/auth/websso/
522 apache:
523 server:
524 pkgs:
525 - apache2
526 - libapache2-mod-auth-openidc
527 modules:
528 - wsgi
529 - auth_openidc
530
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300531.. note:: Ubuntu Trusty repository doesn't contain
532 ``libapache2-mod-auth-openidc`` package. Additonal
533 repository should be added to the source list.
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300534
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300535Use a custom identity driver with custom options:
mnederlof5d9ccac2017-03-02 15:47:50 +0100536
537.. code-block:: yaml
538
539 keystone:
540 server:
541 backend: k2k
542 k2k:
543 auth_url: 'https://keystone.example.com/v2.0'
544 read_user: 'example_user'
545 read_pass: 'password'
546 read_tenant_id: 'admin'
547 identity_driver: 'sql'
548 id_prefix: 'k2k:'
549 domain: 'default'
550 caching: true
551 cache_time: 600
552
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300553Enable CORS parameters:
Ondrej Smola16e1bb72017-04-18 23:37:49 +0200554
555.. code-block:: yaml
556
557 keystone:
558 server:
559 cors:
560 allowed_origin: https:localhost.local,http:localhost.local
561 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
562 allow_methods: GET,PUT,POST,DELETE,PATCH
563 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
564 allow_credentials: True
565 max_age: 86400
566
Ales Komarek74a3ba62016-10-05 12:16:52 +0200567Keystone client
568---------------
569
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300570Service endpoints enforcement with service token:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200571
572.. code-block:: yaml
573
574 keystone:
575 client:
576 enabled: true
577 server:
578 keystone01:
579 admin:
580 host: 10.0.0.2
581 port: 35357
582 token: 'service_token'
583 service:
584 nova:
585 type: compute
586 description: OpenStack Compute Service
587 endpoints:
588 - region: region01
589 public_address: 172.16.10.1
590 public_port: 8773
591 public_path: '/v2'
592 internal_address: 172.16.10.1
593 internal_port: 8773
594 internal_path: '/v2'
595 admin_address: 172.16.10.1
596 admin_port: 8773
597 admin_path: '/v2'
598
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300599Project, users, roles enforcement with admin user:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200600
601.. code-block:: yaml
602
603 keystone:
604 client:
605 enabled: true
606 server:
607 keystone01:
608 admin:
609 host: 10.0.0.2
610 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100611 project: admin
Ales Komarek74a3ba62016-10-05 12:16:52 +0200612 user: admin
613 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100614 region_name: RegionOne
615 protocol: https
Ales Komarek74a3ba62016-10-05 12:16:52 +0200616 roles:
617 - admin
618 - member
619 project:
620 tenant01:
621 description: "test env"
Jiri Broulik59000e92017-02-06 18:14:06 +0100622 quota:
623 instances: 100
624 cores: 24
625 ram: 151200
626 floating_ips: 50
627 fixed_ips: -1
628 metadata_items: 128
629 injected_files: 5
630 injected_file_content_bytes: 10240
631 injected_file_path_bytes: 255
632 key_pairs: 100
633 security_groups: 20
634 security_group_rules: 40
635 server_groups: 20
636 server_group_members: 20
Ales Komarek74a3ba62016-10-05 12:16:52 +0200637 user:
638 user01:
639 email: jdoe@domain.com
640 is_admin: true
641 password: some
642 user02:
643 email: jdoe2@domain.com
644 password: some
645 roles:
646 - custom-roles
647
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300648Multiple servers example:
Richard Felkl5ff315e2017-02-01 23:26:23 +0100649
650.. code-block:: yaml
651
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100652 keystone:
653 client:
654 enabled: true
655 server:
656 keystone01:
657 admin:
658 host: 10.0.0.2
659 port: 5000
660 project: 'admin'
661 user: admin
662 password: 'workshop'
663 region_name: RegionOne
664 protocol: https
665 keystone02:
666 admin:
667 host: 10.0.0.3
668 port: 5000
669 project: 'admin'
670 user: admin
671 password: 'workshop'
672 region_name: RegionOne
Richard Felkl5ff315e2017-02-01 23:26:23 +0100673
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300674Tenant quotas:
Jiri Broulik59000e92017-02-06 18:14:06 +0100675
676.. code-block:: yaml
677
678 keystone:
679 client:
680 enabled: true
681 server:
682 keystone01:
683 admin:
684 host: 10.0.0.2
685 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100686 project: admin
Jiri Broulik59000e92017-02-06 18:14:06 +0100687 user: admin
688 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100689 region_name: RegionOne
690 protocol: https
Jiri Broulik59000e92017-02-06 18:14:06 +0100691 roles:
692 - admin
693 - member
694 project:
695 tenant01:
696 description: "test env"
697 quota:
698 instances: 100
699 cores: 24
700 ram: 151200
701 floating_ips: 50
702 fixed_ips: -1
703 metadata_items: 128
704 injected_files: 5
705 injected_file_content_bytes: 10240
706 injected_file_path_bytes: 255
707 key_pairs: 100
708 security_groups: 20
709 security_group_rules: 40
710 server_groups: 20
711 server_group_members: 20
712
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300713Extra config params in ``keystone.conf``
714(since Mitaka release):
Oleksii Chupryn4fec2132017-04-03 17:35:28 +0300715
716.. code-block:: yaml
717
718 keystone:
719 server:
720 ....
721 extra_config:
722 ini_section1:
723 param1: value
724 param2: value
725 ini_section2:
726 param1: value
727 param2: value
728 ....
729
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300730Configuration of ``policy.json`` file:
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200731
732.. code-block:: yaml
733
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200734 keystone:
735 server:
736 ....
737 policy:
738 admin_or_token_subject: 'rule:admin_required or rule:token_subject'
739
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300740Manage ``os-cloud-config`` yml with ``keystone.client``:
Vasyl Saienkod1902592018-03-30 12:51:54 +0300741
742.. code-block:: yaml
743
744 keystone:
745 client:
746 os_client_config:
747 enabled: true
748 cfgs:
749 root:
750 file: /root/.config/openstack/clouds.yml
751 content:
752 clouds:
753 admin_identity:
754 region_name: RegioneOne
755 auth:
756 username: admin
757 password: secretpassword
758 user_domain_name: Default
759 project_name: admin
760 project_domain_name: Default
761 auth_url: "http://1.2.3.4:5000"
762
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300763Setting up default admin project name and domain:
Andrey4b287f02017-10-03 18:40:25 -0500764
765.. code-block:: yaml
766
Andrey4b287f02017-10-03 18:40:25 -0500767 keystone:
768 server:
769 ....
770 admin_project:
771 name: "admin"
772 domain: "default"
773
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400774Enhanced logging with logging.conf
775----------------------------------
776
777By default logging.conf is disabled.
778
779That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400780
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300781* ``openstack_log_appender``
782 Set to true to enable ``log_config_append`` for all OpenStack services
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400783
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300784* ``openstack_fluentd_handler_enabled``
785 Set to true to enable ``FluentHandler`` for all Openstack services
786
787* ``openstack_ossyslog_handler_enabled``
788 Set to true to enable ``OSSysLogHandler`` for all Openstack services
789
790Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
791are available.
792
793Also, it is possible to configure this with pillar:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400794
795.. code-block:: yaml
796
797 keystone:
798 server:
799 logging:
800 log_appender: true
801 log_handlers:
802 watchedfile:
803 enabled: true
804 fluentd:
805 enabled: true
Oleksii Chupryn6529bb32018-02-07 11:55:38 +0200806 ossyslog:
807 enabled: true
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400808
Martin Polreichfa2ae1b2019-12-17 13:50:04 +0100809
810Change default service policy configuration:
811--------------------------------------------
812
813.. code-block:: yaml
814
815 keystone:
816 server:
817 policy:
818 admin_or_token_subject: 'rule:token_subject'
819 service_admin_or_token_subject": 'rule:service_or_admin'
820 # Add key without value to remove line from policy.json
821 identity:get_region:
822
Jiri Broulik59000e92017-02-06 18:14:06 +0100823Usage
824=====
825
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300826#. Apply the :command:`keystone.client.service` state.
827#. Apply the :command:`keystone.client` state.
Jiri Broulik59000e92017-02-06 18:14:06 +0100828
829
Oleksii Grudev5707e5c2018-06-18 17:31:22 +0300830Fernet-keys rotation without gluster
831------------------------------------
832
833In the future fernet keys supposed to be rotated with rsync+ssh instead of using glusterfs. By default it is assumed
834that the script will run on primary control node (ctl01) and will rotate and transfer fernet keys to secondary
835controller nodes (ctl02, ctl03). Following parameter should be set on cluster level:
836
837keystone_node_role
838
839and fernet_rotation_driver should be set to 'rsync'
840
841By default this parameter is set to "secondary" on system level along with other parameters:
842.. code-block:: yaml
843
844 keystone:
845 server:
846 role: ${_param:keystone_node_role}
847 tokens:
848 fernet_sync_nodes_list:
849 control02:
850 name: ctl02
851 enabled: True
852 control03:
853 name: ctl03
854 enabled: True
855 fernet_rotation_driver: rsync
856
857Prior to running keystone salt states ssh key should be generated and its public part should be placed on secondary controllers.
858It can be accomplished by running following orchestration state before keystone states:
859
860salt-run state.orchestrate keystone.orchestrate.deploy
861
862Currently the default fernet rotation driver is a shared filesystem
863
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300864Enable x509 and ssl communication between Keystone and Galera cluster.
865---------------------
866By default communication between Keystone and Galera is unsecure.
867
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300868keystone:
869 server:
870 database:
871 x509:
872 enabled: True
873
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300874You able to set custom certificates in pillar:
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300875
876keystone:
877 server:
878 database:
879 x509:
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300880 cacert: (certificate content)
881 cert: (certificate content)
882 key: (certificate content)
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300883
884You can read more about it here:
885 https://docs.openstack.org/security-guide/databases/database-access-control.html
886
Oleksandr Shyshko70341eb2019-02-21 12:51:25 +0000887Enable security compliance policies.
888-----------------------------------
889By default security compliance policies disabled. You are able to define follow params independency each other.
890
891Notice: To ignore `change_password_upon_first_use` requirement for specific users, such as service users,
892set the `options` attribute `ignore_change_password_upon_first_use`
893to `True` for the desired user via the update user API
894
895Notice: Symbol "$" should have escape character and looks like "$$".
896
897.. code-block:: yaml
898
899keystone:
900 server:
901 security_compliance:
Oleksandr Shyshko75dcd682019-04-19 11:50:49 +0300902 disable_user_account_days_inactive: 365
903 lockout_failure_attempts: 60
Oleksandr Shyshko70341eb2019-02-21 12:51:25 +0000904 lockout_duration: 600
Oleksandr Shyshko75dcd682019-04-19 11:50:49 +0300905 password_expires_days: 730
906 unique_last_password_count: 5
Oleksandr Shyshko70341eb2019-02-21 12:51:25 +0000907 minimum_password_age: 0
Oleksandr Shyshko75dcd682019-04-19 11:50:49 +0300908 password_regex: '^[a-zA-Z0-9~!@#%^&\*_=+]{32,}$$'
909 password_regex_description: |
910 'Your password could contains capital letters, lowercase letters, digits, symbols "~ ! @ # % ^ & * _ = +" and have a minimum length of 32 characters'
911 change_password_upon_first_use: False
Oleksandr Shyshko2a274ba2019-02-27 15:02:30 +0000912
913Define extra user options.
914-------------------------
915
916 To ignore `change_password_upon_first_use` requirement for specific users,
917such as service users, set the `options` attribute `ignore_change_password_upon_first_use`
918to `True` for the desired user via the update user API.
919
920 To ignore `password_expires_days` requirement for specific users,
921such as service users, set the `options` attribute `ignore_password_expiry`
922to `True` for the desired user via the update user API.
923
924 To ignore `lockout_failure_attempts` requirement for specific users,
925such as service users, set the `options` attribute `ignore_lockout_failure_attempts`
926to `True` for the desired user via the update user API.
927
928 Also If there exists a user who should not be able to change her own password via
929the keystone password change API, keystone supports setting that user’s option `lock_password`
930to True via the user update API.
931
932#For release since Q
933.. code-block:: yaml
934
935keystone:
936 client:
937 resources:
938 v3:
939 users:
940 cinder:
941 options:
942 ignore_change_password_upon_first_use: True
943 ignore_password_expiry: False
944 ignore_lockout_failure_attempts: False
945 lock_password: True
946.. code-block::
947
948#For all early releases
949.. code-block:: yaml
950
951keystone:
952 client:
953 server:
954 identity:
955 project:
956 service:
957 user:
958 cinder:
959 options:
960 ignore_change_password_upon_first_use: True
961 ignore_password_expiry: False
962 ignore_lockout_failure_attempts: False
963 lock_password: True
964.. code-block::
965
Oleksandr Bryndziidf239652019-02-26 15:38:54 +0200966Enhanced max_active_keys setup
967------------------------------
968
969Rotating keys too frequently, or with ``[fernet_tokens] max_active_keys`` set too low,
970will cause tokens to become invalid prior to their expiration. As tokens may be fetched
971beyond their initial expiration period, keys should not be fully rotated within the
972period of ``[token] expiration`` + ``[token] allow_expired_window`` seconds to prevent the
973tokens becoming unavailable. As an example, the max_active_keys default value can be
974adjusted according to the following specified values:
975``[token] allow_expired_window`` = 86400 (24 hours)
976``[token] expiration`` = 3600 (1 hour)
977rotation_frequency = 1 (1 hour)
978``[fernet_token]max_active_keys`` = (24 + 1)/1 + 2 = 27
979
980.. code-block:: yaml
981
982 keystone:
983 server:
984 ...
985 tokens:
986 engine: fernet
987 expiration: 3600
988 allow_expired_window: 86400
989 max_active_keys: 27
990 ...
991
Oleksandr Bryndziic1b11f02019-05-02 15:40:31 +0300992Keystone configmap setup:
993---------------
994# Default type:
995.. code-block:: yaml
996
997 keystone:
998 server:
999 configmap:
1000 DEFAULT:
1001 debug: true
1002 rate_limit_except_level: debug
1003 auth:
1004 methods: 'external,password,token'
1005 tokenless_auth:
1006 trusted_issuer: 'O=Mirantis,L=Prague,CN=Salt Master CA,C=cz'
1007
1008.. code-block::
1009
1010
1011# type: 'MultiOpt' for multiline values:
1012.. code-block:: yaml
1013
1014 keystone:
1015 server:
1016 configmap:
1017 tokenless_auth:
1018 trusted_issuer:
1019 type: 'MultiOpt'
1020 values:
1021 value1: 'O=Mirantis,L=Prague,CN=Salt Master CA,C=cz'
1022 value2: 'O=Mirantis,L=Kharkiv,CN=Salt Master CA2,C=ua'
1023
1024.. code-block::
1025
rootef7061b2019-05-27 14:58:46 +00001026Setup auth urls for oidc:
1027---------------
1028.. code-block:: yaml
1029
1030 keystone:
1031 server:
1032 federation:
1033 oidc:
1034 idp_protocols_auth_url: '/v3/OS-FEDERATION/identity_providers/.*?/protocols/oidc/auth_url'
1035 idp_protocols_websso_url: '/v3/OS-FEDERATION/identity_providers/.*?/protocols/oidc/websso_url'
1036 websso_url: '/v3/OS-FEDERATION/websso/oidc_url'
1037
1038
1039.. code-block::
1040
Taras Khlivnyak89d65be2021-08-28 10:09:20 +03001041
1042Change files/directories permissions for keystone service:
Taras Khlivnyak45c36d72021-08-19 10:57:43 +03001043=======================================
Taras Khlivnyak89d65be2021-08-28 10:09:20 +03001044In order to change file permissions the following should be set:
1045
1046'files' - block to set permissions for files.
Taras Khlivnyak45c36d72021-08-19 10:57:43 +03001047- full path to file
1048- user ( default value is 'root' ) this parameter is optional.
1049- group ( default value is 'keystone' ) this parameter is optional
1050- mode ( default value is '0640' ) this parameter is optional
Taras Khlivnyak89d65be2021-08-28 10:09:20 +03001051
1052'directories' - block to set permissions for directories.
Taras Khlivnyak45c36d72021-08-19 10:57:43 +03001053- full path to directory
1054- user ( default value is 'root' ) this parameter is optional
1055- group ( default value is 'keystone' ) this parameter is optional
1056- mode ( default value is '0750' ) this parameter is optional
1057
1058.. code-block:: yaml
Taras Khlivnyak89d65be2021-08-28 10:09:20 +03001059
Taras Khlivnyak45c36d72021-08-19 10:57:43 +03001060 keystone:
1061 files:
1062 /etc/keystone/keystone.conf:
1063 user: 'root'
1064 group: 'keystone'
1065 mode: '0750'
1066 directories:
1067 /etc/keystone:
1068 user: 'root'
1069 group: 'keystone'
1070 mode: '0750'
1071
1072
Vasyl Saienko52bed882018-09-10 10:52:39 +00001073Upgrades
1074========
1075
1076Each openstack formula provide set of phases (logical bloks) that will help to
1077build flexible upgrade orchestration logic for particular components. The list
1078of phases and theirs descriptions are listed in table below:
1079
1080+-------------------------------+------------------------------------------------------+
1081| State | Description |
1082+===============================+======================================================+
1083| <app>.upgrade.service_running | Ensure that all services for particular application |
1084| | are enabled for autostart and running |
1085+-------------------------------+------------------------------------------------------+
1086| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1087| | disabled for autostart and dead |
1088+-------------------------------+------------------------------------------------------+
1089| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1090| | are installed to latest available version. |
1091| | This will not upgrade data plane packages like qemu |
1092| | and openvswitch as usually minimal required version |
1093| | in openstack services is really old. The data plane |
1094| | packages should be upgraded separately by `apt-get |
1095| | upgrade` or `apt-get dist-upgrade` |
1096| | Applying this state will not autostart service. |
1097+-------------------------------+------------------------------------------------------+
1098| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1099+-------------------------------+------------------------------------------------------+
1100| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1101| | cloud before running upgrade. |
1102| | Only non destructive actions will be applied during |
1103| | this phase. Perform service built in service check |
1104| | like (keystone-manage doctor and nova-status upgrade)|
1105+-------------------------------+------------------------------------------------------+
1106| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1107| | phase resources will be gracefully removed from |
1108| | current node if it is allowed. Services for upgraded |
1109| | application will be set to admin disabled state to |
1110| | make sure node will not participate in resources |
1111| | scheduling. For example on gtw nodes this will set |
1112| | all agents to admin disable state and will move all |
1113| | routers to other agents. |
1114+-------------------------------+------------------------------------------------------+
1115| <app>.upgrade.upgrade | This state will basically upgrade application on |
1116| | particular target. Stop services, render |
1117| | configuration, install new packages, run offline |
1118| | dbsync (for ctl), start services. Data plane should |
1119| | not be affected, only OpenStack python services. |
1120+-------------------------------+------------------------------------------------------+
1121| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1122+-------------------------------+------------------------------------------------------+
1123| <app>.upgrade.post | This phase should be launched only when upgrade of |
1124| | the cloud is completed. Cleanup temporary files, |
1125| | perform other post upgrade tasks. |
1126+-------------------------------+------------------------------------------------------+
1127| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1128| | operations, verify do not have dead network |
1129| | agents/compute services) |
1130+-------------------------------+------------------------------------------------------+
1131
1132
Jakub Pavlikffc280d2016-05-20 11:19:14 +02001133Documentation and Bugs
Ales Komarek74a3ba62016-10-05 12:16:52 +02001134======================
Filip Pytloun943d6882015-10-06 16:28:32 +02001135
Jakub Pavlikffc280d2016-05-20 11:19:14 +02001136To learn how to deploy OpenStack Salt, consult the documentation available
1137online at:
1138
1139 https://wiki.openstack.org/wiki/OpenStackSalt
1140
1141In the unfortunate event that bugs are discovered, they should be reported to
1142the appropriate bug tracker. If you obtained the software from a 3rd party
1143operating system vendor, it is often wise to use their own bug tracker for
1144reporting problems. In all other cases use the master OpenStack bug tracker,
1145available at:
1146
1147 http://bugs.launchpad.net/openstack-salt
1148
1149Developers wishing to work on the OpenStack Salt project should always base
1150their work on the latest formulas code, available from the master GIT
1151repository at:
1152
1153 https://git.openstack.org/cgit/openstack/salt-formula-keystone
1154
1155Developers should also join the discussion on the IRC list, at:
1156
1157 https://wiki.openstack.org/wiki/Meetings/openstack-salt