<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For info, It’s moodle, it sends  &gateway=true to CAS(Shibboleth), I’ll  try to strip it out before Shibboleth sees it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Duncan Brannen
<br>
<b>Sent:</b> 01 September 2021 14:18<br>
<b>To:</b> users@shibboleth.net<br>
<b>Subject:</b> IsPassive=true in AuthnRequest to Azure when no session exists<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal">                Not sure if anyone has come across this or can point me at a workaround.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We’ve recently upgraded to Shibboleth 4.1.4 and added in CAS support (retired our CAS servers) and setup proxy authentication to AzureAD.  We’ve hit a few issues that were straight forward to resolve but the headscratcher at the moment
 is moodle.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Moodle’s is configured to use CAS authentication.  Taking a clean browser session and attempting to login to moodle results in a Silent sign in error from Azure (quite rightly, there is no session), returning to the moodle login page and
 trying again gives a prompt as expected.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The issue seems to be that the first time around the IDP adds IsPassive=True to the Authn request which then fails but the 2<sup>nd</sup> attempt doesn’t add IsPassive=true and succeeds.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any thoughts / pointers appreciated.  Can I set anything to override setting IsPassive on a resource by resource basis?  It’s only the one CAS resource that’s going wrong, other AuthnRequests containing IsPassive=True succeed (When the
 useris already logged in)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">                Duncan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">DEBUG [net.shibboleth.idp.saml.saml2.profile.impl.AddAuthnRequest:238] - Profile Action AddAuthnRequest: Setting IsPassive for SAML AuthnRequest<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif"><?xml version="1.0" encoding="UTF-8"?><saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="<a href="https://login.st-andrews.ac.uk/idp/profile/Authn/SAML2/POST/SSO%22" target="_blank" title="https://login.st-andrews.ac.uk/idp/profile/authn/saml2/post/sso%22">https://login.st-andrews.ac.uk/idp/profile/Authn/SAML2/POST/SSO"</a>
 Destination="<a href="https://login.microsoftonline.com/...../saml2%22">https://login.microsoftonline.com/...../saml2"</a> ID="_bdb614add66efeef7f19aaa375ebf322" IsPassive="true" IssueInstant="2021-09-01T10:42:03.320Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
 Version="2.0"><br>
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"><a href="https://idp.st-andrews.ac.uk/shibboleth%3c/saml2:Issuer%3e" target="_blank" title="https://idp.st-andrews.ac.uk/shibboleth</saml2:issuer>">https://idp.st-andrews.ac.uk/shibboleth</saml2:Issuer></a><br>
<saml2p:NameIDPolicy AllowCreate="true"/><br>
</saml2p:AuthnRequest><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif">^Above fails while below succeeds<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif"><?xml version="1.0" encoding="UTF-8"?><saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="<a href="https://login.st-andrews.ac.uk/idp/profile/Authn/SAML2/POST/SSO%22" target="_blank" title="https://login.st-andrews.ac.uk/idp/profile/authn/saml2/post/sso%22">https://login.st-andrews.ac.uk/idp/profile/Authn/SAML2/POST/SSO"</a>
 Destination="<a href="https://login.microsoftonline.com/...../saml2%22">https://login.microsoftonline.com/...../saml2"</a> ID="_ecf37f9d3e1bc7a662d02b200757a284" IssueInstant="2021-09-01T10:42:30.384Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
 Version="2.0"><br>
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"><a href="https://idp.st-andrews.ac.uk/shibboleth%3c/saml2:Issuer%3e" target="_blank" title="https://idp.st-andrews.ac.uk/shibboleth</saml2:issuer>">https://idp.st-andrews.ac.uk/shibboleth</saml2:Issuer></a><br>
<saml2p:NameIDPolicy AllowCreate="true"/><br>
</saml2p:AuthnRequest><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>