keystoneauth1.tests.unit.extras.saml2 package

Submodules

keystoneauth1.tests.unit.extras.saml2.test_auth_adfs module

class keystoneauth1.tests.unit.extras.saml2.test_auth_adfs.AuthenticateviaADFSTests(*args, **kwargs)

Bases: keystoneauth1.tests.unit.extras.saml2.utils.TestCase

ADDRESS_XPATH = '/s:Envelope/s:Body/trust:RequestSecurityToken/wsp:AppliesTo/wsa:EndpointReference/wsa:Address'
GROUP = 'auth'
NAMESPACES = {'s': 'http://www.w3.org/2003/05/soap-envelope', 'wsa': 'http://www.w3.org/2005/08/addressing', 'wsp': 'http://schemas.xmlsoap.org/ws/2004/09/policy', 'a': 'http://www.w3.org/2005/08/addressing', 'trust': 'http://docs.oasis-open.org/ws-sx/ws-trust/200512', 'o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'}
PASSWORD_XPATH = '/s:Envelope/s:Header/o:Security/o:UsernameToken/o:Password'
PROTOCOL = 'saml2'
TEST_TOKEN = 'fd924d6ee7ca482d87adf36fbd9642f2'
TO_XPATH = '/s:Envelope/s:Header/a:To'
USER_XPATH = '/s:Envelope/s:Header/o:Security/o:UsernameToken/o:Username'
setUp()
test_access_sp_no_cookies_fail()
test_adfs_request_password()
test_adfs_request_to()
test_adfs_request_user()
test_check_valid_token_when_authenticated()
test_end_to_end_workflow()
test_get_adfs_security_token()

Test ADFSPassword._get_adfs_security_token().

test_get_adfs_security_token_authn_fail()

Test proper parsing XML fault after bad authentication.

An exceptions.AuthorizationFailure should be raised including error message from the XML message indicating where was the problem.

test_get_adfs_security_token_bad_response()

Test proper handling HTTP 500 and mangled (non XML) response.

This should never happen yet, keystoneauth1 should be prepared and correctly raise exceptions.InternalServerError once it cannot parse XML fault message

test_prepare_adfs_request_address()
test_prepare_sp_request()
test_send_assertion_to_service_provider_bad_status()

keystoneauth1.tests.unit.extras.saml2.test_auth_saml2 module

class keystoneauth1.tests.unit.extras.saml2.test_auth_saml2.AuthenticateviaSAML2Tests(*args, **kwargs)

Bases: keystoneauth1.tests.unit.extras.saml2.utils.TestCase

GROUP = 'auth'
TEST_TOKEN = '1c46097ae38c441a8ffdfa0a419e2840'
setUp()
test_consumer_url_mismatch()
test_consumer_url_mismatch_success()
test_custom_302_redirection()
test_custom_303_redirection()
test_end_to_end_workflow()
test_fail_basicauth_idp_authentication()
test_get_unscoped_token_when_authenticated()
test_initial_sp_call()

Test initial call, expect SOAP message.

test_initial_sp_call_invalid_response()

Send initial SP HTTP request and receive wrong server response.

test_initial_sp_call_when_saml_authenticated()
test_mising_username_password_in_plugin()
test_send_authn_req_to_idp()
test_send_authn_response_to_sp()

keystoneauth1.tests.unit.extras.saml2.utils module

class keystoneauth1.tests.unit.extras.saml2.utils.TestCase(*args, **kwargs)

Bases: keystoneauth1.tests.unit.utils.TestCase

TEST_URL = 'https://keystone:5000/v3'
setUp()
keystoneauth1.tests.unit.extras.saml2.utils.make_oneline(s)

Module contents