Skip to Content.
Sympa Menu

grouper-users - Re: [Ext] Re: [grouper-users] More PSP-NG: custom user attributes in userSearchFilter

Subject: Grouper Users - Open Discussion List

List archive

Re: [Ext] Re: [grouper-users] More PSP-NG: custom user attributes in userSearchFilter


Chronological Thread 
  • From: Bryan Wooten <>
  • To: "Gettes, Michael" <>, Bryan Wooten <>
  • Cc: "" <>, "" <>
  • Subject: Re: [Ext] Re: [grouper-users] More PSP-NG: custom user attributes in userSearchFilter
  • Date: Tue, 5 Jun 2018 01:17:37 +0000
  • Accept-language: en-US
  • Ironport-phdr: 9a23:2rTugRyw68morAXXCy+O+j09IxM/srCxBDY+r6Qd2u0SIJqq85mqBkHD//Il1AaPAd2Graocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HTbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDtU7s6RSqt4LtqSB/wiScIKTg58H3MisdtiK5XuQ+tqwBjz4LRZoyeKfhwcb7Hfd4CRWRPQNtfVzBPDI2/YYsADeQOPedEoIbyvFYBtweyCBO2Ce/z0DJFhnn71rA63eQ7FgHG2RQtEs8UsHXUttr1MroZXuCyzKnP0TXMcfVW0ir65YfTaBAgoeuDXbRqfcvfzkkvEB/FgUuWqYH+IjOVyv4Cs2iB4+V+SO2vlncqpgdsqTahwccsj5PGhoMTyl3c6yp5xJs1JcG5SE5/et6oCoBQtyaCO4tuWMMiRGZouCgiyr0BuJ67ejQKxI47yB7YbvyLa4iI4g7/VOaJODt1imhqd6qniBap7Eiv0e/8Wdeo31ZWtCZFk8TDu3YQ3BLQ8siKUuZx80eh1DqV0w3e6PtILV07mKfUMZIszKI8moIOvUnDHiL6glj6gLOLekk+5OSl5Prrbq/4qpKSN4J4khzyP6Uql8ClH+g1MgcDU3Kb9Oim0LDu+Uv0S6hQgPIsiKnWqpXaKNwbpqGnBw9V1Z4u6xenDzeh0NkUh2UII05fdBKak4jmIVHOLOrmAviinlSgiDZrx/bYMb39GpjBM3jOnbf7cbt56UNQ0hc/wN9Q6p5OBLwNPOr/Wkrru9zZCh85PRa0w+HiCNhlzYweQ2KODbWfMK/Iv16I4eUvI/WSa48Tozv9NuQl6OTujXMjh1ASYLSp0YMNaH+kBvRmP1mZYX30j9cOC2cKuRc+TPT0h12YSDJTem2yULwm5jEgE4+mCYbDRpuxgLyawiu3BJxWZmZaCl+SC3focZuLW+sSZC6IPMBujyEEBvCdTNpr+hyyqALhj/JCL+HU8yAc/9q329Vp++DIvQw88Xp5A9nLlymnVXB9mCs3QDgq0aY39UZn216Fl7d/hOBVE/RO+/pJFAo2KMiP4fZ9DoXYQBPIeJ+2T1G6T9PuVTsrX9s3hcAJZFpwHf2/khnDmSemHulGxPSwGJUo//eEjDDKLMFnxiODjfF5gg==

I am a recovering Java programmer. I swear if I never see a null pointer exception again, I will die a happy man…

But I can still backtrace a Java stack dump in a log file for a clue.

I tried to read the Jexl docs from Apache and Grouper and was immediately lost…

I would ask readers to share their Jexl strings…

So I turned to my tried and true Java IDE (Netbeans / shoot me / not Eclipse or Jetbrains) and did some simple Java string parsing. I may have included some grouper jars files and some Apache Jexl jars…

Garbage in / Garbage out stuff.

“Co-programming” with a very competent co-worker (AD expert and knows more than enough about Linux/ shell).

Honestly our biggest set-back was that Loader Diagnostics for LDAP quit working (SQL works fine)? On our to-do / figure out list. I made a post re: this issue to no avail. :(

BTW, if anyone is interested, we figured out how to do a SQL loader job against a CSV file (don’t ask why data feeds are still so out-dated).

-Bryan

From: "Gettes, Michael" <>
Date: Monday, June 4, 2018 at 6:42 PM
To: Bryan Wooten <>
Cc: "" <>, "" <>
Subject: Re: [Ext] Re: [grouper-users] More PSP-NG: custom user attributes in userSearchFilter

Ok, this makes more sense.  I read your reply a couple of days ago and I just didn’t get it.

Maybe you can answer the next question I had - I need to write some jexl that will alter variables.  How would I test this without actually invoking grouper loader and PSPNG?  Seems awfully expensive to try something and then fire up the loader to see if it works.  I’d like to construct some variable values and then run the jexl over it to see if it was modified correctly.  I’m not a Java geek so this may be easy but I just need the magical incantation to make it happen.

Ideas?

Thanks!

/mrg

On Jun 4, 2018, at 8:13 PM, Bryan Wooten <> wrote:

Last week my co-work and I spent most of a day trying to figure out Jexl.

The wiki examples were trivial. But we had a use case to load AD groups into Grouper keeping the AD hierarchy. (cn=group1, ou=groups, ou=dept1, ou=majorOrg,dc=school,dc=edu) where all the ou’s become stems/folders and the cn is the group name).

