-
Notifications
You must be signed in to change notification settings - Fork 437
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
client.handle_logout_request signs response twice #874
Comments
Hi, This was already reported as #819 for SSO requests - and fixed for SATOSA in IdentityPython/SATOSA#380. I hope a similar fix would also work for logout requests... Cheers, |
I'm unable to test it right now, but will do so when circumstances permit. The code looks good though. |
I was finally able to install the updated code on my SP and connect to the third-party IdP. The solution works as intended. Thanks for the fix. |
When handling an IdP-initiated LogoutRequest, with sign=True and redirect binding, the LogoutResponse gets a signature in an XML element (client.create_logout_response). The XML is then deflated and Base64-encoded, and inserted in a URL as a SAMLResponse parameter. This parameter is then signed again (client.apply_binding), with the signature put in another parameter, and the whole url returned.
This double-signing causes the IdP I'm interfacing with to reject the resulting response, and there's no option to just sign once. When only doing the outermost signing, the response goes through and logout is successful.
Excerpt from client.py:
The innermost signature also contains newline escapes (base64'd string contains '\n'), failing validation with XSD: https://docs.oasis-open.org/security/saml/v2.0/saml-schema-protocol-2.0.xsd, but forgoing the innermost signature makes this a non-issue.
Code Version
7.2.1
Expected Behavior
An option is present to sign in xml, sign in urlparam, or both
Current Behavior
Only signature in both places can be done.
Possible Solution
Add option in method signature, or an explanation why both signatures are necessary.
Steps to Reproduce
It's likely that this behavior is intended, but some IdPs reject the response, necessitating an option to sign just once.
The text was updated successfully, but these errors were encountered: