<div dir="ltr"><div>Howdy all,</div><div><div><br></div><div>I'm successfully using mfa logic to send specific users to Duo Authentication, thanks to the samples/documentation/wiki and postings from users here on <a href="mailto:users@shibboleth.net">users@shibboleth.net</a> </div><div>I'm now adding another piece of mfa logic to the mfa-authn-config.xml checksecondfactore inline script.</div><div><br></div><div>Prior to checking for specific user attributes I'm now first checking the RelyingPartyId to see if Duo is needed. I'm able to do this successfully after stealing some example logic that Andrew Morgan posted ..Thanks Andrew!</div><div><br></div><div><br></div><div>This is an excerpt from my mfa-authn-config.xml</div><div><br></div><div> rpid = profileContext.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext").getRelyingPartyId();</div><div> if (rpid.equals("<a href="https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check">https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check</a>")) {</div><div> nextFlow = "authn/Duo";</div><div> }</div><div><br></div><div><br></div><div>The above works if I add an if statement for every RelyingPartyId separately. I was hoping I might be able to use a regular expression and do a pattern match or something like that (my terminology is probably wrong). I'm not a programmer.</div><div><br></div><div><br></div><div>e.g. </div><div><br></div><div>Let's say I have multiple RelyingPartyIds like this</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span><a href="https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check">https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check</a></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span><a href="https://banner-dev.pima.edu/applicationNavigator/j_spring_cas_security_check">https://banner-dev.pima.edu/applicationNavigator/j_spring_cas_security_check</a></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span><a href="https://banner-test.pima.edu/applicationNavigator/j_spring_cas_security_check">https://banner-test.pima.edu/applicationNavigator/j_spring_cas_security_check</a></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span><a href="https://banner-prod.pima.edu/applicationNavigator/j_spring_cas_security_check">https://banner-prod.pima.edu/applicationNavigator/j_spring_cas_security_check</a></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div><div>rather than creating an if statement for each one I would like to do a pattern match up against something like this</div><div><br></div><div>(https:\/\/.+(<a href="http://pima.edu">pima.edu</a>\/applicationNavigator\/j_spring_cas_security_check)\/?.*)</div><div><br></div><div><br></div><div>and if it's true then set the nextFlow = "authn/Duo"</div><div><br></div><div><br></div><div>Anyone one have a sample I can hack at? If not no worries I'm very happy with my success so far and can probably live with adding each one separately. </div><div><br></div><div><br></div><div>Thanks!</div></div><div><br></div><div><br></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div></div><div><br></div><div>Brad Mathis</div><div>Principal Systems Analyst</div><div>Pima Community College</div><div>IT - Technical Services</div><div>520.206.4826</div><div><a href="mailto:bmathis@pima.edu" target="_blank">bmathis@pima.edu</a></div></div><div><br></div><div><img src="https://docs.google.com/a/pima.edu/uc?id=0B4QEFWYNTFJATTZySzROc0JISEk&export=download" width="200" height="150"><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div>
</div>