Commit Graph

11 Commits

Author SHA1 Message Date
Samuel de Medeiros Queiroz cc58b62f11 Move auth token opts calculation into auth_token
The list of all auth token opts is currently calculated in opts.py.
That module is included in auth_token/__init__.py, which in turn owns
some opts that are needed by the former.

This creates a circular import dependency.

In order to fix such situation, this patch proposes to move the auth
token opts calculation into auth_token/__init__.py, so that it will
no longer need opts.py.

Co-Authored-By: Alfredo Moralejo <amoralej@redhat.com>

Closes-Bug: #1591913
Change-Id: If67d8bdb68a5ab9c07b960ad0111e2310ad82c83
2016-06-13 14:03:23 -03:00
Jamie Lennox f8c150a9cc Create a Config object
The _conf_get ugliness in auth_token middleware has been around for a
long time now to handle the abstraction from different oslo.config
options and the paste overrides. This logic is now also being needed in
other middlewares. Extract this into a common config object that has a
better interface and is easier to work with.

Change-Id: I8b8a1427bc527e43bb1baec25a881d93df3f93cc
2016-06-10 18:21:56 +00:00
Jamie Lennox f0965c955d Split oslo_config and list all opts
The intent of providing the list_auth_token_opts function was to provide
the oslo_config sample config file generator a list of options to
include in its sample files. However, services like zaqar have come to
rely on the list_auth_token_opts to list all the options that may be
consumed by auth_token middleware so that they can register them against
a non-global oslo_config object.

By removing deprecated options from the list_auth_token_opts we remove
these options from the config objects that the services use, however by
keeping them we will forever have deprecated options in sample config
files.

To split these two functionalities create a new function that lists the
options available for sample config files and update the entrypoint to
reflect this. This function is currently private because it should only
need to be accessed via entrypoint. The old deprecated options are then
added back to the original list_auth_token_opts function.

Closes-Bug: #1533932
Change-Id: I2aae5483c9309ab75985298c8de5b6f24cbc0f0d
2016-02-11 13:00:28 +11:00
Jamie Lennox d202ed827e Use keystoneauth
With the release of keystoneauth we should use that instead of
keystoneclient in auth_token middleware.

Change-Id: Id0876e90a1373ba31e4ec23d5275618149ca36d1
2015-11-23 12:03:00 +11:00
Jenkins d13756ebd1 Merge "Ensure auth_plugin options are in generated CONF" 2015-10-30 08:11:17 +00:00
Dolph Mathews 7e362fd349 Make __all__ immutable
Using a mutable type implies that it's acceptable for the set of
publicly-accessible attributes to be mutated at runtime, which defeats
their intended purpose of documenting the public interface. Tuples are
immutable.

Change-Id: Ib3ab93224ba240040b08ece481ef5ba620c3f658
2015-10-01 17:04:43 +00:00
Jamie Lennox c99f2d947c Ensure auth_plugin options are in generated CONF
Add the common auth plugin options to the list of options used to
generate sample config files.

Closes-Bug: #1497082
Change-Id: I22d704ebee18b6e9208126812e41aee6cc8331ef
2015-09-20 18:55:38 +10:00
Jamie Lennox 9ba567e32c Break default auth plugin into file
Extract the default auth plugin into its own file. In future I'd like to
move the whole auth loading process into this file - however I have some
ideas for changing around how config works I'd like to do first.

Change-Id: I90c2f9e55947a436374ff54465e15caffdf9925d
Implements: bp refactor-extract-module
2015-02-26 10:01:15 +11:00
Brant Knudson 3e1bee7100 Switch from oslo.config to oslo_config
oslo_config moved out of the oslo namespace.

bp drop-namespace-packages

Change-Id: Ia8b9b2a47bcfabe7a6aea67f243285028c981ba2
2015-01-18 07:54:03 -06:00
Jamie Lennox f21ccea42c Convert authentication into a plugin
Extract all the information that is related to auth and make it into a
keystoneclient auth plugin. This will make it easier later to substitute
this auth plugin for another auth plugin.

Blueprint: pluggable-auth
Change-Id: Ibf9bc1dbf26f396bac09a96398a6467afc30f529
2014-10-28 10:24:32 +01:00
Zhi Yan Liu 62093bfc85 Expose an entry point to list auth_token middleware config options
Register a 'keystonemiddleware.auth_token' entry point in the
oslo.config.opts namespace which, when called, returns a list of the
configuration options which may be registered by the project at runtime.

The idea here is that the sample config file generator can query this
and include the returned options in the sample config file of any
applications which use the middleware, e.g. currently the options
were listed in 'keystone_authtoken' section for those major projects.

Related-Change-Id: I15686708fc9460948a58cfea3d18dae40ba1fda9
Related-Change-Id: Ic28351258652d2ea38974e2f4d1aa6b1d3dd7192
Related-Change-Id: I76043b08e2872867e5af2a5ac902e4d092fda5c8
Related-Bug: #1300546

Change-Id: Iae31856d5886ee78786972d80c7c103c3460a2b3
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-07-02 13:23:09 -07:00