Skip to Content.
Sympa Menu

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

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: LDAP load from attributes


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Earl Lewis <>, "<>" <>
  • Subject: [grouper-users] RE: LDAP load from attributes
  • Date: Fri, 10 May 2013 05:04:11 +0000
  • Accept-language: en-US
  • Authentication-results: sfpop-ironport04.merit.edu; dkim=neutral (message not signed) header.i=none

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: [mailto:] 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