<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 11/4/14 11:29 PM, Jason Novotny
wrote:<br>
</div>
<blockquote cite="mid:5459A7BB.8030103@gmail.com" type="cite">
<pre wrap="">
^A}^B<82><FD><?xml version="1.0" encoding="UTF-8"?><samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
AssertionConsumerServiceIndex="0"
AssertionConsumerServiceURL=<a class="moz-txt-link-rfc2396E" href="https://alpha.advisorservices.com/servlet/advisor/samlssologin/">"https://alpha.advisorservices.com/servlet/advisor/samlssologin/"</a>
ForceAuthn="true" ID="_ab8203e72b5be4ce" IsPassive="true"
IssueInstant="2014-09-08T16:51:29.649Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
ProviderName=<a class="moz-txt-link-rfc2396E" href="https://www.advisorservices.com/">"https://www.advisorservices.com/"</a>
Version="2.0"><saml:Issuer
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"><a class="moz-txt-link-freetext" href="https://www.advisorservices.com/">https://www.advisorservices.com/</a></saml:Issuer><samlp:NameIDPolicy
AllowCreate="true"/></samlp:AuthnRequest>
As you can see, there are 5 bytes at the beginning that I cleared away
with my parseDocument1 method, but of course that's a terrible hack. I
just can't quite understand how those bytes get there..</pre>
</blockquote>
<br>
On the inbound: No mystery. Looks like it's the HTTP Redirect
binding. Consult the SAML 2 binding spec - it's not just
Base64-encoded, it's also DEFLATEd. <br>
<br>
OpenSAML has a full set of decoder and encoders which handle the
details of the bindings. We don't have good docs on this aspect of
the library, but the unit tests should be illustrative. Here's the
one for SAML 2 Redirect binding:<br>
<br>
<a class="moz-txt-link-freetext" href="http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/test/java/org/opensaml/saml2/binding/decoding/HTTPRedirectDeflateDecoderTest.java?revision=1534&view=markup">http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/test/java/org/opensaml/saml2/binding/decoding/HTTPRedirectDeflateDecoderTest.java?revision=1534&view=markup</a><br>
<br>
<br>
<br>
<blockquote cite="mid:5459A7BB.8030103@gmail.com" type="cite">
<pre wrap="">
and the
SAMLResponse that I send out apparently is not decoded into proper
XML.
</pre>
</blockquote>
<br>
<br>
Same thing, our encoder impls are the easiest route. E.g. for SAML
2 POST binding:<br>
<br>
<br>
<a class="moz-txt-link-freetext" href="http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/test/java/org/opensaml/saml2/binding/encoding/HTTPPostEncoderTest.java?revision=1674&view=markup">http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/test/java/org/opensaml/saml2/binding/encoding/HTTPPostEncoderTest.java?revision=1674&view=markup</a><br>
<br>
<br>
</body>
</html>