check if tokenless auth is configured before validating

we could reduce the amount of logging that the tokenless
validation performs by simply checking if there are any
trusted issuers before proceeding.

Change-Id: Idcbddf7bf87ada18ee44ae31878201f41c499c7c
Closes-Bug: #1497132
This commit is contained in:
Steve Martinelli 2015-09-18 03:13:43 -04:00
parent 64f1de2c66
commit 1bac1dfb0a

View File

@ -262,6 +262,9 @@ class AuthContextMiddleware(wsgi.Middleware):
:returns: True if client_issuer is trusted; otherwise False
"""
if not CONF.tokenless_auth.trusted_issuer:
return False
client_issuer = env.get(CONF.tokenless_auth.issuer_attribute)
if not client_issuer:
msg = _LI('Cannot find client issuer in env by the '