Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] psp (not pspng) need to replace ':' with something else

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] psp (not pspng) need to replace ':' with something else


Chronological Thread 
  • From: Andrew Morgan <>
  • To: Jeffrey Crawford <>
  • Cc: Gouper Users List <>
  • Subject: Re: [grouper-users] psp (not pspng) need to replace ':' with something else
  • Date: Fri, 30 Jun 2017 14:22:52 -0700 (PDT)
  • Ironport-phdr: 9a23:LotbBx1aMCsnaSWJsmDT+DRfVm0co7zxezQtwd8ZsesfKfad9pjvdHbS+e9qxAeQG96Eu7QZ06L/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL3WbmHC57CYTFxPjLkI1Y72tQs+Bx/iwgsK/9ZPJbhQAryC0fr11Nhn++QfcuMcMjJppArs60RCPr3dVLbd432RtcHuVkwzx+Y+V+4Rs+iIY7/cm7cFJV439Zb8kC7FUEWJ1YCgO+MT3uEybHkO07XwGXzBTy0IQDg==

On Fri, 30 Jun 2017, Jeffrey Crawford wrote:

Luckly we haven't gone too far using posix groups, but we've had at least
one system bark with posix names containing ':' in them. Is there a simple
way to have the psp create cn with something like '.' or '_' as a delimiter
as opposed to ':'? I know I could make a script but I was hoping there was
an easier way.

We do this for generating the samAccountName attribute in AD with the PSP. In psp-resolver.xml:

<!-- Static data connector. -->
<resolver:DataConnector
id="StaticDataConnector"
xsi:type="dc:Static">
...
<!-- dummy attribute -->
<dc:Attribute id="samAccountName">
<dc:Value>dummy</dc:Value>
</dc:Attribute>
</resolver:DataConnector>

<resolver:AttributeDefinition
id="samAccountName"
xsi:type="ad:Script"
sourceAttributeID="groupNameInStem">
<resolver:Dependency ref="StaticDataConnector" />
<resolver:Dependency ref="groupNameInStem" />
<ad:Script><![CDATA[
samAccountName.getValues().clear(); // remove the dummy value
if (groupNameInStem.getValues().size() > 0) {
// Strip the baseStem off the front
var regex =
/^${edu.internet2.middleware.psp.baseStem}:/;
var tmp = new
String(groupNameInStem.getValues().get(0));
var tmp2 = tmp.replace(regex, "");

samAccountName.getValues().add(tmp2.replace(/:/g,"_"));
}
]]></ad:Script>
</resolver:AttributeDefinition>


I forget why we had to create the dummy attribute...

Andy



Archive powered by MHonArc 2.6.19.

Top of Page