arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Using the LDAP Checker Tool

This section explains how to use the LDAP Checker tool a script (ldap-checker.jar) that checks and reports on an LDAP configuration. Instructions for use are also provided in the README.txt file that accompanies the tool.

The ldap-checker script is included with the Clarity LIMS installation and is available at the following location:

/opt/gls/clarity/tools/ldap-checker

The ldap-checker script performs numerous checks of the LDAP configuration and reports on any incorrect items found.

hashtag
Script Properties

Point the script to one or more files containing (at a minimum) the database connection properties. Alternatively, set these properties from the command line.

The script loads properties from the following sources and in the following order:

  1. Any JDBC properties files specified with -f (see the table for options).

    If multiple properties files specify the same property, the last file is used.

  2. Any Java system properties specified on the command line using

    Properties specified on the command line are only checked if they do not appear in the properties files.

After the script has the basic database connection properties, it loads further settings from the corresponding Clarity LIMS database.

The following JDBC properties are required:

  • jdbc.driverClassName

  • jdbc.url

  • jdbc.username

  • jdbc.password

Options:

-f
--files
Property files to process

hashtag
Run the Script

  1. Change to the directory containing ldap-checker tool:

  2. Run the script. To specify a properties file, use the following example:

hashtag
Example Properties File

The tool includes an example database.properties file. This example shows a properties file that is specified with the -f option.

The following options are available:

  • Edit this file and use it.

  • Provide properties on the command line, using: -D.

    For example:

hashtag
Examples

hashtag
Example 1: Using SSL

Specify and provide the path to the keystore:

hashtag
Example 2: Checking Users

To check a set of specific users (even those that have not been provisioned), use the following script:

hashtag
Overriding Properties

To override properties that are typically loaded from the properties table, use command-line system properties or one or more properties files.

Using system property ( -D options must be specified before the -jar option):

Using multiple properties files:

  • In this example, Custom-ldap.properties might resemble the following:

The properties table in the database.

The properties table is only checked if the same property is not already specified in the properties file or on the command line.

-h

--help

Show usage information

-u

--users

Usernames to check

-D<propertyName>=<propertyValue>
/opt/gls/clarity/tools/ldap-checker
java -jar ldap-checker-<version>.jar -f database.properties 
-Djdbc.url=<url to properties file> 
java -Djavax.net.ssl.trustStore=/path/to/keystore -jar ldap-checker-<version>.jar -f database.properties 
java -jar ldap-checker-<version>.jar -u usertocheck -f database.properties 
java -Djavax.net.ssl.trustStore=/path/to/keystore -Dldap.managerPass=mypassword -jar ldap-checker-<version>.jar -u usertocheck -f database.properties
java -jar ldap-checker-<version>.jar -u usertocheck -f database.properties custom-ldap.properties
ldap.managerDn=CN=GLS Admin,CN=Users,DC=gls,DC=lan

ldap.managerPass=mypassword