Skip to content

Conversation

bradenmacdonald
Copy link
Contributor

Currently, if one wishes to generate SAML metadata using:

saml_settings = OneLogin_Saml2_Settings(config)
metadata = saml_settings.get_sp_metadata()

an error will occur if your settings do not specify a singleLogoutService URL in the config. This is meant to be optional, but the settings parser always adds an empty singleLogoutService dict to the settings dict, which gets interpreted by other parts of the code as meaning that singleLogoutService should be used. The fix checks for the presence of settings['singleLogoutService']['url'], which should only be present when the user actually wants to use a singleLogoutService.


This is a contribution from edX, developed by OpenCraft as part of bringing integrated SAML support to the edX platform, via a new python-social-auth SAML backend.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.9% when pulling b1234fd on open-craft:edx1-sls-optional into c44971e on onelogin:master.

pitbulk added a commit that referenced this pull request May 8, 2015
Fix creation of metadata with no SLS, when using settings.get_sp_metadata()
@pitbulk pitbulk merged commit b753ea7 into SAML-Toolkits:master May 8, 2015
@bradenmacdonald bradenmacdonald deleted the edx1-sls-optional branch May 8, 2015 19:35
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