Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miguelfreitas93
Copy link

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"

Copy link
Member

@mcab mcab left a 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.

saml2/test/saml2.coffee

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?

README.md Outdated Show resolved Hide resolved
@mcab mcab self-assigned this Feb 3, 2021
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
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants