Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] RE: LDAP load from attributes

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] RE: LDAP load from attributes


Chronological Thread 
  • From: "Bryan E. Wooten" <>
  • To: Chris Hyzer <>, Earl Lewis <>, "<>" <>
  • Subject: Re: [grouper-users] RE: LDAP load from attributes
  • Date: Mon, 13 May 2013 22:47:52 +0000
  • Accept-language: en-US
  • Authentication-results: sfpop-ironport04.merit.edu; dkim=neutral (message not signed) header.i=none

Thanks Chris! That is a welcome enhancement.

Can I mix and match the 2.1.4 api with the other 2.1.3 components (i.e. UI / PSP)?

I think I can give that a try in our world in fairly short order.

-Bryan

From: Chris Hyzer <>
Date: Monday, May 13, 2013 4:38 PM
To: Earl Lewis <>, "" <>
Subject: [grouper-users] RE: LDAP load from attributes

This is in 2.1.4:

 

https://bugs.internet2.edu/jira/browse/GRP-906

 

You can use the attribute: grouperLoaderLdapGroupAttribute

 

The value is a JEXL _expression_ with the variable: attributeValue

 

e.g. to specify a few values: ${attributeValue == 'a' || attributeValue == 'b'}

e.g. to restrict a few values: ${attributeValue != 'a' && attributeValue != 'b'}

e.g. to use some java methods: ${attributeName.toLowerCase().startsWith('st')}

e.g. to do a regex: ${attributeName =~ '^fa.*$' }

 

 

Thanks,

Chris

 

From: [] On Behalf Of Chris Hyzer
Sent: Friday, May 10, 2013 1:04 AM
To: Earl Lewis; <>
Subject: [grouper-users] RE: LDAP load from attributes

 

We can do a JEXL _expression_:

 

    variableMap.put("attributeName", "staff");

    String value = GrouperUtil.substituteExpressionLanguage("${attributeName == 'staff'}", variableMap, true, true, true);

    System.out.println("True? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName == 'staff' || $attributeName == 'student'}", variableMap, true, true, true);

    System.out.println("True? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName.toLowerCase().startsWith('st')}", variableMap, true, true, true);

    System.out.println("True? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName.toLowerCase().startsWith('fa')}", variableMap, true, true, true);

    System.out.println("False? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName =~ '^fa.*$' }", variableMap, true, true, true);

    System.out.println("regex0 False? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName =~ '^st.*$' }", variableMap, true, true, true);

    System.out.println("regex1 True? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName !~ '^fa.*$' }", variableMap, true, true, true);

    System.out.println("regex2 True? " + value);

    value = GrouperUtil.substituteExpressionLanguage("${attributeName !~ '^st.*$' }", variableMap, true, true, true);

    System.out.println("regex3 False? " + value);

 

True? true

True? true

True? true

False? false

regex0 False? false

regex1 True? true

regex2 True? true

regex3 False? false

 

That should be flexible enough, if it is missing something, let me know (note, you can include and exclude at the same time of course)

 

Thanks

Chris

 

From: [] On Behalf Of Earl Lewis
Sent: Thursday, May 09, 2013 6:52 PM
To: <>
Subject: [grouper-users] Re: LDAP load from attributes

 

OK, good to know I shouldn't be looking for something that's not there. :)

 

As far as what I'd like to see it would be great to be able to do either the includes or excludes. Doing both is probably useful as well, although I don't personally have an immediate use case that I can think of right now. 

 

What I'd like to do is something along the lines of "load all groups for attribute values that start with "aa"" or "load all groups for attribute values except those that start with "xx"".  Not sure what you could do in terms of that level of selectivity but I'd also be happy to create a list of the all the full attribute values (rather than just a "begins with") to include/exclude. 

 

Thanks so much for your responsiveness to our questions Chris. As you know we're newbs with Grouper and we really appreciate the patience and responsiveness.

 

Earl

801-581-3635 (office)

801-554-3596 (mobile)

 

On 5/9/13 3:51 PM, "Chris Hyzer" <> wrote:

 

That feature isn’t there now, but would be easy to add, do you want an includes list or excludes list or both (mutually exclusive)?

 

Thanks,

Chris

 

From: [] On Behalf Of Earl Lewis
Sent: Thursday, May 09, 2013 5:49 PM
To: <>
Subject: [grouper-users] LDAP load from attributes

 

We have setup a couple LDAP_GROUPS_FROM_ATTRIBUTES group definitions that result in many groups (one group for each value in the selected attribute), which is very, very, very useful for us (so thank you for that feature!). However, as you might imagine we have some values in the selected attributes that we don't really care to see loaded into Grouper. So the question is, can we control which values are used to create groups, and which are ignored, by the loader process?

 

Earl

801-581-3635 (office)

801-554-3596 (mobile)




Archive powered by MHonArc 2.6.16.

Top of Page