-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ability to define logout_endpoint and its binding in order to generate a proper metadata file #159
base: master
Are you sure you want to change the base?
Conversation
…Redirect, Default:HTTP-Redirect) to fix the generated metadata file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Changing the default behavior of create_metadata
seems like test cases might break.
Lines 65 to 70 in 9395913
METADATA = | |
saml2.create_metadata( | |
'https://sp.example.com/metadata.xml', | |
'https://sp.example.com/assert', | |
[CERT_1], | |
[CERT_1, CERT_2]) |
Is it possible to fix those cases and add ones to test the changing of Binding and Location?
Co-authored-by: Mark Cabanero <[email protected]>
@@ -79,8 +79,8 @@ create_metadata = (entity_id, assert_endpoint, signing_certificates, encryption_ | |||
.concat encryption_cert_descriptors | |||
.concat [ | |||
'md:SingleLogoutService': | |||
'@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' | |||
'@Location': assert_endpoint | |||
'@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:' + logout_binding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logout_binding should be validated with a whitelist
'@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' | ||
'@Location': assert_endpoint | ||
'@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:' + logout_binding | ||
'@Location': logout_endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logout_endpoint should be validated if it is a valid URL
In the previous version the SingleLogoutService Location is the same as Assertion Location, which is wrong because both can be different. Also it was added the ability to choose the binding of SingleLogoutService which can be "HTTP-POST" and "HTTP-Redirect"