Skip to Content.
Sympa Menu

grouper-users - [grouper-users] filter results of a grouperLoaderLdap job

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] filter results of a grouperLoaderLdap job


Chronological Thread 
  • From: <>
  • To:
  • Subject: [grouper-users] filter results of a grouperLoaderLdap job
  • Date: Tue, 25 Jul 2017 18:49:39 +0000 (UTC)
  • Ironport-phdr: 9a23:V3MzkxSL0DJMrcsikxFFfDLCWdpsv+yvbD5Q0YIujvd0So/mwa69YB2N2/xhgRfzUJnB7Loc0qyN4vCmATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbB/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4KB3RRLmiioKOSc1/H3KhsdtiK5Wrxasqxl5zoXJYo+aKeB+c7vDc90aWGROXMVfWCNdDY2zaIUBAfEMPfpFoYTnu1cDtweyCReqCejyyjFInHj23agi3ukmCgHJwhYgH9MQv3nPttr1ML0dUfu2zKbS1znMce5Z2Srk5YXObxsvr/aMXbdqfsrQz0kiDwLFjlOMqYP7JTOV0PoCs3SF4+Z6S+2glnMnpgdsqTas3schkpfFip4Xx1ze9yh0wJw5KcC5RUN0e9KoDoVcuzycOoBrWM0tWXtotzw/yrAeuZ60YiwKyJM/yh7bavyHaJSI4gn9WOqLIDd4gm5ld6ylhxa070eg1vPwWtOq31lXsypJitjMtnYT2BzP8sWLVOdx80W71TuN1w3f8PxILEE7mKbBNZIt3KM8moIWsUvZHy/2nEv2jLWRdkUh4uWo8/nnba79pp6cMo90khvxP78vmsy5HeQ3LBIOX26F9uSgyrHv51P2T6hXjvEuiKnWrIjaJdgHpq6+GwJV3Zwj6xGiDze+ztsYh2ALLE9eeB2ZlYjpIErDIPT5Dfekn1Ssiylny+rHPr3nHpXCMGLDkLH/crZh9UJQ0hQ8ws1C58EcNrZUL+j0R1f8rpnFFRIjKCS1xfrqEtNwytlYVG6SUYGDN6aH5USF/OMiC+CIbZQWsXDwJ+VztK2mtmMwhVJIJfrh5pAQcn3tQqVr

I'm putting together a demo of grouper working with my universities ad ldap
and I can't figure out how to create groups with the ldap loader. I have been
trying to adapt the LDAP_SIMPLE example from your page
https://spaces.internet2.edu/display/Grouper/Grouper+-+Loader+LDAP
with the main differences being the hasMember attribute from the example LDAP
holds only subject IDs whereas the equivalent in our LDAP is member and it
holds dns with a cn of subject id. I have tried several ways, and the script I
have runs successfully but inserts no members, although it should be returning
something like 1500. I am pretty sure the only problem is that it is trying to
match the subjectId from my source in sources.xml (which I know works) to the
dn held in the group ldap that I am filtering. For example subjectId from
sources is 'serie' when subjectId from server is
'CN=serie,OU=userAccounts,DC=ua,DC=ad,DC=alaska,DC=edu'.
I have tried several ways to filter the dn to get a subjectId to no avail.
Even storing the subject dn as the subjectIdentifier, which must have not
worked because of case of the string returned, or the fact that I am
completely misunderstanding something about how this should work. If there
were just some way to output the values this job is actually attempting to
compare , or the server filter is pulling out, I think I'd get it. Here is my
adapted script that runs but inserts no member, any advice would really help:

grouperSession = GrouperSession.startRootSession();
group = new
GroupSave(grouperSession).assignName("students:UafStudents").assignCreateParen
tStemsIfNotExist(true).save();
attributeAssign =
group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdap
AttributeDefName()).getAttributeAssign();
attributeAssign = group.getAttributeDelegate().retrieveAssignment(null,
LoaderLdapUtils.grouperLoaderLdapAttributeDefName(), false, true);
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapTypeName(), "LDAP_SIMPLE");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapFilterName(), "CN=UAF_Students");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapQuartzCronName(), "0 * * * * ?");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapSearchDnName(), "OU=Groups");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapServerIdName(), "personLdap");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapSourceIdName(), "AD");
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapSearchScopeName(), "SUBTREE_SCOPE");

# my last attempt of many (more than shown) to parse dn before comparing
attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapSubjectAttributeName(),
"${loaderLdapElUtils.convertDnToSpecificValue(member)}");

# original way I was trying that I think would return dn
#attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.group
erLoaderLdapSubjectAttributeName(), "member");

attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.groupe
rLoaderLdapSubjectIdTypeName(), "subjectId");
# another failed attempt at parsing dn, I think this would filter it too late
#attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.group
erLoaderLdapSubjectExpressionName(),
"${loaderLdapElUtils.convertDnToSpecificValue(subjectId)}");

loaderRunOneJob(group);



Archive powered by MHonArc 2.6.19.

Top of Page