diff options
author | boden <brussell@us.ibm.com> | 2012-10-31 15:34:00 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2012-10-31 15:34:00 -0400 |
commit | f79f701782fa583380138e1fba702fb00bcac52e (patch) | |
tree | c98799d3709c2fcdf679890fa29336f925506f57 /keystone/common/wsgi.py | |
parent | c53ffe59863a02861c3872fbc3190e7e536222a1 (diff) | |
download | keystone-f79f701782fa583380138e1fba702fb00bcac52e.tar.gz keystone-f79f701782fa583380138e1fba702fb00bcac52e.tar.xz keystone-f79f701782fa583380138e1fba702fb00bcac52e.zip |
Implements REMOTE_USER authentication support.
Adds support for non-identity authentication via REMOTE_USER environ
context variable thereby permitting external services (paste pipeline,
web fronting or other) to authenticate a request.
Also fixes a pep8 issue.
This change is in support for blueprint
pluggable-identity-authentication-handlers
Change-Id: Ib0a36b14f135dd87601e3c6d28f7874193d66b34
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r-- | keystone/common/wsgi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 9b42491d..39529bc9 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -199,6 +199,10 @@ class Application(BaseApplication): context = req.environ.get(CONTEXT_ENV, {}) context['query_string'] = dict(req.params.iteritems()) params = req.environ.get(PARAMS_ENV, {}) + if 'REMOTE_USER' in req.environ: + context['REMOTE_USER'] = req.environ['REMOTE_USER'] + elif context.get('REMOTE_USER', None) is not None: + del context['REMOTE_USER'] params.update(arg_dict) # TODO(termie): do some basic normalization on methods |