test REMOTE_USER does not authenticate
if external (and all other methods) are missing this test ensures that a request with REMOTE_USER set that the token would come through as unauthenticated Change-Id: I08a0117773bd4efd8e220306de7ba82df73f7403
This commit is contained in:
parent
d4fe9a6f7a
commit
b5576ad69b
|
@ -2373,6 +2373,23 @@ class TestAuthJSON(test_v3.RestfulTestCase):
|
|||
self.post('/auth/tokens', body=auth_data, expected_status=401)
|
||||
|
||||
|
||||
class TestAuthJSONExternal(test_v3.RestfulTestCase):
|
||||
content_type = 'json'
|
||||
|
||||
def config_overrides(self):
|
||||
self.config_fixture.config(group='auth', methods='')
|
||||
|
||||
def test_remote_user_no_method(self):
|
||||
api = auth.controllers.Auth()
|
||||
context, auth_info, auth_context = self.build_external_auth_request(
|
||||
self.default_domain_user['name'])
|
||||
self.assertRaises(exception.Unauthorized,
|
||||
api.authenticate,
|
||||
context,
|
||||
auth_info,
|
||||
auth_context)
|
||||
|
||||
|
||||
class TestAuthXML(TestAuthJSON):
|
||||
content_type = 'xml'
|
||||
|
||||
|
|
Loading…
Reference in New Issue