keystonemiddleware/keystonemiddleware/tests/unit/auth_token
Tim Burke 86904543eb Handle DiscoveryFailure errors
DiscoveryFailures can happen for a variety of reasons, ranging
from service misconfiguration to a keystone outage to a transient
network failure. If we don't catch and handle the failure here,
it will almost certainly cause something further up the WSGI stack
to send a 500 Internal Error (and likely log a traceback).

A log line like

    Unable to validate token: Could not find versioned identity
    endpoints when attempting to authenticate. Please check that
    your auth_url is correct. Unable to establish connection to
    http://keystone:35357: HTTPConnectionPool(host='keystone',
    port=35357): Max retries exceeded with url: / (Caused by
    NewConnectionError('<urllib3.connection.HTTPConnection
    object at 0x7fc53e22e050>: Failed to establish a new
    connection: [Errno 111] ECONNREFUSED',))

should be plenty enough for an operator to assess the situation;
I don't need a 29-frame traceback.

Change-Id: I946388c09b2ca0230d2cef009c679a7ac7c8398f
2018-08-01 23:26:13 +00:00
..
__init__.py Move unit tests into tests.unit 2015-03-11 17:03:54 -05:00
base.py Identify the keystone service when raising 503 2018-02-20 17:32:41 +01:00
test_auth.py use oslo.log instead of logging 2017-01-13 03:24:18 +00:00
test_auth_token_middleware.py Handle DiscoveryFailure errors 2018-08-01 23:26:13 +00:00
test_base_middleware.py Remove kwargs_to_fetch_token 2018-02-22 02:19:06 +00:00
test_cache.py Fix the AttributeError: __exit__ error 2018-02-22 16:31:11 +08:00
test_config.py Rename auth_uri to www_authenticate_uri 2017-10-11 14:00:49 +02:00
test_connection_pool.py Use oslo_cache in auth_token middleware 2017-12-01 16:36:40 -08:00
test_memcache_crypt.py Fix py3 byte/string error 2017-10-11 10:21:06 -05:00
test_request.py Use keystoneauth 2015-11-23 12:03:00 +11:00
test_revocations.py auth_token verify revocation by audit_id 2015-12-17 10:55:58 -06:00
test_signing_dir.py Create signing_dir upon first usage 2016-04-11 11:12:06 -07:00
test_user_auth_plugin.py Pass ?allow_expired 2016-12-15 16:15:35 +00:00