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

Should support HTTP-Redirect binding for SAML request and HTTP-POST for SAML response #26

Open
yyy opened this issue Feb 15, 2019 · 1 comment

Comments

@yyy
Copy link

yyy commented Feb 15, 2019

Currently, SamlClient.fromMetadata takes a single samlBinding and uses it to both resolve the IDP endpoint and to populate the ProtocolBinding parameter in the AuthnRequest. But I should be able to set these up independently.

@yyy
Copy link
Author

yyy commented Nov 4, 2019

Is this issue going to be addressed?

Currently, I'm having to do a horrible hack to workaround this and #25 :

            // check if SAML request starts with XML declaration: Base64("<?x") = "PD94"
            // which means it's not compressed
            if(samlRequest.startsWith("PD94")) {
                String rawStr = EncodingUtils.decodeB64(samlRequest);

                // this code needs to be reorganized if saml-client fixes #25 and doesn't fix #26
                rawStr = rawStr.replace("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect",
                        "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST");

                byte[] raw = rawStr.getBytes(StandardCharsets.UTF_8);

                byte[] compressed = CompressionUtils.compress(raw, new Deflater(Deflater.DEFLATED, true));
                samlRequest = EncodingUtils.encodeB64(compressed);
            }

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

No branches or pull requests

1 participant