<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<div><br></div><div>







<p class="p1">I set up an IdP (2.3.8) and a SP (2.4.3) on one ubuntu 11.10 machine.</p>
<p class="p1">I get the example login panel in a browser to work properly when accessing documents.</p>
<p class="p2"><br></p>
<p class="p1">Now I'm trying to run the ECP profile. I keep exactly the same configuration except that :</p>
<p class="p3"><span class="s1">I'm using the python and shell client sample provided by:&nbsp;<span class="s2"><a href="https://wiki.shibboleth.net/confluence/display/SHIB2/Contributions#Contributions-simplepython">https://wiki.shibboleth.net/confluence/display/SHIB2/Contributions#Contributions-simplepython</a></span></span></p><p class="p3"><span class="s1">and I added my own IdP endpoint : https://kamaji.idp.ch/idp/profile/SAML2/SOAP/ECP</span></p>
<p class="p2"><br></p>
<p class="p1">And the Idp.war file contains a web.xml file like the one described in :</p>
<p class="p3"><span class="s2"><a href="https://wiki.shibboleth.net/confluence/display/SHIB2/IdPEnableECP">https://wiki.shibboleth.net/confluence/display/SHIB2/IdPEnableECP</a></span></p>
<p class="p2"><br></p>
<p class="p1">ShibUserPassAuth is defined in the login.config file of the IdP as an LDAP authentication.(the same as the one used for the browser).</p>
<p class="p2"><br></p>
<p class="p1">When I run the example:</p>
<p class="p1">- the first request to the SP is fine ("request target from the SP") and it retrieves the relay_state and responseConsumer URL from the SP response.</p>
<p class="p1">- the second request to the IdP &nbsp;end point ( a POST with the &nbsp;user/password to /idp/profile/SAML2/SOAP/ECP ) is failing with a 401 error. I'm sure that the credentials are correct.</p><p class="p1">I got the same error if I'm using the shell example instead of the python example.</p>
<p class="p2"><br></p>
<p class="p1">Taking a look at the logs and the network through wireshark,, I see that :</p>
<p class="p2"><br></p>
<p class="p1">The POST being correctly sent to the right port through ajp to catalina .</p>
<p class="p1">The answer from catalina being a 401 error.</p>
<p class="p2"><br></p>
<p class="p1">I don't see any additional trace on the IdP side after that POST call.</p>
<p class="p2">I believed at this point that this URL would match the pattern provided in the security-constraint tag of the web.xml file and</p><p class="p2">then the authentication would be handled using the realm ShibUserPassAuth and the user/password provided in the data of the POST call.</p><p class="p2"><br></p>
<p class="p2">I am a beginner in that topic, I need some help to find out what is wrong in my configuration setup.</p><p class="p2"><br></p>
<p class="p1">Additional traces :</p><p class="p1"><br></p>
<p class="p1">-The packet of the POST call to Catalina as seen in Wireshark:</p>
<p class="p4">