Using a basic LDAP filter like (&(objectclass=group)(cn=hospital*))

So the wiki provided no complete list of methods available to the Java class LoaderLdap.ElUtils.

So we ended searching for the source (LoaderLdap.ElUtils) on Git. And found the exact method needed. It performed as expected! Victory.

Grouper can be made very functional via configuration only, if you know the subtleties of the syntax and relations to the various property files.

I know submissions to the wiki are encouraged, but sometimes I feel a grouper-documentation list could be a benefit. But I have had bad ideas before.

-Bryan

From: <> on behalf of "Gettes, Michael" <>
Date: Monday, June 4, 2018 at 3:46 PM
To: Paul Engle <>
Cc: "" <>, "" <>
Subject: [Ext] Re: [grouper-users] More PSP-NG: custom user attributes in userSearchFilter

******************************************************
WARNING: Stop. Think. Read. This is an external email.
******************************************************

+1 - this is part of where the documentation is lacking a little bit and what led to the questions I had about JEXL in grouper and how it is used.

/mrg

On Jun 4, 2018, at 5:16 PM, Paul Engle <> wrote:

Erik,
  Is this in an LdapGroupProvisioner or an LdapAttributeProvisioner? In the group provisioner, anytime I've needed something from the user entry, I've referenced it as ${ldapUser.getStringValue('foo')}.  I've only used the ${subject} reference in the attribute provisioner. I don't know if that makes a difference or not, or under what contexts each of those objects is available.

  -paul
 
-- 
Paul Engle
Office of Information Technology
713-348-4702


On Mon, Jun 4, 2018 at 3:44 PM Coleman, Erik C <> wrote:
Hello,
 
As a follow-up to my two subject sources scenario, I’m having trouble with custom subject attributes. I now have PSP-NG turned on, and it successfully syncs groups that are set with the provision_to attribute, but when it comes time to add members, I’m getting this error in the logs:
 
grouper-api;grouper_error.log;2018-06-04 19:36:59,091: [uofi_urbana-FullSync-Thread] ERROR Provisioner.evaluateJexlExpression(556) - - Jexl _expression_ samAccountName=${subject.getAttributeValue("samAccountName")} could not be evaluated for subject ''650000001'/'person'/'uofinetid'/null' and group 'null/null' which used variableMap '{userSearchBaseDn=ou=people,dc=ad,dc=uillinois,dc=edu, provisionerType=LdapGroupProvisioner, groupCreationBaseDn=ou=AuthMan,ou=CITES-Services,ou=CITES,ou=Urbana,dc=ad,dc=uillinois,dc=edu, utils=edu.internet2.middleware.grouper.pspng.PspJexlUtils@4f7f3b36, subject='650000001'/'person'/'uofinetid', provisionerName=uofi_urbana, groupSearchBaseDn=ou=AuthMan,ou=CITES-Services,ou=CITES,ou=Urbana,dc=ad,dc=uillinois,dc=edu}'
 
Here’s what I have set in grouper-loader.properties:
 
changeLog.consumer.uofi_urbana.userSearchFilter = samAccountName=${subject.getAttributeValue("samAccountName")}
 
This used to work in our older “pre-TIER” test environment. I’ve considered alternatives:
 
samAccountName=${subject.id}  -- won’t work because we specify subject id using our own uiucEduUIN attribute as specified in the subject.properties.
 
uiucEduUIN=${subject.id} – won’t work because one of my subject sources doesn’t use uiucEduUIN for subject id, it uses samAccountName.
 
Switching to use samAccountName for subject id won’t work, because we have too many people changing netids quite often.
 
A look at my personal subject record in Grouper appears to have everything it’s trying to evaluate:
 
Unique ID:
650000001
 
Name:
Coleman, Erik C
 
Description:
Coleman, Erik C
 
uiuceduuin:        650000001
dn:        CN=ecc,ou=People,dc=ad,dc=uillinois,dc=edu
displayname:     Coleman, Erik C
department:      Technology Services
distinguishedname:              CN=ecc,OU=People,DC=ad,DC=uillinois,DC=edu
samaccountname:          ecc
Member ID:       6fe2e751a0e14e41b896ee6cb8e23e02
Source ID:          uofinetid
Source name:    UOFI AD People
 
Why is the JEXL _expression_ getting an error? What’s the right JEXL syntax for referencing a “custom” attribute in a subject?
 
Thanks!
 
Erik Coleman
University of Illinois at Urbana-Champaign
 
 





Archive powered by MHonArc 2.6.19.

Top of Page