rohe/pysaml2 — pull request #16 by lorenzogil (2012-12-20 19:15:47+00:00)
Title: Send the signature of a request in the query string instead of embeded in the SAMLRequest

According to http://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf the Message Encoding of the HTTP Redirect Binding is urn:oasis:names:tc:SAML:2.0:bindings:URL-Encoding:DEFLATE by default.

Under this encoding any signature in the SAML protocol message (see line 578 of the above document) MUST be removed and a new signature covering the encoded data as specified above MUST be attached (see line 592).

This patch does exactly that.

The only thing I'm not totally happy with my patch is that it introduces a new dependency: PyCrypto. I know pysaml2 already use xmlsec1 and M2Crypto but I couldn't implement the RSA-SHA1 signature using these libraries and that's why I used PyCrypto. It is probably doable with M2Crypto but the lack of documentation and my own knowledge was an issue here.