keystonemiddleware/keystonemiddleware
Brian Cline f55b0334b9 Fix AttributeError on cached-invalid token checks
Starting with v4.5.0, if a token is found to be cached, but is cached
with an invalid state, the middleware attempts to log a debug message
indicating as much.

However, the logger it attempts to use does not exist and results in
an AttributeError. As a result, this yields HTTP 500 responses once
the invalid token gets cached and is attempted to be used again,
rather than the expected 401.

This fixes the reference and adds a test to ensure the expected log
entry ends up in the logger so that this condition in
AuthProtocol.fetch_token now gets coverage.

Change-Id: Ie391973ea5893531c0b590ffba2d9de7f7f19d94
Closes-bug: #1584289
2016-05-21 01:14:34 -05:00
..
auth_token Fix AttributeError on cached-invalid token checks 2016-05-21 01:14:34 -05:00
echo Fix D204 PEP257 violation and enable D301 and D209 2016-05-06 16:36:15 +00:00
openstack Revert "Disable memory caching of tokens" 2016-01-22 09:52:39 -06:00
tests Fix AttributeError on cached-invalid token checks 2016-05-21 01:14:34 -05:00
__init__.py Moving middleware to new location 2014-06-19 15:50:41 -07:00
audit.py Fix D202: No blank lines allowed after function docstring (PEP257) 2016-05-17 00:23:30 +00:00
ec2_token.py Fix D200: One-line docstring should fit on one line with quotes (PEP257) 2016-05-17 00:23:48 +00:00
fixture.py Fix D202: No blank lines allowed after function docstring (PEP257) 2016-05-17 00:23:30 +00:00
i18n.py Drop use of 'oslo' namespace package 2015-04-28 19:37:43 +00:00
opts.py Split oslo_config and list all opts 2016-02-11 13:00:28 +11:00
s3_token.py Merge "s3token config with auth URI" 2016-05-11 01:09:55 +00:00