<p class="p1">0000&nbsp; 00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00&nbsp;&nbsp; ................&nbsp;</p>
<p class="p1">0010&nbsp; 45 00 01 28 49 c0 40 00 40 06 f2 0d 7f 00 00 01&nbsp;&nbsp; E..(I.@.@.......&nbsp;</p>
<p class="p1">0020&nbsp; 7f 00 00 01 8b 67 1f 49 1f 91 c4 db 36 ad 43 b0&nbsp;&nbsp; .....g.I....6.C.&nbsp;</p>
<p class="p1">0030&nbsp; 80 18 04 01 ff 1c 00 00 01 01 08 0a 07 fd 8d 65&nbsp;&nbsp; ...............e&nbsp;</p>
<p class="p1">0040&nbsp; 07 fd 8d 64 12 34 00 f0 02 04 00 08 48 54 54 50&nbsp;&nbsp; ...d.4......HTTP&nbsp;</p>
<p class="p1">0050&nbsp; 2f 31 2e 31 00 00 1b 2f 69 64 70 2f 70 72 6f 66&nbsp;&nbsp; /1.1.../idp/prof&nbsp;</p>
<p class="p1">0060&nbsp; 69 6c 65 2f 53 41 4d 4c 32 2f 53 4f 41 50 2f 45&nbsp;&nbsp; ile/SAML2/SOAP/E&nbsp;</p>
<p class="p1">0070&nbsp; 43 50 00 00 09 31 32 37 2e 30 2e 30 2e 31 00 ff&nbsp;&nbsp; CP...127.0.0.1..&nbsp;</p>
<p class="p1">0080&nbsp; ff 00 0d 6b 61 6d 61 6a 69 2e 69 64 70 2e 63 68&nbsp;&nbsp; ...kamaji.idp.ch&nbsp;</p>
<p class="p1">0090&nbsp; 00 01 bb 01 00 06 a0 03 00 08 69 64 65 6e 74 69&nbsp;&nbsp; ..........identi&nbsp;</p>
<p class="p1">00a0&nbsp; 74 79 00 a0 08 00 03 36 38 36 00 a0 0b 00 0d 6b&nbsp;&nbsp; ty.....686.....k&nbsp;</p>
<p class="p1">00b0&nbsp; 61 6d 61 6a 69 2e 69 64 70 2e 63 68 00 a0 07 00&nbsp;&nbsp; amaji.idp.ch....&nbsp;</p>
<p class="p1">00c0&nbsp; 21 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77&nbsp;&nbsp; !application/x-w&nbsp;</p>
<p class="p1">00d0&nbsp; 77 77 2d 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64&nbsp;&nbsp; ww-form-urlencod&nbsp;</p>
<p class="p1">00e0&nbsp; 65 64 00 a0 06 00 05 63 6c 6f 73 65 00 a0 0e 00&nbsp;&nbsp; ed.....close....&nbsp;</p>
<p class="p1">00f0&nbsp; 11 50 79 74 68 6f 6e 2d 75 72 6c 6c 69 62 2f 32&nbsp;&nbsp; .Python-urllib/2&nbsp;</p>
<p class="p1">0100&nbsp; 2e 37 00 08 00 12 44 48 45 2d 52 53 41 2d 41 45&nbsp;&nbsp; .7....DHE-RSA-AE&nbsp;</p>
<p class="p1">0110&nbsp; 53 32 35 36 2d 53 48 41 00 0b 01 00 0a 00 0f 41&nbsp;&nbsp; S256-SHA.......A&nbsp;</p>
<p class="p1">0120&nbsp; 4a 50 5f 52 45 4d 4f 54 45 5f 50 4f 52 54 00 00&nbsp;&nbsp; JP_REMOTE_PORT..&nbsp;</p>
<p class="p1">0130&nbsp; 05 35 33 39 32 39 00 ff&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .53929..&nbsp;</p><p class="p1"><br></p></p>
<p class="p1">-The packet of the response from Catalina as seen in Wireshark:</p>
<p class="p2">







<p class="p1"><br></p><p class="p1">Apache JServ Protocol v1.3&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; Magic: 4142&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; Length: 136&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; Code: (4) SEND HEADERS&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; RSTATUS: 401&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; RSMSG: Unauthorized&nbsp;</p>
<p class="p1">&nbsp;&nbsp;&nbsp; NHDR: 0&nbsp;</p>
<p class="p1">&nbsp;&nbsp;</p>
<p class="p1">0000&nbsp; 00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00&nbsp;&nbsp; ................&nbsp;</p>
<p class="p1">0010&nbsp; 45 00 00 c0 ce d5 40 00 40 06 6d 60 7f 00 00 01&nbsp;&nbsp; E.....@.@.m`....&nbsp;</p>
<p class="p1">0020&nbsp; 7f 00 00 01 1f 49 8b 67 36 ad 43 b0 1f 91 c5 cf&nbsp;&nbsp; .....I.g6.C.....&nbsp;</p>
<p class="p1">0030&nbsp; 80 18 04 22 fe b4 00 00 01 01 08 0a 07 fd 8d 65&nbsp;&nbsp; ..."...........e&nbsp;</p>
<p class="p1">0040&nbsp; 07 fd 8d 65 41 42 00 88 04 01 91 00 0c 55 6e 61&nbsp;&nbsp; ...eAB.......Una&nbsp;</p>
<p class="p1">0050&nbsp; 75 74 68 6f 72 69 7a 65 64 00 00 03 00 10 57 57&nbsp;&nbsp; uthorized.....WW&nbsp;</p>
<p class="p1">0060&nbsp; 57 2d 41 75 74 68 65 6e 74 69 63 61 74 65 00 00&nbsp;&nbsp; W-Authenticate..&nbsp;</p>
<p class="p1">0070&nbsp; 1e 42 61 73 69 63 20 72 65 61 6c 6d 3d 22 53 68&nbsp;&nbsp; .Basic realm="Sh&nbsp;</p>
<p class="p1">0080&nbsp; 69 62 55 73 65 72 50 61 73 73 41 75 74 68 22 00&nbsp;&nbsp; ibUserPassAuth".&nbsp;</p>
<p class="p1">0090&nbsp; 00 0c 43 6f 6e 74 65 6e 74 2d 54 79 70 65 00 00&nbsp;&nbsp; ..Content-Type..&nbsp;</p>
<p class="p1">00a0&nbsp; 17 74 65 78 74 2f 68 74 6d 6c 3b 63 68 61 72 73&nbsp;&nbsp; .text/html;chars&nbsp;</p>
<p class="p1">00b0&nbsp; 65 74 3d 75 74 66 2d 38 00 00 0e 43 6f 6e 74 65&nbsp;&nbsp; et=utf-8...Conte&nbsp;</p>
<p class="p1">00c0&nbsp; 6e 74 2d 4c 65 6e 67 74 68 00 00 03 39 35 34 00&nbsp;&nbsp; nt-Length...954.&nbsp;</p>
<p class="p1">&nbsp;</p></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1">Regards,</p>
<p class="p1">Jean-Denis</p></div>                                               </div></body>
</html>