Fix logout URL rendering

The logout URL was rendered incorrectly. It should be as follows:

https://mellon.example.com/mellon/logout

Similar to how the post response URL is rendered:

https://mellon.example.com/mellon/postResponse
This commit is contained in:
Dmitrii Shcherbakov 2019-02-08 21:38:38 +03:00
parent cf01b5a55e
commit 7d58ad9558
2 changed files with 7 additions and 2 deletions

View File

@ -154,6 +154,10 @@ class KeystoneSAMLMellonConfigurationAdapter(
def sp_post_response_path(self):
return '{}/postResponse'.format(self.mellon_endpoint_path)
@property
def sp_logout_path(self):
return '{}/logout'.format(self.mellon_endpoint_path)
@property
def sp_auth_url(self):
return '{}{}'.format(self.keystone_base_url,
@ -161,7 +165,8 @@ class KeystoneSAMLMellonConfigurationAdapter(
@property
def sp_logout_url(self):
return '{}/logout'.format(self.mellon_endpoint_path)
return '{}{}'.format(self.keystone_base_url,
self.sp_logout_path)
@property
def sp_post_response_url(self):

View File

@ -8,7 +8,7 @@
{{ options.sp_signing_keyinfo }}
</KeyDescriptor>
{% endif %}
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="{{ options.logout_url }}"/>
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="{{ options.sp_logout_url }}"/>
<AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="{{ options.sp_post_response_url }}" index="0"/>
{% for format in options.supported_nameid_formats -%}
<NameIDFormat>{{ format }}</NameIDFormat>