<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:#0041C4}
.MsoChpDefault
        {}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
ol
        {margin-bottom:0in}
ul
        {margin-bottom:0in}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4">Jim,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4">For debugging and tracing interactions with Shib IdP and SP, I find the following tools useful:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"> </span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:11.0pt; font-family:Symbol; color:#0041C4"><span style="">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"><a href="https://rnd.feide.no/simplesaml/module.php/saml2debug/debug.php">https://rnd.feide.no/simplesaml/module.php/saml2debug/debug.php</a> – Decodes into
plain text xml a SAML2 request copied from a redirect or post. Can handle url & base64 encodings.</span></p>
<p class="MsoListParagraph" style="text-indent:-.25in"><span style="font-size:11.0pt; font-family:Symbol; color:#0041C4"><span style="">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"><a href="https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/">https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/</a> – A tool for viewing
SAML messages sent through the browser</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4">Peter Day</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#0041C4"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> users-bounces@shibboleth.net [mailto:users-bounces@shibboleth.net]
<b>On Behalf Of </b>Jim Hoy<br>
<b>Sent:</b> Thursday, July 18, 2013 3:55 PM<br>
<b>To:</b> Shib Users<br>
<b>Subject:</b> Encode/Decode AuthnRequestXML</span></p>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal">I’m trying to programmatically encode and decode AuthnRequest XML. Which technologies are used and what steps would I follow to do this? If I understand correctly, the typical process goes like this:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">To encode:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">1. Convert XML to byte stream</p>
</div>
<div>
<p class="MsoNormal">2. Compress the byte stream</p>
</div>
<div>
<p class="MsoNormal">3. Base64 encode the compressed stream</p>
</div>
<div>
<p class="MsoNormal">4. UrlEncode the Base64 string </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">To decode:</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">1. UrlDecode the string</p>
</div>
<div>
<p class="MsoNormal">2. Base64 Decode the UrlDecoded string</p>
</div>
<div>
<p class="MsoNormal">3. Decompress the Base64</p>
</div>
<div>
<p class="MsoNormal">4. Convert the byte stream to XML</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">When I try to decode the AuthnRequest that we are passing to an IDP, I don’t get anything usable. I’ve tried GZip and .Net’s DeflateStream. Do I have the encoding and decoding process corrent? What compression does shib use? Is the
XML signed with a cert?</p>
</div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This e-mail message (including any attachments) is for the sole use of<br>
the intended recipient(s) and may contain confidential and privileged<br>
information. If the reader of this message is not the intended<br>
recipient, you are hereby notified that any dissemination, distribution<br>
or copying of this message (including any attachments) is strictly<br>
prohibited.<br>
<br>
If you have received this message in error, please contact<br>
the sender by reply e-mail message and destroy all copies of the<br>
original message (including attachments).<br>
</font>
</body>
</html>