OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 1 | ===== |
| 2 | Usage |
| 3 | ===== |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 4 | |
Jakub Pavlik | ffc280d | 2016-05-20 11:19:14 +0200 | [diff] [blame] | 5 | Keystone provides authentication, authorization and service discovery |
| 6 | mechanisms via HTTP primarily for use by projects in the OpenStack family. It |
| 7 | is most commonly deployed as an HTTP interface to existing identity systems, |
| 8 | such as LDAP. |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 9 | |
| 10 | From Kilo release Keystone v3 endpoint has definition without version in url |
| 11 | |
| 12 | .. code-block:: bash |
| 13 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 14 | +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+ |
| 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 Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 19 | |
| 20 | Sample pillars |
| 21 | ============== |
| 22 | |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 23 | .. caution:: |
Adam Tengler | 7c66c88 | 2016-03-14 19:35:49 +0100 | [diff] [blame] | 24 | |
Jakub Pavlik | ffc280d | 2016-05-20 11:19:14 +0200 | [diff] [blame] | 25 | 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 Tengler | 7c66c88 | 2016-03-14 19:35:49 +0100 | [diff] [blame] | 28 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 29 | Full stacked Keystone: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 30 | |
| 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 |
| 44 | roles: |
| 45 | - admin |
| 46 | - Member |
| 47 | - image_manager |
| 48 | bind: |
| 49 | address: 0.0.0.0 |
| 50 | private_address: 127.0.0.1 |
| 51 | private_port: 35357 |
| 52 | public_address: 127.0.0.1 |
| 53 | public_port: 5000 |
| 54 | api_version: 2.0 |
| 55 | region: RegionOne |
| 56 | database: |
| 57 | engine: mysql |
| 58 | host: '127.0.0.1' |
| 59 | name: 'keystone' |
| 60 | password: 'LfTno5mYdZmRfoPV' |
| 61 | user: 'keystone' |
| 62 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 63 | Keystone public HTTPS API: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 64 | |
| 65 | .. code-block:: yaml |
| 66 | |
| 67 | keystone: |
| 68 | server: |
| 69 | enabled: true |
| 70 | version: juno |
| 71 | ... |
| 72 | services: |
| 73 | - name: nova |
| 74 | type: compute |
| 75 | description: OpenStack Compute Service |
| 76 | user: |
| 77 | name: nova |
| 78 | password: password |
| 79 | bind: |
| 80 | public_address: cloud.domain.com |
| 81 | public_protocol: https |
| 82 | public_port: 8774 |
| 83 | internal_address: 10.0.0.20 |
| 84 | internal_port: 8774 |
| 85 | admin_address: 10.0.0.20 |
| 86 | admin_port: 8774 |
| 87 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 88 | Keystone with custom policies. Keys with specified rules |
| 89 | are created or set to this value if they already exists. |
| 90 | Keys with no value (like our ``existing_rule``) are deleted |
| 91 | from the policy file: |
Adam Tengler | b1ebaca | 2017-05-04 21:06:08 +0000 | [diff] [blame] | 92 | |
| 93 | .. code-block:: yaml |
| 94 | |
| 95 | keystone: |
| 96 | server: |
| 97 | enabled: true |
| 98 | policy: |
| 99 | new_rule: "rule:admin_required" |
| 100 | existing_rule: |
| 101 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 102 | Keystone memcached storage for tokens: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 103 | |
| 104 | .. code-block:: yaml |
| 105 | |
| 106 | keystone: |
| 107 | server: |
| 108 | enabled: true |
| 109 | version: juno |
| 110 | ... |
| 111 | token_store: cache |
| 112 | cache: |
| 113 | engine: memcached |
| 114 | host: 127.0.0.1 |
| 115 | port: 11211 |
| 116 | services: |
| 117 | ... |
| 118 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 119 | Keystone clustered memcached storage for tokens: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 120 | |
| 121 | .. code-block:: yaml |
| 122 | |
| 123 | keystone: |
| 124 | server: |
| 125 | enabled: true |
| 126 | version: juno |
| 127 | ... |
| 128 | token_store: cache |
| 129 | cache: |
| 130 | engine: memcached |
| 131 | members: |
| 132 | - host: 192.160.0.1 |
| 133 | port: 11211 |
| 134 | - host: 192.160.0.2 |
| 135 | port: 11211 |
| 136 | services: |
| 137 | ... |
| 138 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 139 | Keystone client: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 140 | |
| 141 | .. code-block:: yaml |
| 142 | |
| 143 | keystone: |
| 144 | client: |
| 145 | enabled: true |
| 146 | server: |
| 147 | host: 10.0.0.2 |
| 148 | public_port: 5000 |
| 149 | private_port: 35357 |
| 150 | service_token: 'token' |
| 151 | admin_tenant: admin |
| 152 | admin_name: admin |
| 153 | admin_password: 'passwd' |
| 154 | |
| 155 | Keystone cluster |
| 156 | |
| 157 | .. code-block:: yaml |
| 158 | |
| 159 | keystone: |
| 160 | control: |
| 161 | enabled: true |
| 162 | provider: |
| 163 | os15_token: |
| 164 | host: 10.0.0.2 |
| 165 | port: 35357 |
| 166 | token: token |
| 167 | os15_tcp_core_stg: |
| 168 | host: 10.0.0.5 |
| 169 | port: 5000 |
| 170 | tenant: admin |
| 171 | name: admin |
| 172 | password: password |
| 173 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 174 | Keystone fernet tokens for OpenStack Kilo release: |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 175 | |
| 176 | .. code-block:: yaml |
| 177 | |
| 178 | keystone: |
| 179 | server: |
| 180 | ... |
| 181 | tokens: |
| 182 | engine: fernet |
Jakub Pavlik | 6b0b74a | 2016-09-01 10:49:14 +0200 | [diff] [blame] | 183 | max_active_keys: 3 |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 184 | ... |
| 185 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 186 | Keystone auth methods: |
Oleksii Chupryn | 6fd899f | 2017-04-21 10:20:51 +0300 | [diff] [blame] | 187 | |
| 188 | .. code-block:: yaml |
| 189 | |
| 190 | keystone: |
| 191 | server: |
| 192 | ... |
| 193 | auth_methods: |
| 194 | - external |
| 195 | - password |
| 196 | - token |
| 197 | - oauth1 |
| 198 | ... |
| 199 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 200 | Keystone domain with LDAP backend, using SQL for |
| 201 | role/project assignment: |
Filip Pytloun | 6b9ec2b | 2016-01-12 13:52:01 +0100 | [diff] [blame] | 202 | |
| 203 | .. code-block:: yaml |
| 204 | |
| 205 | keystone: |
| 206 | server: |
| 207 | domain: |
Ramon Melero | 96ff912 | 2017-08-15 11:02:50 -0500 | [diff] [blame] | 208 | external: |
| 209 | description: "Testing domain" |
| 210 | backend: ldap |
| 211 | assignment: |
| 212 | backend: sql |
| 213 | ldap: |
| 214 | url: "ldaps://idm.domain.com" |
| 215 | suffix: "dc=cloud,dc=domain,dc=com" |
| 216 | # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com |
| 217 | uid: keystone |
| 218 | password: password |
Filip Pytloun | 6b9ec2b | 2016-01-12 13:52:01 +0100 | [diff] [blame] | 219 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 220 | Use driver aliases for drivers instead of class path's: |
Dzmitry Stremkouski | a0db50f | 2018-03-26 20:41:36 +0200 | [diff] [blame] | 221 | |
| 222 | .. code-block:: yaml |
| 223 | |
| 224 | keystone: |
| 225 | server: |
| 226 | domain: |
| 227 | test: |
| 228 | description: "Test domain" |
| 229 | backend: ldap |
| 230 | assignment: |
| 231 | backend: sql |
| 232 | driver: sql |
| 233 | identity: |
| 234 | backend: ldap |
| 235 | driver: keystone.identity.backends.ldap.Identity |
| 236 | ldap: |
| 237 | url: "ldaps://idm.domain.com" |
| 238 | ... |
| 239 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 240 | Using LDAP backend for default domain: |
Filip Pytloun | 1abfdd7 | 2016-01-18 11:35:17 +0100 | [diff] [blame] | 241 | |
| 242 | .. code-block:: yaml |
| 243 | |
| 244 | keystone: |
| 245 | server: |
| 246 | backend: ldap |
| 247 | assignment: |
| 248 | backend: sql |
| 249 | ldap: |
Ales Komarek | aabbda6 | 2016-03-15 08:38:35 +0100 | [diff] [blame] | 250 | url: "ldaps://idm.domain.com" |
| 251 | suffix: "dc=cloud,dc=domain,dc=com" |
| 252 | # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com |
Filip Pytloun | 1abfdd7 | 2016-01-18 11:35:17 +0100 | [diff] [blame] | 253 | uid: keystone |
Ales Komarek | aabbda6 | 2016-03-15 08:38:35 +0100 | [diff] [blame] | 254 | password: password |
| 255 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 256 | Using LDAP backend for default domain with |
| 257 | ``user_enabled`` field emulation: |
kovchynnykov | 7412508 | 2018-02-05 13:17:43 +0200 | [diff] [blame] | 258 | |
| 259 | .. code-block:: yaml |
| 260 | |
| 261 | keystone: |
| 262 | server: |
| 263 | backend: ldap |
| 264 | assignment: |
| 265 | backend: sql |
| 266 | ldap: |
| 267 | url: "ldap://idm.domain.com" |
| 268 | suffix: "ou=Openstack Service Users,o=domain.com" |
| 269 | bind_user: keystone |
| 270 | password: password |
| 271 | # Define LDAP "group" object class and "membership" attribute |
| 272 | group_objectclass: groupOfUniqueNames |
| 273 | group_member_attribute: uniqueMember |
| 274 | # User will receive "enabled" attribute basing on membership in "os-user-enabled" group |
| 275 | user_enabled_emulation: True |
| 276 | user_enabled_emulation_dn: "cn=os-user-enabled,ou=Openstack,o=domain.com" |
| 277 | user_enabled_emulation_use_group_config: True |
| 278 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 279 | If the members of the group ``objectclass`` are user IDs |
| 280 | rather than DNs, set ``group_members_are_ids`` to ``true``. |
| 281 | This is the case when using ``posixGroup` as the group |
| 282 | ``objectclass`` and ``OpenDirectory``: |
Aleksieiev, Oleksii | 3f1d7a5 | 2018-06-06 15:14:29 -0700 | [diff] [blame] | 283 | |
| 284 | .. code-block:: yaml |
| 285 | |
| 286 | keystone: |
| 287 | server: |
| 288 | backend: ldap |
| 289 | assignment: |
| 290 | backend: sql |
| 291 | ldap: |
| 292 | url: "ldaps://idm.domain.com" |
| 293 | suffix: "dc=cloud,dc=domain,dc=com" |
| 294 | # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com |
| 295 | uid: keystone |
| 296 | password: password |
| 297 | group_members_are_ids: True |
| 298 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 299 | Simple service endpoint definition (defaults to ``RegionOne``): |
Ales Komarek | aabbda6 | 2016-03-15 08:38:35 +0100 | [diff] [blame] | 300 | |
| 301 | .. code-block:: yaml |
| 302 | |
| 303 | keystone: |
| 304 | server: |
| 305 | service: |
| 306 | ceilometer: |
| 307 | type: metering |
| 308 | description: OpenStack Telemetry Service |
| 309 | user: |
| 310 | name: ceilometer |
| 311 | password: password |
| 312 | bind: |
| 313 | ... |
| 314 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 315 | Region-aware service endpoints definition: |
Ales Komarek | aabbda6 | 2016-03-15 08:38:35 +0100 | [diff] [blame] | 316 | |
| 317 | .. code-block:: yaml |
| 318 | |
| 319 | keystone: |
| 320 | server: |
| 321 | service: |
| 322 | ceilometer_region01: |
| 323 | service: ceilometer |
| 324 | type: metering |
| 325 | region: region01 |
| 326 | description: OpenStack Telemetry Service |
| 327 | user: |
| 328 | name: ceilometer |
| 329 | password: password |
| 330 | bind: |
| 331 | ... |
| 332 | ceilometer_region02: |
| 333 | service: ceilometer |
| 334 | type: metering |
| 335 | region: region02 |
| 336 | description: OpenStack Telemetry Service |
| 337 | bind: |
| 338 | ... |
| 339 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 340 | Enable Ceilometer notifications: |
Jakub Pavlik | 72e31d6 | 2016-04-08 16:26:57 +0200 | [diff] [blame] | 341 | |
| 342 | .. code-block:: yaml |
| 343 | |
| 344 | keystone: |
| 345 | server: |
| 346 | notification: true |
| 347 | message_queue: |
| 348 | engine: rabbitmq |
| 349 | host: 127.0.0.1 |
| 350 | port: 5672 |
| 351 | user: openstack |
| 352 | password: password |
| 353 | virtual_host: '/openstack' |
| 354 | ha_queues: true |
Filip Pytloun | 1abfdd7 | 2016-01-18 11:35:17 +0100 | [diff] [blame] | 355 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 356 | Client-side RabbitMQ HA setup: |
Jakub Pavlik | 205ef80 | 2016-12-14 12:48:42 +0100 | [diff] [blame] | 357 | |
| 358 | .. code-block:: yaml |
| 359 | |
| 360 | keystone: |
| 361 | server: |
| 362 | .... |
| 363 | message_queue: |
| 364 | engine: rabbitmq |
| 365 | members: |
| 366 | - host: 10.0.16.1 |
| 367 | - host: 10.0.16.2 |
| 368 | - host: 10.0.16.3 |
| 369 | user: openstack |
| 370 | password: pwd |
| 371 | virtual_host: '/openstack' |
| 372 | .... |
| 373 | |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 374 | Client-side RabbitMQ TLS configuration: |
| 375 | |
| 376 | | |
| 377 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 378 | By default system-wide CA certs are used. Nothing should be |
| 379 | specified except ``ssl.enabled``. |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 380 | |
| 381 | .. code-block:: yaml |
| 382 | |
| 383 | keystone: |
| 384 | server: |
| 385 | .... |
| 386 | message_queue: |
| 387 | ssl: |
| 388 | enabled: True |
| 389 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 390 | Use ``cacert_file`` option to specify the CA-cert |
| 391 | file path explicitly: |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 392 | |
| 393 | .. code-block:: yaml |
| 394 | |
| 395 | keystone: |
| 396 | server: |
| 397 | .... |
| 398 | message_queue: |
| 399 | ssl: |
| 400 | enabled: True |
| 401 | cacert_file: /etc/ssl/rabbitmq-ca.pem |
| 402 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 403 | To manage content of the ``cacert_file`` use the ``cacert`` |
| 404 | option: |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 405 | |
| 406 | .. code-block:: yaml |
| 407 | |
| 408 | keystone: |
| 409 | server: |
| 410 | .... |
| 411 | message_queue: |
| 412 | ssl: |
| 413 | enabled: True |
| 414 | cacert: | |
| 415 | |
| 416 | -----BEGIN CERTIFICATE----- |
| 417 | ... |
| 418 | -----END CERTIFICATE------- |
| 419 | |
| 420 | cacert_file: /etc/openstack/rabbitmq-ca.pem |
| 421 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 422 | .. note:: |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 423 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 424 | * The ``message_queue.port`` is set to ``5671`` (AMQPS) by |
| 425 | default if ``ssl.enabled=True``. |
| 426 | * Use ``message_queue.ssl.version`` if you need to specify |
| 427 | protocol version. By default, is ``TLSv1`` for python < |
| 428 | 2.7.9 and ``TLSv1_2`` for version above. |
Kirill Bespalov | 0098445 | 2017-08-01 17:44:11 +0300 | [diff] [blame] | 429 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 430 | Enable CADF audit notification: |
Petr Michalec | 98fc6d6 | 2016-12-03 11:30:35 +0100 | [diff] [blame] | 431 | |
| 432 | .. code-block:: yaml |
| 433 | |
| 434 | keystone: |
| 435 | server: |
| 436 | notification: true |
| 437 | notification_format: cadf |
| 438 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 439 | Run Keystone under Apache: |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 440 | |
| 441 | .. code-block:: yaml |
| 442 | |
| 443 | keystone: |
| 444 | server: |
| 445 | service_name: apache2 |
| 446 | apache: |
| 447 | server: |
| 448 | enabled: true |
| 449 | default_mpm: event |
| 450 | site: |
| 451 | keystone: |
| 452 | enabled: true |
| 453 | type: keystone |
| 454 | name: wsgi |
| 455 | host: |
| 456 | name: ${linux:network:fqdn} |
| 457 | modules: |
| 458 | - wsgi |
| 459 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 460 | Enable SAML2 Federated keystone: |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 461 | |
| 462 | .. code-block:: yaml |
| 463 | |
| 464 | keystone: |
| 465 | server: |
Oleksii Chupryn | 6fd899f | 2017-04-21 10:20:51 +0300 | [diff] [blame] | 466 | auth_methods: |
| 467 | - password |
| 468 | - token |
| 469 | - saml2 |
Oleksii Chupryn | ebe09a5 | 2017-04-21 11:08:14 +0300 | [diff] [blame] | 470 | federation: |
Oleksii Chupryn | fcecf19 | 2017-04-21 12:20:46 +0300 | [diff] [blame] | 471 | saml2: |
| 472 | protocol: saml2 |
| 473 | remote_id_attribute: Shib-Identity-Provider |
| 474 | shib_url_scheme: https |
| 475 | shib_compat_valid_user: 'on' |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 476 | federation_driver: keystone.contrib.federation.backends.sql.Federation |
Oleksii Chupryn | 5f110b0 | 2017-03-30 09:54:27 +0300 | [diff] [blame] | 477 | federated_domain_name: Federated |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 478 | trusted_dashboard: |
Oleksii Chupryn | fcecf19 | 2017-04-21 12:20:46 +0300 | [diff] [blame] | 479 | - https://${_param:cluster_public_host}/horizon/auth/websso/ |
Alexander Noskov | 78b81e0 | 2016-12-05 16:20:50 +0400 | [diff] [blame] | 480 | apache: |
| 481 | server: |
| 482 | pkgs: |
| 483 | - apache2 |
| 484 | - libapache2-mod-shib2 |
| 485 | modules: |
| 486 | - wsgi |
| 487 | - shib2 |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 488 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 489 | Enable OIDC Federated Keystone: |
Oleksii Chupryn | fcecf19 | 2017-04-21 12:20:46 +0300 | [diff] [blame] | 490 | |
| 491 | .. code-block:: yaml |
| 492 | |
| 493 | keystone: |
| 494 | server: |
| 495 | auth_methods: |
| 496 | - password |
| 497 | - token |
| 498 | - oidc |
| 499 | federation: |
| 500 | oidc: |
| 501 | protocol: oidc |
| 502 | remote_id_attribute: HTTP_OIDC_ISS |
| 503 | remote_id_attribute_value: https://accounts.google.com |
| 504 | oidc_claim_prefix: "OIDC-" |
| 505 | oidc_response_type: id_token |
| 506 | oidc_scope: "openid email profile" |
| 507 | oidc_provider_metadata_url: https://accounts.google.com/.well-known/openid-configuration |
| 508 | oidc_client_id: <openid_client_id> |
| 509 | oidc_client_secret: <openid_client_secret> |
| 510 | oidc_crypto_passphrase: openstack |
| 511 | oidc_redirect_uri: https://key.example.com:5000/v3/auth/OS-FEDERATION/websso/oidc/redirect |
| 512 | oidc_oauth_introspection_endpoint: https://www.googleapis.com/oauth2/v1/tokeninfo |
| 513 | oidc_oauth_introspection_token_param_name: access_token |
| 514 | oidc_oauth_remote_user_claim: user_id |
| 515 | oidc_ssl_validate_server: 'off' |
| 516 | federated_domain_name: Federated |
| 517 | federation_driver: keystone.contrib.federation.backends.sql.Federation |
| 518 | trusted_dashboard: |
| 519 | - https://${_param:cluster_public_host}/auth/websso/ |
| 520 | apache: |
| 521 | server: |
| 522 | pkgs: |
| 523 | - apache2 |
| 524 | - libapache2-mod-auth-openidc |
| 525 | modules: |
| 526 | - wsgi |
| 527 | - auth_openidc |
| 528 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 529 | .. note:: Ubuntu Trusty repository doesn't contain |
| 530 | ``libapache2-mod-auth-openidc`` package. Additonal |
| 531 | repository should be added to the source list. |
Oleksii Chupryn | fcecf19 | 2017-04-21 12:20:46 +0300 | [diff] [blame] | 532 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 533 | Use a custom identity driver with custom options: |
mnederlof | 5d9ccac | 2017-03-02 15:47:50 +0100 | [diff] [blame] | 534 | |
| 535 | .. code-block:: yaml |
| 536 | |
| 537 | keystone: |
| 538 | server: |
| 539 | backend: k2k |
| 540 | k2k: |
| 541 | auth_url: 'https://keystone.example.com/v2.0' |
| 542 | read_user: 'example_user' |
| 543 | read_pass: 'password' |
| 544 | read_tenant_id: 'admin' |
| 545 | identity_driver: 'sql' |
| 546 | id_prefix: 'k2k:' |
| 547 | domain: 'default' |
| 548 | caching: true |
| 549 | cache_time: 600 |
| 550 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 551 | Enable CORS parameters: |
Ondrej Smola | 16e1bb7 | 2017-04-18 23:37:49 +0200 | [diff] [blame] | 552 | |
| 553 | .. code-block:: yaml |
| 554 | |
| 555 | keystone: |
| 556 | server: |
| 557 | cors: |
| 558 | allowed_origin: https:localhost.local,http:localhost.local |
| 559 | expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 560 | allow_methods: GET,PUT,POST,DELETE,PATCH |
| 561 | allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 562 | allow_credentials: True |
| 563 | max_age: 86400 |
| 564 | |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 565 | Keystone client |
| 566 | --------------- |
| 567 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 568 | Service endpoints enforcement with service token: |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 569 | |
| 570 | .. code-block:: yaml |
| 571 | |
| 572 | keystone: |
| 573 | client: |
| 574 | enabled: true |
| 575 | server: |
| 576 | keystone01: |
| 577 | admin: |
| 578 | host: 10.0.0.2 |
| 579 | port: 35357 |
| 580 | token: 'service_token' |
| 581 | service: |
| 582 | nova: |
| 583 | type: compute |
| 584 | description: OpenStack Compute Service |
| 585 | endpoints: |
| 586 | - region: region01 |
| 587 | public_address: 172.16.10.1 |
| 588 | public_port: 8773 |
| 589 | public_path: '/v2' |
| 590 | internal_address: 172.16.10.1 |
| 591 | internal_port: 8773 |
| 592 | internal_path: '/v2' |
| 593 | admin_address: 172.16.10.1 |
| 594 | admin_port: 8773 |
| 595 | admin_path: '/v2' |
| 596 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 597 | Project, users, roles enforcement with admin user: |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 598 | |
| 599 | .. code-block:: yaml |
| 600 | |
| 601 | keystone: |
| 602 | client: |
| 603 | enabled: true |
| 604 | server: |
| 605 | keystone01: |
| 606 | admin: |
| 607 | host: 10.0.0.2 |
| 608 | port: 5000 |
Jiri Broulik | 1703fcc | 2017-02-13 17:42:29 +0100 | [diff] [blame] | 609 | project: admin |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 610 | user: admin |
| 611 | password: 'passwd' |
Jiri Broulik | 1703fcc | 2017-02-13 17:42:29 +0100 | [diff] [blame] | 612 | region_name: RegionOne |
| 613 | protocol: https |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 614 | roles: |
| 615 | - admin |
| 616 | - member |
| 617 | project: |
| 618 | tenant01: |
| 619 | description: "test env" |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 620 | quota: |
| 621 | instances: 100 |
| 622 | cores: 24 |
| 623 | ram: 151200 |
| 624 | floating_ips: 50 |
| 625 | fixed_ips: -1 |
| 626 | metadata_items: 128 |
| 627 | injected_files: 5 |
| 628 | injected_file_content_bytes: 10240 |
| 629 | injected_file_path_bytes: 255 |
| 630 | key_pairs: 100 |
| 631 | security_groups: 20 |
| 632 | security_group_rules: 40 |
| 633 | server_groups: 20 |
| 634 | server_group_members: 20 |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 635 | user: |
| 636 | user01: |
| 637 | email: jdoe@domain.com |
| 638 | is_admin: true |
| 639 | password: some |
| 640 | user02: |
| 641 | email: jdoe2@domain.com |
| 642 | password: some |
| 643 | roles: |
| 644 | - custom-roles |
| 645 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 646 | Multiple servers example: |
Richard Felkl | 5ff315e | 2017-02-01 23:26:23 +0100 | [diff] [blame] | 647 | |
| 648 | .. code-block:: yaml |
| 649 | |
Jiri Broulik | 1703fcc | 2017-02-13 17:42:29 +0100 | [diff] [blame] | 650 | keystone: |
| 651 | client: |
| 652 | enabled: true |
| 653 | server: |
| 654 | keystone01: |
| 655 | admin: |
| 656 | host: 10.0.0.2 |
| 657 | port: 5000 |
| 658 | project: 'admin' |
| 659 | user: admin |
| 660 | password: 'workshop' |
| 661 | region_name: RegionOne |
| 662 | protocol: https |
| 663 | keystone02: |
| 664 | admin: |
| 665 | host: 10.0.0.3 |
| 666 | port: 5000 |
| 667 | project: 'admin' |
| 668 | user: admin |
| 669 | password: 'workshop' |
| 670 | region_name: RegionOne |
Richard Felkl | 5ff315e | 2017-02-01 23:26:23 +0100 | [diff] [blame] | 671 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 672 | Tenant quotas: |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 673 | |
| 674 | .. code-block:: yaml |
| 675 | |
| 676 | keystone: |
| 677 | client: |
| 678 | enabled: true |
| 679 | server: |
| 680 | keystone01: |
| 681 | admin: |
| 682 | host: 10.0.0.2 |
| 683 | port: 5000 |
Jiri Broulik | 1703fcc | 2017-02-13 17:42:29 +0100 | [diff] [blame] | 684 | project: admin |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 685 | user: admin |
| 686 | password: 'passwd' |
Jiri Broulik | 1703fcc | 2017-02-13 17:42:29 +0100 | [diff] [blame] | 687 | region_name: RegionOne |
| 688 | protocol: https |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 689 | roles: |
| 690 | - admin |
| 691 | - member |
| 692 | project: |
| 693 | tenant01: |
| 694 | description: "test env" |
| 695 | quota: |
| 696 | instances: 100 |
| 697 | cores: 24 |
| 698 | ram: 151200 |
| 699 | floating_ips: 50 |
| 700 | fixed_ips: -1 |
| 701 | metadata_items: 128 |
| 702 | injected_files: 5 |
| 703 | injected_file_content_bytes: 10240 |
| 704 | injected_file_path_bytes: 255 |
| 705 | key_pairs: 100 |
| 706 | security_groups: 20 |
| 707 | security_group_rules: 40 |
| 708 | server_groups: 20 |
| 709 | server_group_members: 20 |
| 710 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 711 | Extra config params in ``keystone.conf`` |
| 712 | (since Mitaka release): |
Oleksii Chupryn | 4fec213 | 2017-04-03 17:35:28 +0300 | [diff] [blame] | 713 | |
| 714 | .. code-block:: yaml |
| 715 | |
| 716 | keystone: |
| 717 | server: |
| 718 | .... |
| 719 | extra_config: |
| 720 | ini_section1: |
| 721 | param1: value |
| 722 | param2: value |
| 723 | ini_section2: |
| 724 | param1: value |
| 725 | param2: value |
| 726 | .... |
| 727 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 728 | Configuration of ``policy.json`` file: |
Dmitry Ukov | f58264b | 2017-04-20 23:08:42 +0200 | [diff] [blame] | 729 | |
| 730 | .. code-block:: yaml |
| 731 | |
Dmitry Ukov | f58264b | 2017-04-20 23:08:42 +0200 | [diff] [blame] | 732 | keystone: |
| 733 | server: |
| 734 | .... |
| 735 | policy: |
| 736 | admin_or_token_subject: 'rule:admin_required or rule:token_subject' |
| 737 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 738 | Manage ``os-cloud-config`` yml with ``keystone.client``: |
Vasyl Saienko | d190259 | 2018-03-30 12:51:54 +0300 | [diff] [blame] | 739 | |
| 740 | .. code-block:: yaml |
| 741 | |
| 742 | keystone: |
| 743 | client: |
| 744 | os_client_config: |
| 745 | enabled: true |
| 746 | cfgs: |
| 747 | root: |
| 748 | file: /root/.config/openstack/clouds.yml |
| 749 | content: |
| 750 | clouds: |
| 751 | admin_identity: |
| 752 | region_name: RegioneOne |
| 753 | auth: |
| 754 | username: admin |
| 755 | password: secretpassword |
| 756 | user_domain_name: Default |
| 757 | project_name: admin |
| 758 | project_domain_name: Default |
| 759 | auth_url: "http://1.2.3.4:5000" |
| 760 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 761 | Setting up default admin project name and domain: |
Andrey | 4b287f0 | 2017-10-03 18:40:25 -0500 | [diff] [blame] | 762 | |
| 763 | .. code-block:: yaml |
| 764 | |
Andrey | 4b287f0 | 2017-10-03 18:40:25 -0500 | [diff] [blame] | 765 | keystone: |
| 766 | server: |
| 767 | .... |
| 768 | admin_project: |
| 769 | name: "admin" |
| 770 | domain: "default" |
| 771 | |
Dmitry Kalashnik | 494a17d | 2017-12-06 16:55:55 +0400 | [diff] [blame] | 772 | Enhanced logging with logging.conf |
| 773 | ---------------------------------- |
| 774 | |
| 775 | By default logging.conf is disabled. |
| 776 | |
| 777 | That is possible to enable per-binary logging.conf with new variables: |
Dmitry Kalashnik | 494a17d | 2017-12-06 16:55:55 +0400 | [diff] [blame] | 778 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 779 | * ``openstack_log_appender`` |
| 780 | Set to true to enable ``log_config_append`` for all OpenStack services |
Dmitry Kalashnik | 494a17d | 2017-12-06 16:55:55 +0400 | [diff] [blame] | 781 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 782 | * ``openstack_fluentd_handler_enabled`` |
| 783 | Set to true to enable ``FluentHandler`` for all Openstack services |
| 784 | |
| 785 | * ``openstack_ossyslog_handler_enabled`` |
| 786 | Set to true to enable ``OSSysLogHandler`` for all Openstack services |
| 787 | |
| 788 | Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler`` |
| 789 | are available. |
| 790 | |
| 791 | Also, it is possible to configure this with pillar: |
Dmitry Kalashnik | 494a17d | 2017-12-06 16:55:55 +0400 | [diff] [blame] | 792 | |
| 793 | .. code-block:: yaml |
| 794 | |
| 795 | keystone: |
| 796 | server: |
| 797 | logging: |
| 798 | log_appender: true |
| 799 | log_handlers: |
| 800 | watchedfile: |
| 801 | enabled: true |
| 802 | fluentd: |
| 803 | enabled: true |
Oleksii Chupryn | 6529bb3 | 2018-02-07 11:55:38 +0200 | [diff] [blame] | 804 | ossyslog: |
| 805 | enabled: true |
Dmitry Kalashnik | 494a17d | 2017-12-06 16:55:55 +0400 | [diff] [blame] | 806 | |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 807 | Usage |
| 808 | ===== |
| 809 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 810 | #. Apply the :command:`keystone.client.service` state. |
| 811 | #. Apply the :command:`keystone.client` state. |
Jiri Broulik | 59000e9 | 2017-02-06 18:14:06 +0100 | [diff] [blame] | 812 | |
| 813 | |
Oleksii Grudev | 5707e5c | 2018-06-18 17:31:22 +0300 | [diff] [blame] | 814 | Fernet-keys rotation without gluster |
| 815 | ------------------------------------ |
| 816 | |
| 817 | In the future fernet keys supposed to be rotated with rsync+ssh instead of using glusterfs. By default it is assumed |
| 818 | that the script will run on primary control node (ctl01) and will rotate and transfer fernet keys to secondary |
| 819 | controller nodes (ctl02, ctl03). Following parameter should be set on cluster level: |
| 820 | |
| 821 | keystone_node_role |
| 822 | |
| 823 | and fernet_rotation_driver should be set to 'rsync' |
| 824 | |
| 825 | By default this parameter is set to "secondary" on system level along with other parameters: |
| 826 | .. code-block:: yaml |
| 827 | |
| 828 | keystone: |
| 829 | server: |
| 830 | role: ${_param:keystone_node_role} |
| 831 | tokens: |
| 832 | fernet_sync_nodes_list: |
| 833 | control02: |
| 834 | name: ctl02 |
| 835 | enabled: True |
| 836 | control03: |
| 837 | name: ctl03 |
| 838 | enabled: True |
| 839 | fernet_rotation_driver: rsync |
| 840 | |
| 841 | Prior to running keystone salt states ssh key should be generated and its public part should be placed on secondary controllers. |
| 842 | It can be accomplished by running following orchestration state before keystone states: |
| 843 | |
| 844 | salt-run state.orchestrate keystone.orchestrate.deploy |
| 845 | |
| 846 | Currently the default fernet rotation driver is a shared filesystem |
| 847 | |
Oleksandr Shyshko | 9b152eb | 2018-08-31 10:23:34 +0300 | [diff] [blame^] | 848 | Enable x509 and ssl communication between Keystone and Galera cluster. |
| 849 | --------------------- |
| 850 | By default communication between Keystone and Galera is unsecure. |
| 851 | |
| 852 | You able to set custom certificates in pillar: |
| 853 | server: |
| 854 | database: |
| 855 | x509: |
| 856 | enabled: True |
| 857 | |
| 858 | keystone: |
| 859 | server: |
| 860 | database: |
| 861 | x509: |
| 862 | cacert (certificate content) |
| 863 | cert (certificate content) |
| 864 | key (certificate content) |
| 865 | |
| 866 | You can read more about it here: |
| 867 | https://docs.openstack.org/security-guide/databases/database-access-control.html |
| 868 | |
Jakub Pavlik | ffc280d | 2016-05-20 11:19:14 +0200 | [diff] [blame] | 869 | Documentation and Bugs |
Ales Komarek | 74a3ba6 | 2016-10-05 12:16:52 +0200 | [diff] [blame] | 870 | ====================== |
Filip Pytloun | 943d688 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 871 | |
Jakub Pavlik | ffc280d | 2016-05-20 11:19:14 +0200 | [diff] [blame] | 872 | To learn how to deploy OpenStack Salt, consult the documentation available |
| 873 | online at: |
| 874 | |
| 875 | https://wiki.openstack.org/wiki/OpenStackSalt |
| 876 | |
| 877 | In the unfortunate event that bugs are discovered, they should be reported to |
| 878 | the appropriate bug tracker. If you obtained the software from a 3rd party |
| 879 | operating system vendor, it is often wise to use their own bug tracker for |
| 880 | reporting problems. In all other cases use the master OpenStack bug tracker, |
| 881 | available at: |
| 882 | |
| 883 | http://bugs.launchpad.net/openstack-salt |
| 884 | |
| 885 | Developers wishing to work on the OpenStack Salt project should always base |
| 886 | their work on the latest formulas code, available from the master GIT |
| 887 | repository at: |
| 888 | |
| 889 | https://git.openstack.org/cgit/openstack/salt-formula-keystone |
| 890 | |
| 891 | Developers should also join the discussion on the IRC list, at: |
| 892 | |
| 893 | https://wiki.openstack.org/wiki/Meetings/openstack-salt |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 894 | |
| 895 | Documentation and Bugs |
| 896 | ====================== |
| 897 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 898 | * http://salt-formulas.readthedocs.io/ |
| 899 | Learn how to install and update salt-formulas |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 900 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 901 | * https://github.com/salt-formulas/salt-formula-keystone/issues |
| 902 | In the unfortunate event that bugs are discovered, report the issue to the |
| 903 | appropriate issue tracker. Use the Github issue tracker for a specific salt |
| 904 | formula |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 905 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 906 | * https://launchpad.net/salt-formulas |
| 907 | For feature requests, bug reports, or blueprints affecting the entire |
| 908 | ecosystem, use the Launchpad salt-formulas project |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 909 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 910 | * https://launchpad.net/~salt-formulas-users |
| 911 | Join the salt-formulas-users team and subscribe to mailing list if required |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 912 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 913 | * https://github.com/salt-formulas/salt-formula-keystone |
| 914 | Develop the salt-formulas projects in the master branch and then submit pull |
| 915 | requests against a specific formula |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 916 | |
OlgaGusarenko | a9fac4b | 2018-07-30 19:17:24 +0300 | [diff] [blame] | 917 | * #salt-formulas @ irc.freenode.net |
| 918 | Use this IRC channel in case of any questions or feedback which is always |
| 919 | welcome |
Filip Pytloun | 4cc5c0f | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 920 | |