regex in cas-protocol.xml

Tom Scavo trscavo at gmail.com
Tue Feb 23 08:03:29 EST 2016


On Mon, Feb 22, 2016 at 11:20 PM, Paul B. Henson <henson at cpp.edu> wrote:
> On Mon, Feb 22, 2016 at 08:43:18PM +0000, Marvin Addison wrote:
>
>> That. What you provided should be equivalent.
>
> Hmm, so I finished setting up CAS support on my dev idp3 system and
> pointed our test ezproxy system at it, but it seems it's not happy with
> my regex and it's treating it like an unverified relying party and
> denying it access. The entry looks like:
>
>         c:regex="^http(s)?://(login\.)?proxy\.library\.cpp\.edu/login"
>
> I turned on debugging, and it showed:
>
> 2016-02-22 20:02:21,077 - DEBUG
> [net.shibboleth.idp.cas.service.PatternServiceRegistry:85] - Evaluating
> whether
> https://login.proxy-dev.library.cpp.edu/login?qurl=ezp.2aHR0cHM6Ly9sb2dpbi5wcm94eS1kZXYubGlicmFyeS5jcHAuZWR1L215Z3JvdXBz
> matches ^http(s)?://(login\.)?proxy-dev\.library\.cpp\.edu/login
> [...]
> 2016-02-22 20:02:21,081 - DEBUG
> [net.shibboleth.idp.relyingparty.impl.DefaultRelyingPartyConfigurationResolver:299]
> - Profile request is unverified, returning configuration
>   shibboleth.UnverifiedRelyingParty
>
> perl is happy with the regex:
>
> "https://login.proxy-dev.library.cpp.edu/login?qurl=ezp.2aHR0cHM6Ly9sb2dpbi5wcm94eS1kZXYubGlicmFyeS5jcHAuZWR1L215Z3JvdXBz" =~ m#^http(s)?://(login\.)?proxy-dev\.library\.cpp\.edu/login# && print "matches\n"
>
> works fine. Is there some difference between PCRE and java I'm missing?

My guess is: Perl is successfully matching a prefix of the URL whereas
Java is trying to match the entire URL. Try anchoring the Java RE at
the beginning/end of the string as you mentioned earlier.

Tom


More information about the users mailing list