Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: [JIRA] (GRP-1474) ldap loader set pool options when using configFileFromClasspath

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: [JIRA] (GRP-1474) ldap loader set pool options when using configFileFromClasspath

Chronological Thread 
  • From: "Redman, Chad Eric" <>
  • To: "Hyzer, Chris" <>, " Mailing List" <>
  • Subject: [grouper-users] RE: [JIRA] (GRP-1474) ldap loader set pool options when using configFileFromClasspath
  • Date: Fri, 27 Jan 2017 18:37:58 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:uVxncBy77S5zFQTXCy+O+j09IxM/srCxBDY+r6Qd2usUIJqq85mqBkHD//Il1AaPBtSHra8bwLOP6ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fdbghMizexe7N/IRe5oQnMq8Uan5ZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8JwkqxVvQ6hqRJ8zY7aYo6VNeZxcKzSct4BWWpORdpdWzBdDo+gbYYCCfcKM+ZCr4n6olsDtRWyCxWyC+zyzz9HnHn20bUn2Ok/EQHJxhEvFM8BvnTOrdX6KKkeWv2ywabUzTXMde5Z1i/n6IfWbx8hpOuDXbRrfMrMz0kgCxnJgUuNpoz4Jj6Y0PkGvWuD7+d4SO6jl2Eqpxt+rzWt3MshhIvEipgUx1zZ7Sl13YY4KcOiREJle9KoDYdcuz+AO4drTc4vQGdlszsgxLIco560Zi0KxYwnxxHBb/yHdJCF7Ar/WeiWPTt0mmtpday9iBqv6ESgzfbzWdeu3FZNsypFjsLDtncQ1xzV98eLUON9/l2m2TaTyQ/c9v1EIUEzlardMZIhxaMwloYXsUTEGS/2m1/6g7ORdkUh4uSo6uLnbav6ppKEKoN4lg7zPr4hl8G9G+g1PAoDU3Ka9OihzLHj+Ff2QLROjv04iKnZt5XaKNwHqa65GQBaz54s6wyhADi71dQXh38HIUlYeBKBk4flIU/BL+3lDfunmVSjjC9rx+zaPr3mGpjNIWLDkLD8fbZl9UFc0hM/zc1E551KELEBO+n+WkvwtNzDEh85KBK4z/zmCNV7yoMRR3iPAqmHP6POr1OE/PwgLPSRZNxdhDGoYdg09fP0yTcSmUUcZuPhiZ4caGGqE+5OIl6SJ2f0j9EHV2oGo1x6BKblklqfSTNJImupUrgnzjA9FI+8C4rfHMagjKHJ+S66GpxQaShiC0uQWz+8eJ+DRu8BcmePOcJ7iRQFU6SsUYksyUvouQPnnelJNO3Rr2ciuJ7m3d4xr8bTnB162CZ1BI7Vh2qNRm1DhG4EQjYw9L15qgpwxkrVgvswuOBRCdEGv6ABaQw9L5OJl+E=
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99


For the LDAP Loader, yes, that is correct. The configFileFromClasspath option
to set vt-ldap parameters directly via an external file was working for the
ldap attributes but not the ldap pool attributes. It doesn't work to set the
validator because vt-ldap has no mechanism to set it up via parameters. Thus,
they will remain as pseudo-attributes in the grouper-loader file.

The subject sources uses a different set of classes (in the subject package
instead of the grouper package) to work a similar way, when using the
ldapProperties_file option to pull them in. Pool settings were already
working there, so I just implemented a similar code block. Note that the
validator setup needs special handling here as well, which is why there are
VTLDAP_VALIDATOR* params in sources.xml and not in the external ldap
properties file.

I didn't have a psp connection set up to test from, so I'm not familiar with
it. But the config handling looks totally separate, using ldaptive instead of
vt-ldap. From perusing the code in the pspng module, it looks to be
converting the endpoint prefixes to "org.ldaptive.*" which would potentially
allow any available property to be set; E.g.,
ldap.groupOfNames.pool.validatePeriodically = true. And a bonus for fixing
the vt-ldap bug of not allowing the validation properties to be set because
they were "is" methods instead of "get" methods. However, just like vt-ldap,
setting up a validator function may need special handling, if it can't be set
through properties.


-----Original Message-----

On Behalf Of Hyzer, Chris
Sent: Friday, January 27, 2017 9:37 AM

Mailing List
Subject: [grouper-users] RE: [JIRA] (GRP-1474) ldap loader set pool options
when using configFileFromClasspath


Thanks so much for yet another valuable pull request.

Just to clarify. Now the loader ldap connections can set the pooling options
via an external vtldap file right? And anything that uses those connections
(loader, pspng, (eventuall) sources) would benefit from that configuration,


-----Original Message-----
From: Chad Redman (JIRA)

Sent: Thursday, January 26, 2017 6:29 PM
To: Hyzer, Chris
Subject: [JIRA] (GRP-1474) ldap loader set pool options when using

Chad Redman created GRP-1474:

Summary: ldap loader set pool options when using
Key: GRP-1474
Project: Grouper
Issue Type: Improvement
Components: grouperLoader
Reporter: Chad Redman
Assignee: Chris Hyzer

In the file, there are two ways to set up
properties for LDAP sources. The primary way, and the one most documented, is
to define a series of "ldap.<sourceId>.\*" properties that set up the LDAP
config, the pool, and the optional validator function. However, a second way
to configure a source is via the property
"ldap.<sourceId>.configFileFromClasspath". In this method, the properties
defined in the file refered to in configFileFromClasspath are in the format
"edu.vt.middleware.ldap.*", and are parsed directly by vt-ldap functions, and
not by Grouper wrappers. This means that a larger set of the vt-ldap
properties can be set, rather than just the ones Grouper functions are coded
to handle.

However, parameters for pooling defined in the file are ignored. They can
still be set in the as their "ldap.<sourceId>.\*"
versions, the same as for method #1.

I have a pull request that allows the pooling options to be set in the
external file. I can also update the documentation to show how to use the
configFileFromClasspath alternative. This brings the loader config closer in
line to the sources.xml/ option for an external file via
ldapProperties_file, which could already handle pool settings.

The validator-specific properties that can be set for the source (see
GRP-1428) can't be set in the external file, as vt-ldap has no way to handle
it. These will need to continue to be set in, as
per method #1.


ldap.personLdap.configFileFromClasspath =
ldap.personLdap.validator = CompareLdapValidator
ldap.personLdap.validatorCompareDn = ou=groups,dc=example,dc=com
ldap.personLdap.validatorCompareSearchFilterString = (ou=groups)

edu.vt.middleware.ldap.ldapUrl = ldap://
edu.vt.middleware.ldap.bindDn =
edu.vt.middleware.ldap.bindCredential = XXXXXXXXXXX
edu.vt.middleware.ldap.pool.minPoolSize = 3
edu.vt.middleware.ldap.pool.maxPoolSize = 5
edu.vt.middleware.ldap.pool.validateOnCheckOut = false
edu.vt.middleware.ldap.pool.validateOnCheckIn = false
edu.vt.middleware.ldap.pool.validatePeriodically = true
edu.vt.middleware.ldap.pool.validateTimerPeriod = 270000


This message was sent by Atlassian JIRA

Archive powered by MHonArc 2.6.19.

Top of Page