Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Loader LDAP - Group name expression

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Loader LDAP - Group name expression


Chronological Thread 
  • From: Gagné Sébastien <>
  • To: "Chris Hyzer" <>, <>
  • Subject: [grouper-users] RE: Loader LDAP - Group name expression
  • Date: Tue, 5 Jun 2012 08:36:33 -0400

Thanks, but I tried it again and there’s still a problem :

 

LDAP extra attributes = distinguishedName,dn,cn

LDAP group name _expression_ = ${udemLoaderElUtils.convertDnToGroupName(distinguishedName)}

 

I get these exceptions :

2012-06-05 08:08:16,266: [main] ERROR GrouperLoaderJob.runJobLdap(537) -  - Error on job: LDAP_GROUP_LIST__etc:confLDAPLoader__e7b97262558b477fab09c0b48f98ed1c

edu.internet2.middleware.grouper.exception.ExpressionLanguageMissingVariableException: variable 'distinguishedName' is not defined in script: 'udemLoaderElUtils.convertDnToGroupName(distinguishedName)',

Problem with ldap conection: personLdap,

Error querying ldap server id: personLdap, searchDn: null, filter: '(objectClass=group)', returning subject attribute: member

[…]

Caused by: org.apache.commons.jexl2.JexlException: edu.internet2.middleware.grouper.util.GrouperUtil.substituteExpressionLanguage@8916![39,56]: 'udemLoaderElUtils.convertDnToGroupName(distinguishedName);' undefined variable distinguishedName

[…]

 

I tried with both distinguishedName, dn, cn and subjectId, and all of them give me an “undefined variable” error.

 

 

De : Chris Hyzer [mailto:]
Envoyé : 4 juin 2012 17:02
À : Gagné Sébastien;
Objet : RE: Loader LDAP - Group name _expression_

 

Almost got it J

 

${udemLoaderElUtils.convertDnToGroupName(dn)}

 

I think there is a built-in that might do this too, not sure:

 

${loaderLdapElUtils.convertDnToGroupName(dn, null, null)}

 

If you want some of it stripped off, put that as an arg:

 

${loaderLdapElUtils.convertDnToGroupName(dn, “,dc=school,dc=edu”, null)}

 

Let me know if it works

 

Thanks,

Chris

 

From: On Behalf Of Gagné Sébastien
Sent: Monday, June 04, 2012 4:42 PM
To:
Subject: [grouper-users] Loader LDAP - Group name _expression_

 

Hello,

When configuring the Loader LDAP, how can you specify the stem where the LDAP structure will be provisioned ? It seems that the attribute “grouperLoaderLdapGroupNameExpression” is the way to go, but I can’t seem to configure it properly.

 

If I leave it empty, I have my bushy LDAP structure, but not in the right base stem, i.e.

 

groups

- stem1

  - group1

   - stem11

     - group2

- stem2

   - stem21

     - group3

 

What I would like to have is the same thing, but with a different base stem. I tried with :

 

grouperLoaderLdapGroupNameExpression =  udem:${groupAttributes['cn']}

 

But I get a flat structure under etc (the stem where my loaderLdap configuration group is)

etc

  - udem

    - group1

    - group2

    - group3

 

I tried using a custom class which builds the proper bushy group name with the right base stem, but each of the following gives me an error when the loader starts

 

grouperLoaderLdapGroupNameExpression

= ${udemLoaderElUtils.convertDnToGroupName(${groupAttributes['dn']})}

= ${udemLoaderElUtils.convertDnToGroupName(groupAttributes['dn'])}

= ${udemLoaderElUtils.convertDnToGroupName(subjectId)}

= ${udemLoaderElUtils.convertDnToGroupName(['dn'])}

= ${udemLoaderElUtils.convertDnToGroupName('dn')}

= udemLoaderElUtils.convertDnToGroupName(${groupAttributes['dn']})

(this last one does not fail, but does the same thing as the flat structure above, but with a huge prefix (udemLoaderEl…) )

 

 

I successfully used this class with the Subject _expression_ and don’t understand why it doesn’t work with the group name _expression_ :

grouperLoaderLdapSubjectExpression = ${udemLoaderElUtils.convertAdMemberDnToSpecificValue(subjectId)}

 

 

Thank you for you help

 

 

 

 

Sébastien Gagné,     | Analyste en informatique

514-343-6111 x33844  | Université de Montréal,

                     | Pavillon Roger-Gaudry, local X-100-11

 




Archive powered by MHonArc 2.6.16.

Top of Page