Skip to Content.
Sympa Menu

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

Subject: Grouper Users - Open Discussion List

List archive

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


Chronological Thread 
  • From: "Waldbieser, Carl" <>
  • To:
  • Cc:
  • Subject: Re: [grouper-users] filter results of a grouperLoaderLdap job
  • Date: Tue, 25 Jul 2017 14:58:19 -0400 (EDT)
  • Ironport-phdr: 9a23:YrEewBcyImQ8Gxbxdf9hp3PklGMj4u6mDksu8pMizoh2WeGdxcS+bB7h7PlgxGXEQZ/co6odzbGH4+a4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Yr5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM3/mHZhNJzgq1ZrhKvuhNwzJLbboGUM/R+YrjQfc8YSGVdQspcTTBND4G6YoASD+QBJ+FYr4zlqlcArRSxHw2sC/70xT9JmHD2xrM10/45HQrbwgEvBcgOsHDaoN7oM6oTX/q6zK3VwjrYbvNZxyvy5ZPMch87r/GDR7JxftTNyUkzCQzJlEufppH4Pz6M0OkGrmaV7+1lVe21im4nrRl8ojmpxscwlIbJnIQVxU7Y9Sln2oo6O8C3SFN9bNW5E5VQrzmXO5Z4T84mWW1kpSk3x78ctZKmYSQG0okryh7CZ/CfboSF7BbuWPyMLTp3hn9pYq+zihao/US+1uHwStG43EtEoydBiNXAq38A2h7J5sSaV/dx5Fqt1DiR2w3V9+pKO1o7lbDBJJ4k2rMwloQcsUDEHiLunUX2kLWZe0o+9uis8evnbK/pp5+COI9olgHxLL4ildKiDuQlKgQOXm6b9vqg1LD74EH0TrFHgucrnqTWsp3WP9kXqrOjDwNI0osv9g6zDzK839QZmXkHIkhFeBWCj4XxNVDBOvT4AuqkjFStjjhk2+vLPrn7DZXDNHfCkKnufaph60FC0gY8081Q549MBrEbPP3zQlPxtMDfDhIhPAy02eHnCMhl1owAQ2KDG7KZMLjMvl+S/eIiOO2MZI4OuDbhMPgp+eTijX4/mV8BY6apx50XZ26kHvh4OUmWf2fjgspSWVsN6xEzVu3noFSGWCVQbjC/U79vyCs8DdfsMo7HSoqsjaeMxmPzNZRMYioOXk+FFXvidoiPc/MFZiuDL9N9n3oJWaX3GNxp7g2nqAKvk+kvFeHT4CBN7Z8=


You need to use:

${loaderLdapElUtils.convertDnToSpecificValue(subjectId)}

as tyour Grouper loader LDAP subject expression.

Thanks,
Carl Waldbieser
ITS Systems Programmer
Lafayette College

----- Original Message -----
From:

To:

Sent: Tuesday, July 25, 2017 2:49:39 PM
Subject: [grouper-users] filter results of a grouperLoaderLdap job

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