keystonemiddleware/keystonemiddleware
Matthew Edmonds 75fbc5910a only make token invalid when it really is
The auth_token middleware was marking a token invalid in the cache
on any otherwise-uncaught exception, not only when it has really
determined that the token is invalid. This will fix that by being
better about using the InvalidToken exception only when the token is
really invalid, and only marking invalid in the cache when that
exception occurs.

This fix uncovered a bug in the auth_token unit test
test_composite_auth_delay_invalid_service_and_user_tokens, so that has
been addressed as well. It was attempting to use "invalid-user-token",
which was not initialized, where it meant to use "invalid-token". This
was leading to a NoMockAddress exception. Prior to this fix, the code
turned all unexpected exceptions into InvalidToken exceptions, masking
this issue.

It also uncovered DeprecationWarnings raised in _identity.py for usage
of logging.warn rather than logging.warning in py34. That has also
been fixed. As above, prior to this fix those would have been turned
into InvalidToken exceptions (incorrectly).

Change-Id: I2e487fb02c9171f743ecc1f4f230b29a5e96212d
Closes-Bug: #1488267
(cherry picked from commit 7dcbdf7748)
2015-09-30 21:39:35 +00:00
..
auth_token only make token invalid when it really is 2015-09-30 21:39:35 +00:00
echo Refactor: extract echo_app from enclosing class 2015-05-06 14:29:02 +01:00
openstack Remove install_venv_common and fix typo in memorycache 2015-06-16 01:34:12 +00:00
tests only make token invalid when it really is 2015-09-30 21:39:35 +00:00
__init__.py Moving middleware to new location 2014-06-19 15:50:41 -07:00
audit.py Docstring updates 2015-09-10 16:50:24 -05:00
ec2_token.py Switch from oslo.config to oslo_config 2015-01-18 07:54:03 -06:00
i18n.py Drop use of 'oslo' namespace package 2015-04-28 19:37:43 +00:00
opts.py Break default auth plugin into file 2015-02-26 10:01:15 +11:00
s3_token.py Prevent a UnicodeDecodeError in the s3token middleware 2015-06-18 13:13:59 +02:00