<div dir="ltr"><div>Hello Benito,</div><div><br></div><div>Joseph Fischetti solution should work for you. CERN linux folks implementing something very similar[1]. However keep in mind that this is a hack. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ECP should be the way to go. </span><br></div><div><br></div><div>> Just login in a half of dozen universities </div><div><br></div><div>This statement makes me think that you are building some kind of test benchmarks. Some people (me included) use apache jmeter for this purpose [2]</div><div><br></div><div>Hope it helps,</div><div><br></div><div>Luis </div><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[1] <a href="http://linux.web.cern.ch/linux/docs/cernssocookie.shtml">http://linux.web.cern.ch/linux/docs/cernssocookie.shtml</a></span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[2] <a href="https://www.blazemeter.com/blog/how-load-test-saml-sso-secured-websites">https://www.blazemeter.com/blog/how-load-test-saml-sso-secured-websites</a></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-07 15:49 GMT+02:00 Joseph Fischetti <span dir="ltr"><<a href="mailto:Joseph.Fischetti@marist.edu" target="_blank">Joseph.Fischetti@marist.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As others have said, using the ECP endpoint would really be the right way to<br>
handle this, but since it doesn't seem like you have any control of the<br>
IDP's in question... that's not an option for you.<br>
<br>
Below is [the relevant code from] a bash script that logs in to a service<br>
provider via a specified idp. A successful login to the SP would produce a<br>
cookie for the service provider's entityID in /tmp/sessioncookies. I use it<br>
for monitoring whether or not our shibboleth authentication is working to a<br>
given service provider.<br>
<br>
In short, if you curl the idp initiated login url with valid credentials,<br>
you'll get (among other things) the SAML Response, which needs to be<br>
formatted and posted to a service provider. No need to find login buttons or<br>
parse html with the given solution.<br>
<br>
There's probably better ways to do this, and your mileage may vary... <br>
<br>
#log into the auth page using idp initiated login with test credentials,<br>
save the cookies to a local file<br>
curl --cookie-jar /tmp/sessioncookies -k -u USERNAME:PASSWORD -o<br>
/tmp/login.html<br>
"IDPURL/idp/profile/SAML2/<wbr>Unsolicited/SSO?providerId=<wbr>https://$entityID"<br>
<br>
#Create a file for the SAML Response, which will be passed to the SP page in<br>
a post. Format is SAMLResponse=XXXXXXXX<br>
echo "SAMLResponse=" > /tmp/validsession.data<br>
cat /tmp/login.html | awk 'match($0, /value=\".*\"\/>/) {print substr($0,<br>
RSTART+7, RLENGTH-10)}' | grep -v "Continue" >> /tmp/validsession.data<br>
<br>
#Formatting of the response has plus signs, and those need to be replaced<br>
with %2B<br>
sed -i -e 's/\+/\%2B/g' /tmp/validsession.data<br>
<br>
#Post the saml response to the SP, use the same cookie jar<br>
curl -L -b /tmp/sessioncookies --cookie-jar /tmp/sessioncookies -i -X POST<br>
-o /tmp/successtmp.html https://$entityID/Shibboleth.<wbr>sso/SAML2/POST<br>
--data-binary "@/tmp/validsession.data"<br>
<br>
Joe Fischetti<br>
Linux System Administrator<br>
Marist College<br>
<br>
E-mail: <a href="mailto:joseph.fischetti@marist.edu">joseph.fischetti@<wbr>marist.edu</a><br>
<br>
<br>-- <br>
For Consortium Member technical support, see <a href="https://wiki.shibboleth.net/confluence/x/coFAAg" rel="noreferrer" target="_blank">https://wiki.shibboleth.net/<wbr>confluence/x/coFAAg</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.<wbr>net</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><p>"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."</p><p>- Samuel Beckett<br></p></div></div></div></div>
</div>