release one attribute value of many or regex
Olga Terlyga
terlyga at fnal.gov
Thu Oct 1 17:11:16 EDT 2015
Hello everyone,
I need help releasing correct attributes in the following situation.
I have principal names that are either normal usernames or they contain semicolon ';' , two actually. I need to release one attribute value for regular and a different value for special kind of principal.
I use Mapped Attribute definition for that. I understand how to capture special principals that do have semicolon in them with regex, but I don't know how to write regex to capture every username EXCEPT for the ones with any semicolon, so I basically have this kind of mapping
<ad:ValueMap>
<ad:ReturnValue>$3:$2</ad:ReturnValue>
<ad:SourceValue>(.+);(.+);(.+)$</ad:SourceValue>
</ad:ValueMap>
<ad:ValueMap>
<ad:ReturnValue>none</ad:ReturnValue>
<ad:SourceValue>(.*)</ad:SourceValue>
</ad:ValueMap>
In this case, for regular users I get one value for the attribute, and for special principals I get two (second being 'none'). I want to be able to either release only first value for special principals (and regular, since there is only one anyway) OR craft regex that would capture all strings except the ones with ';' in them.
Please help!
Olga Terlyga.
terlyga at fnal.gov
(630)840-4685
Authentication Services
Fermi National Accelerator Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20151001/d4b42fe0/attachment.html>
More information about the users
mailing list