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 support for inflating (decompressing) response SAML messages. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zarusz
Copy link
Contributor

@zarusz zarusz commented Mar 10, 2016

The identity provider we're using (PingFederate) sends the response SignOn message compressed using the deflate algorithm. This change adds support and a configuration switch to enable response message decompression for such providers.

Have a look at Base64 Decode + Inflate decode on this website:
https://www.samltool.com/decode.php

Let me know if any questions.

@AndersAbel
Copy link

The deflate/inflate step is part of the HTTP Redirect binding, which is normally not used for SAML Responses due to length concerns. The normal binding for incoming responses is the HTTP POST binding that doesn't deflate the data. The inflate step should not be configured, it should be decided based on the binding used. Also note that the signature handling of HTTP Redirect is quite different.

@zarusz
Copy link
Contributor Author

zarusz commented Mar 10, 2016

We'd decided to use HTTP Redirect binding, because the POST binding is not supported by this library. I was getting NotImplementedException and also noticed the handling code was commented out.
Can you please comment why this is so?

Based on your comment for the deflate/inflate when the binding used is REDIRECT it should automatically apply decompression (inflate) instead of being driven by configuration. I can fix this.

@elerch
Copy link
Owner

elerch commented Mar 11, 2016

@zarusz I would like to support POST binding at some point - it should be relatively close. It was commented out because the upstream library I pulled from had a lot of coupling to system.web and I just didn't take the time originally to handle more than what I needed. I'm happy to accept a PR for post support, otherwise I'm not sure when I'll get to it.

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