Write/Read opensaml Assertion to/from XML file

Brent Putman putmanb at georgetown.edu
Wed Feb 1 19:26:12 GMT 2012



On 2/1/12 3:20 AM, Luis Rodríguez Fernández wrote:
> Hi Jose, 
>
>  1. Writing: you can do it "manually".
>     See http://stackoverflow.com/questions/6681083/consume-samlresponse-token/9080912#9080912
>


The OP's question(s) were about reading/writing SAML from/to a file, and
about signature generation and validation.  I don't see anything in that
page that relates to either of those things.



>  1. Signature:
>       *   Sign: 
>
>


Just for the benefit of the archives and other people:  I don't want to
be harsh, but these examples are not correct.  These code snippets
illustrate how to use the Java Signature class to implement the
primitive operations of signing and validation over a byte sequence. 
SAML signatures are XML Signatures, and encompass considerably more than
that. That's one of main purposes of the OpenSAML library (in addition
to general support for XML-Java language binding).  The exceptions are
the "simple sign" mechanisms, which are raw signatures over some "blob"
of data, such as defined for the HTTP Redirect DEFLATE and HTTP
Post-SimpleSign bindings.  However, these examples are not even correct
for those cases.  Generally, the complexity is in how you construct the
actual byte[] that you are going to sign.

So just FYI.

--Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20120201/c5809eaf/attachment.html 


More information about the dev mailing list