How to verify the message signature with HTTPRedirectDeflateDecoder?

Cantor, Scott cantor.2 at osu.edu
Thu Apr 7 11:45:12 EDT 2016


> I'm using OpenSAML 2.5.1 to implement SSO using SAML 2.0 Redirect
> Binding/Profile.

That's a really bad idea. V2 is end of life functionally now and security support ends in 4 months. So you're about to own a lot of code, if you continue down that path.

> I've got the sending and receiving working. But I noticed that
> the receiving side did not seem to verify the signature. Of course I may not
> have set it up to do so, but I don't know how. I have the following questions
> and hope someone knowledgeable would provide some help and poitners.

You really should be using Shibboleth or some other existing implementation, and not implementing this yourself. But the Shibboleth code base is the best extant set of sample code there is if you're going to do this. I can point to exactly the code that implements this in V3, but I'm not going to go searching for anything in V2.

You also haven't indicated what trust model you're trying to implement, and if you don't know the answer to that, you would need to do a lot more reading and learning before attempting to implement SAML. This is a pretty decent intro to the topic. [1]

> - Based on my understanding, SAML 2.0 Redirect Binding does not send the
> signing certificate. Is this correct? I need it for encrypting the returned SAML
> assertion.

That is correct, yes. You can't assume that it would be the same key, even if you did receive it that way.

> - If the above it true, how does the receiving side obtain the right cert and
> verify the signature? Metadata? What if I did not implement Metadata?

If you don't implement metadata, then you are just going to reinvent it yourself, so conceptually that's the answer either way.

> - How is HTTPRedirectDeflateDecoder designed to work in regard to
> signature verification? Is it out side the scope of
> HTTPRedirectDeflateDecoder, or there is some setup to be done in order to
> get the signature verified?

It's outside the scope, you run message handlers over the message to perform security checks and one of those is a handler to verify a binding level signature against a trust engine. 

I urge you to reconsider implementing this from scratch unless you're building an SP in Java (but an SP would only need to verify a redirect signature for logout).

-- Scott

[1] https://wiki.shibboleth.net/confluence/display/CONCEPT/TrustManagement



More information about the dev mailing list