regexsplit not returning attribute

Lipscomb, Gary glipscomb at csu.edu.au
Wed Nov 30 17:05:24 EST 2016


Hi Scott,

That worked.  I hate regex :-)

2016-12-01 09:00:59,669 - DEBUG [net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:411] - Attribute Resolver 'ShibbolethAttributeResolv
er': Resolving dependencies for 'EPPN-CSU'
2016-12-01 09:00:59,670 - DEBUG [net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:427] - Attribute Resolver 'ShibbolethAttributeResolv
er': Finished resolving dependencies for 'EPPN-CSU'
2016-12-01 09:00:59,670 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.RegexSplitAttributeDefinition:115] - Attribute Definition 'EPPN-CSU': A
pplying regexp '^urn:mace:terena.org:schac:personalUniqueID:au:csuid:(.+)$' to input value 'urn:mace:terena.org:schac:personalUniqueID:au:csuid:123456
'
2016-12-01 09:00:59,670 - DEBUG [net.shibboleth.idp.attribute.resolver.ad.impl.RegexSplitAttributeDefinition:118] - Attribute Definition 'EPPN-CSU': C
omputed the value '123456' by apply regexp '^urn:mace:terena.org:schac:personalUniqueID:au:csuid:(.+)$' to input value 'urn:mace:terena.org:schac:pers
onalUniqueID:au:csuid:123456'
2016-12-01 09:00:59,671 - DEBUG [net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition:247] - Attribute Definition 'EPPN-CSU': produced an
 attribute with the following values [StringAttributeValue{value=123456}]
2016-12-01 09:00:59,671 - DEBUG [net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl:308] - Attribute Resolver 'ShibbolethAttributeResolv
er': Attribute definition 'EPPN-CSU' produced an attribute with 1 values


To close - working attribute definition is

  <!-- Created for sites that use the old CSU definition of EPPN -->
  <AttributeDefinition xsi:type="RegexSplit"
      id="EPPN-CSU"
      sourceAttributeID="schacPersonalUniqueID" 
      regex="^urn:mace:terena.org:schac:personalUniqueID:au:csuid:(.+)$">
    <Dependency ref="ldap" />
    <DisplayName xml:lang="en">Global Username (EPPN)</DisplayName>
    <AttributeEncoder xsi:type="SAML1String" name="urn:mace:dir:attribute-def:eduPersonPrincipalName" />
    <AttributeEncoder xsi:type="SAML2String" name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" friendlyName="eduPersonPrincipalName" />
  </AttributeDefinition>

Thanks

Gary

> -----Original Message-----
> From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor,
> Scott
> Sent: Thursday, 1 December 2016 8:41
> To: Shib Users <users at shibboleth.net>
> Subject: Re: regexsplit not returning attribute
> 
> On 11/30/16, 4:31 PM, "users on behalf of Lipscomb, Gary" <users-
> bounces at shibboleth.net on behalf of glipscomb at csu.edu.au> wrote:
> 
> >    The 2 online testers both claim to test java
> >    Attribute value:
> urn:mace:terena.org:schac:personalUniqueID:au:csuid:123456
> >    Regex    [^:]+[^:]*$        and       [^:]+$
> 
> That plugin returns the first matching group. I don't think either of those
> expressions contains a matching group (I think those have to be
> parenthesized).
> 
> It seems like that's an awfully over-engineered expression. If all you want is
> the last segment after a fixed prefix, couldn't you just include the prefix
> literally?
> 
> ^urn:mace:terena.org:schac:personalUniqueID:au:csuid:(.+)$
> 
> -- Scott
> 
> 
> --
> To unsubscribe from this list send an email to users-
> unsubscribe at shibboleth.net


More information about the users mailing list