keystonemiddleware/keystonemiddleware
Brant Knudson c97be0a9ee Fix auth_token does version request for no token
When a request came in with no token and the auth_token middleware
wasn't configured with an auth version, a request would be made to
fetch the versions supported by the server. This causes problems in
projects that have unit tests using the auth_token middleware because
they didn't expect to have an Identity server running.

The fix for this is to refactor the identity version handling to a
strategy pattern.

There were 2 subclasses of _IdentityServer in auth_token, one for
V2 and one for V3. This is excessive since there's only a couple of
methods that are needed and not all the _IdentityServer class. Using
the pricipal of preferring composition over inheritance, the code to
handle V2/V3 is moved into a simpler strategy pattern. This also
moves code out of the AuthProtocol class which is too complicated
already, and it allows more refactoring since the _IdentityServer
reference can be created and passed to extracted classes for them
to use.

Closes-Bug: #1404294
Change-Id: If69fbb73bea268b96e4b1e9ad81a736495a2b58a
2014-12-19 10:48:36 -06:00
..
openstack add context to keystonemiddleware 2014-10-23 13:58:32 +00:00
tests Fix auth_token does version request for no token 2014-12-19 10:48:36 -06:00
__init__.py Moving middleware to new location 2014-06-19 15:50:41 -07:00
_memcache_crypt.py I18n 2014-10-29 20:59:51 -05:00
_memcache_pool.py I18n 2014-10-29 20:59:51 -05:00
audit.py documentation for audit middleware 2014-12-15 16:44:29 -05:00
auth_token.py Fix auth_token does version request for no token 2014-12-19 10:48:36 -06:00
ec2_token.py Update oslo-incubator and switch to oslo.{utils,serialization} 2014-09-30 10:26:19 +02:00
i18n.py I18n 2014-10-29 20:59:51 -05:00
opts.py Convert authentication into a plugin 2014-10-28 10:24:32 +01:00
s3_token.py Merge "Docstring cleanup" 2014-11-26 05:43:16 +00:00