grouper-dev - RE: [grouper-dev] RE: use cases for ldap loader to grouper
Subject: Grouper Developers Forum
List archive
- From: Chris Hyzer <>
- To: Shilen Patel <>, Tom Barton <>
- Cc: "" <>
- Subject: RE: [grouper-dev] RE: use cases for ldap loader to grouper
- Date: Mon, 10 Oct 2011 06:45:51 +0000
- Accept-language: en-US
I finished coding/testing/documenting/etc the LDAP loader. There are test cases at the bottom that also explain how the features work. https://spaces.internet2.edu/display/Grouper/Grouper+-+Loader+LDAP Thanks, Chris From: [mailto:]
On Behalf Of Shilen Patel I tried this out using Duke's production Sun Directory and Active Directory. For the tests I did, it was easy to use and worked great. Here's what I tried, largely based on examples from Chris
on the wiki. 1. Use LDAP_SIMPLE to manage a group in Grouper for all staff with the OU attribute value of "Systems Admin-Identity Management." grouperSession = GrouperSession.startRootSession(); group = new GroupSave(grouperSession).assignName("duke:employees:IdM").assignCreateParentStemsIfNotExist(true).save(); attributeAssign = group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign(); attributeAssign = group.getAttributeDelegate().retrieveAssignment(null, LoaderLdapUtils.grouperLoaderLdapAttributeDefName(), false, true); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(), "LDAP_SIMPLE"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(&(eduPersonAffiliation=staff)(ou=Systems Admin-Identity Management))"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(), "0 * * * * ?"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=people"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "personLdap"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(), "jdbc"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "uid"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectIdentifier"); loaderRunOneJob(group); 2. Use LDAP_GROUP_LIST to sync some AD groups into Grouper. We currently have a need for this, so this is good. I had to use some custom EL to get the subject identifier which is part of our
RDN. The flexibility here seems sufficient and easy to work with. grouperSession = GrouperSession.startRootSession(); group = new GroupSave(grouperSession).assignName("duke:ADGroups:groupList").assignCreateParentStemsIfNotExist(true).save(); attributeAssign = group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign(); attributeAssign = group.getAttributeDelegate().retrieveAssignment(null, LoaderLdapUtils.grouperLoaderLdapAttributeDefName(), false, true); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(), "LDAP_GROUP_LIST"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(|(sAMAccountName=ITSO-OU-Admins)(sAMAccountName=OIT-IDM-Shared))"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(), "0 * * * * ?"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=depts"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "personLdap2"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(), "jdbc"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "member"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectIdentifier"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapExtraAttributesName(), "cn"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupNameExpressionName(), "groups:${groupAttributes['cn']}"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectExpressionName(), "${customLoaderLdapElUtils.convertDnToNetID(subjectId)}"); loaderRunOneJob(group); 3. Use LDAP_GROUPS_FROM_ATTRIBUTES to manage Grouper groups based on OU attribute values. So there's a different group created for each OU value. grouperSession = GrouperSession.startRootSession(); group = new GroupSave(grouperSession).assignName("duke:OUGroups:groupList").assignCreateParentStemsIfNotExist(true).save(); attributeAssign = group.getAttributeDelegate().assignAttribute(LoaderLdapUtils.grouperLoaderLdapAttributeDefName()).getAttributeAssign(); attributeAssign = group.getAttributeDelegate().retrieveAssignment(null, LoaderLdapUtils.grouperLoaderLdapAttributeDefName(), false, true); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapTypeName(), "LDAP_GROUPS_FROM_ATTRIBUTES"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapFilterName(), "(&(eduPersonAffiliation=*)(ou=*))"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapQuartzCronName(), "0 * * * * ?"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSearchDnName(), "ou=test"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapServerIdName(), "personLdap"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSourceIdName(), "jdbc"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectAttributeName(), "uid"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapSubjectIdTypeName(), "subjectIdentifier"); attributeAssign.getAttributeValueDelegate().assignValue(LoaderLdapUtils.grouperLoaderLdapGroupAttributeName(), "ou"); loaderRunOneJob(group); So yeah, I think sites will find this useful. Thanks! -- Shilen From: Tom Barton <>
|
- [grouper-dev] RE: use cases for ldap loader to grouper, Chris Hyzer, 10/05/2011
- Re: [grouper-dev] RE: use cases for ldap loader to grouper, Tom Barton, 10/05/2011
- Re: [grouper-dev] RE: use cases for ldap loader to grouper, Tom Zeller, 10/05/2011
- Re: [grouper-dev] RE: use cases for ldap loader to grouper, Shilen Patel, 10/06/2011
- RE: [grouper-dev] RE: use cases for ldap loader to grouper, Chris Hyzer, 10/10/2011
- Re: [grouper-dev] RE: use cases for ldap loader to grouper, Tom Barton, 10/10/2011
- RE: [grouper-dev] RE: use cases for ldap loader to grouper, Chris Hyzer, 10/10/2011
- Re: [grouper-dev] RE: use cases for ldap loader to grouper, Tom Barton, 10/05/2011
Archive powered by MHonArc 2.6.16.