ironic/ironic/conf
Pavlo Shchelokovskyy f9ea26ebf3 Migrate to using keystoneauth Sessions
We currently construct Keystone client objects directly, which
is no longer the preferred way.  Instead, we should be using Sessions
which allows use of different auth plugins.  This change attempts to
migrate our Keystone usage to this model.

Additionally, we currently rely on the imported keystonemiddleware
auth_token's configuration for all of the Keystone credentials used
by the Ironic service user.  This is bad, as that config is internal
to that library and may change at any time.  Also, the service user
may be using different credentials than the token validator.

This refactors the keystone module to use Sessions.
It attempts to provide some backward compat for users
who have not yet updated their config,
by falling back to the authtoken config section when required.

Operators impact:

- Authentification parameters for each service now should specified in
  the corresponding config section for this service ([glance], [neutron]
  [swift], [inspector]).
  This includes providing both Keystone session-related options
  (timeout, SSL-related ones) and authentification options
  (`auth_type`, `auth_url` and proper options for the auth plugin).

- New config section `service_catalog` for Ironic service user
  credentials, used to resolve Ironic API URL from Keystone catalog.

- If loading from the service config section fails, an attempt is made
  to use respective options from [keystone_authtoken] section as a
  fall-back for backward compatibility.

Implementation details:

- using keystoneauth1 library instead of keystoneclient

- For each service the keystone session is created only once and is
  reused further. This lowers the number of authentification requests
  made to Keystone but implies that only auth plugins that can
  re-authentificate themselves can be used (so no *Token plugins).

This patch does not update the DevStack plugin, in order to test
backwards compatibility with old config options.
DevStack plugin will be modified in a subsequent patch.

Change-Id: I166eebefc1e1335a1a7b632149cf6441512e9d5e
Closes-Bug: #1422632
Related-Bug: #1418341
Related-Bug: #1494776
Co-Authored-By: Adam Gandelman <adamg@ubuntu.com>
2016-08-03 11:24:21 -07:00
..
__init__.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
agent.py Centralize config options - [agent] 2016-07-28 16:19:46 -07:00
api.py Centralize config options - [api] 2016-07-21 11:51:45 -07:00
audit.py Add support for the audit middleware 2016-07-26 11:43:35 -07:00
auth.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
cimc.py Centralize config options - [cimc] 2016-06-16 16:45:51 -07:00
cisco_ucs.py Centralize config options - [cisco_ucs] 2016-06-16 16:47:50 -07:00
conductor.py Centralize config options - [conductor] 2016-06-16 16:56:57 -07:00
console.py Nova-compatible serial console: socat console_utils 2016-07-14 01:09:19 +00:00
database.py Centralize config options - [database] 2016-06-16 17:04:49 -07:00
default.py Centralize config options - [DEFAULT] 2016-07-15 14:05:09 -07:00
deploy.py Centralize config options - [deploy] 2016-07-21 11:57:06 -07:00
dhcp.py Centralize config options - [dhcp] 2016-06-16 17:11:14 -07:00
glance.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
iboot.py Centralize config options - [iboot] 2016-06-24 13:39:32 -07:00
ilo.py Support to validate iLO SSL certificate in iLO drivers 2016-07-18 10:00:16 -07:00
inspector.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
ipmi.py Remove duplicate copyright. 2016-07-21 10:40:26 +03:00
irmc.py Centralize config options - [irmc] 2016-06-27 10:23:09 -07:00
keystone.py Centralize config options - [keystone] 2016-06-27 10:23:09 -07:00
metrics.py Pass agent metrics config via conductor 2016-08-02 17:56:43 +00:00
metrics_statsd.py Pass agent metrics config via conductor 2016-08-02 17:56:43 +00:00
neutron.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
oneview.py Centralize config options - [oneview] 2016-06-27 10:23:09 -07:00
opts.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
seamicro.py Centralize config options - [seamicro] 2016-06-27 10:35:32 -07:00
service_catalog.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
snmp.py Centralize config options - [snmp] 2016-06-30 20:54:04 -07:00
ssh.py Centralize config options - [ssh] 2016-06-30 20:54:04 -07:00
swift.py Migrate to using keystoneauth Sessions 2016-08-03 11:24:21 -07:00
virtualbox.py Centralize config options - [virtualbox] 2016-06-30 20:54:04 -07:00