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

Allow for namespaces not defined or outside root element in single sign out requests #39

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

Conversation

draffensperger
Copy link

@chuckbjones and @njfranck: our CAS server had a very similar issue to yours that you fix in #33

Our server's specific problem was that it didn't define the xmlns:saml namespace at all and so its request XML looked something like this:

<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="abcd" Version="2.0" IssueInstant="2015-09-17T15:12:20Z">
 <saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@NOT_USED@</saml:NameID>
 <samlp:SessionIndex>ST-foo-bar</samlp:SessionIndex>
</samlp:LogoutRequest>

This pull request integrates the fix for namespaces not defined on the root node as well as those not defined at all. I kept the inject_params method mostly similar (though slightly tidied) so that the specs would pass, and it seems that update_param actually has slightly different semantics as it leaves env unchanged.

The approach in add_namespaces of adding namespaces then re-parsing the XML seems to be what's needed, as per this Stack Overflow thread.

@dlindahl could you take a look at this?

@draffensperger draffensperger changed the title Gracefully parse logout request params if XML namespaces missing or outside root element Gracefully parse single sign out request params if namespaces missing or outside root element Sep 19, 2015
@draffensperger draffensperger changed the title Gracefully parse single sign out request params if namespaces missing or outside root element Allow for namespaces not defined or outside root element in single sign out requests Sep 19, 2015
@dlindahl
Copy link
Owner

I no longer have access to a CAS server and therefore am no longer fit to maintain this project.

If you would like to volunteer to be a maintainer of this project, please let me know by opening an Issue.

@jgribonvald
Copy link

This PR can't be merged ? Else wich project to use ? Thanks

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.

4 participants