<div dir="ltr">Thanks Jim,  that might be what I'm looking for I'll try it out.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="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>
<br><div class="gmail_quote">On Mon, Feb 5, 2018 at 1:39 PM, Jim Fox <span dir="ltr"><<a href="mailto:fox@washington.edu" target="_blank">fox@washington.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The rpid is a string.  Most simple is something like:<br>
<br>
  if (rpid.indexOf(".<a href="http://pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">pima.edu/appli<wbr>cationNavigator/j_spring_cas_<wbr>security_check</a>")>0) {<br>
    etc.<br>
  }<br>
<br>
Jim<br>
<br>
<br>
On Mon, 5 Feb 2018, Mathis, Bradley wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Mon, 5 Feb 2018 10:57:49<br>
From: "Mathis, Bradley" <<a href="mailto:bmathis@pima.edu" target="_blank">bmathis@pima.edu</a>><br>
To: Shib Users <<a href="mailto:users@shibboleth.net" target="_blank">users@shibboleth.net</a>><br>
Reply-To: Shib Users <<a href="mailto:users@shibboleth.net" target="_blank">users@shibboleth.net</a>><br>
Subject: more mfa scripting logic<br>
<br>
Howdy all,<br>
<br>
I'm successfully using mfa logic to send specific users to Duo Authentication, thanks to the samples/documentation/wiki and postings from users<br>
here on <a href="mailto:users@shibboleth.net" target="_blank">users@shibboleth.net</a>  <br>
I'm now adding another piece of mfa logic to the mfa-authn-config.xml checksecondfactore inline script.<br>
<br>
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<br>
successfully after stealing some example logic that Andrew Morgan posted ..Thanks Andrew!<br>
<br>
<br>
This is an excerpt from my mfa-authn-config.xml<br>
<br>
               rpid = profileContext.getSubcontext("<wbr>net.shibboleth.idp.profile.con<wbr>text.RelyingPartyContext").get<wbr>RelyingPartyId();<br>
            if (rpid.equals("<a href="https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">https://banner-t<wbr>emp.pima.edu/applicationNaviga<wbr>tor/j_spring_cas_security_<wbr>check</a>")) {<br>
                nextFlow = "authn/Duo";<br>
            }<br>
<br>
<br>
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<br>
pattern match or something like that (my terminology is probably wrong). I'm not a programmer.<br>
<br>
<br>
e.g.  <br>
<br>
Let's say I have multiple RelyingPartyIds like this<br>
<br>
<a href="https://banner-temp.pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">https://banner-temp.pima.edu/a<wbr>pplicationNavigator/j_spring_c<wbr>as_security_check</a><br>
<a href="https://banner-dev.pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">https://banner-dev.pima.edu/ap<wbr>plicationNavigator/j_spring_ca<wbr>s_security_check</a><br>
<a href="https://banner-test.pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">https://banner-test.pima.edu/a<wbr>pplicationNavigator/j_spring_c<wbr>as_security_check</a><br>
<a href="https://banner-prod.pima.edu/applicationNavigator/j_spring_cas_security_check" rel="noreferrer" target="_blank">https://banner-prod.pima.edu/a<wbr>pplicationNavigator/j_spring_c<wbr>as_security_check</a><br>
rather than creating an if statement for each one I would like to do a pattern match up against something like this<br>
<br>
(https:\/\/.+(<a href="http://pima.edu" rel="noreferrer" target="_blank">pima.edu</a>\/applic<wbr>ationNavigator\/j_spring_cas_<wbr>security_check)\/?.*)<br>
<br>
<br>
and if it's true then set the nextFlow = "authn/Duo"<br>
<br>
<br>
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<br>
separately. <br>
<br>
<br>
Thanks!<br>
<br>
<br>
<br>
<br>
Brad Mathis<br>
Principal Systems Analyst<br>
Pima Community College<br>
IT - Technical Services<br>
<a href="tel:520.206.4826" value="+15202064826" target="_blank">520.206.4826</a><br>
<a href="mailto:bmathis@pima.edu" target="_blank">bmathis@pima.edu</a><br>
<br>
[uc?id=0B4QEFWYNTFJATTZySzROc0<wbr>JISEk&export=download]<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<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></div>