diff options
author | morgan fainberg <morgan.fainberg@gmail.com> | 2018-09-18 10:54:59 -0700 |
---|---|---|
committer | Morgan Fainberg <morgan.fainberg@gmail.com> | 2018-10-09 23:23:03 -0700 |
commit | d97832e8e826e37171b727072c720a9b589998dd (patch) | |
tree | c0da33ed74c8518561731fbd00cbe38790d9d747 /keystone/api/__init__.py | |
parent | 8e33c782320ae1014f9b69b484b5b6c3cf0593f6 (diff) | |
download | keystone-d97832e8e826e37171b727072c720a9b589998dd.tar.gz |
Convert auth to flask native dispatching
Convert the /auth paths to flask native dispatching.
A minor change to additional_urls was implemented to ensure all
urls are added at once instead of individually (causing an over-
write issue within flask as a single resource may only have a
single set of URL mappings).
Alternate URLs now support adding alternate JSON Home rel links.
This is to support the case of OS-FEDERATION auth routes moving
to /auth. The old JSON Home entries must exist but reference
the new paths.
This port includes the following test changes (needed due to the
way flask handles requests and the way requests are passed through
the auth system):
* Implemented keystone.common.render_token (module)
containing render_token_response_from_model and use it instead
of keystone.common.controller.render_token_response_from_model.
Minor differences occur in render_token_response_from_model in
the keystone.common.render_token module, this is simply
for referencing data from flask instead of the request object.
* Test cases have been modified to no longer rely on the auth
controller(s) directly
* Test cases now use "make_request" as a context manager
since authenticate/authenticate_for_token directly
reference the flask contexts and must have an explicit
context pushed.
* Test cases no longer pass request objects into methods
such as authenticate/authenticate_for_token or similar
methods on the auth plugins
* Test cases for federation reference the token model now
where possible instead of the rendered token response.
Rendered token responses are generated where needed.
* Auth Plugin Configuration is done in test core as well.
This is because Auth controller does not exist.
NOTE: This is a massive change, but must of these changes
were now easily uncoupled because of how far reaching auth
is.
Change-Id: I636928102875760726cc3493775a2be48e774fd7
Partial-Bug: #1776504
Diffstat (limited to 'keystone/api/__init__.py')
-rw-r--r-- | keystone/api/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/keystone/api/__init__.py b/keystone/api/__init__.py index 046f098cb..7b5f476fa 100644 --- a/keystone/api/__init__.py +++ b/keystone/api/__init__.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +from keystone.api import auth from keystone.api import credentials from keystone.api import discovery from keystone.api import domains @@ -33,6 +34,7 @@ from keystone.api import system from keystone.api import trusts __all__ = ( + 'auth', 'discovery', 'credentials', 'domains', @@ -58,6 +60,7 @@ __all__ = ( __apis__ = ( discovery, + auth, credentials, domains, endpoints, |