Unique Value Finder

Overview#

The token-unique-name does a good job but we were in need of a method that could:

Although we wrote for use with Novell's IDM and User Provisioning products (User App) we are sure there are uses.

Use Entirely at Your Own Risk CISUS.COM nor anyone else is responsible if you use a tool or any information on this site and causes damages to anyone or anything! You are required to read Our Standard Disclaimer

Features#

Allowable Arguments#

Alphanumeric Generation#

The alphanumeric generator uses the 36 possible values for unique values consisting of the English alphabet and the numbers 0-9.

Anomalies#

All values are returned in uppercase.

You cannot specify a startValue with Alphanumeric Generation.

Allowable Arguments are: #

Numeric Generation#

Anomalies#

When using counterPad, you can not specify a startValue with Numeric Generation.

When specifying a startValue and a preFix, the maxLength is ignored.

Allowable Arguments are: #

Calling from another Java Application#

The parameters are positional specific.

Any values not specified will be obtained from the uniquevaluefinder.properties file.

You will call:

public static String findUniqueValue()
or
public static String findUniqueValue(String attributeForUniqueValue)
or
public static String findUniqueValue(String attributeForUniqueValue, String preFix)
or
public static String findUniqueValue(String attributeForUniqueValue, String preFix, String valueStart,  int maxLength,int maxTries, boolean counterPad, boolean useAlpha)
or (Note: all String value types, use "null" for empty preFix or startValue arguments)
public static String findUniqueValue(String attributeForUniqueValue, String preFix, String valueStart,  String maxLength, String maxTries, String counterPad, String useAlpha, String dummy)
!!!Command-Line When passing command-line arguments, use "null" for empty preFix or startValue arguments.

One Arguments#

Calling the program with one arguments will use all the other values from the uniquevaluefinder.properties file.
attributeForUniqueValue  

Two Arguments#

Calling the program with no arguments will use all the values from the uniquevaluefinder.properties file.
 attributeForUniqueValue  preFix 

Six Arguments#

Calling the program with no arguments will use all the values from the uniquevaluefinder.properties file.
 attributeForUniqueValue  preFix startValue maxTries maxLength  counterPad

Seven Arguments#

Calling the program with no arguments will use all the values from the uniquevaluefinder.properties file.
 attributeForUniqueValue  preFix startValue maxTries maxLength  counterPad useAlpha 

Eight Arguments#

Calling the program with no arguments will use all the values from the uniquevaluefinder.properties file.
 attributeForUniqueValue  preFix startValue maxTries maxLength  counterPad useAlpha dummy

Example#

java -jar debuguniquevaluefinder.jar "uidNumber" "null" "1001" "5" "65000" "false" "false" "dummy"

uniquevaluefinder.properties#

The properties file is used to set the LDAP connection parameters and can be used to set all other values.

Any value supplied on the command-line or via a method call, overrides the value(s) in the uniquevaluefinder.properties file.

##############################
# LDAP connection Properties
##############################
searchbase=ou=people,dc=yourcompany,dc=com
ldaphost=ldap.yourcompany.com
ldapport = 636
logindn=cn=admin,dc=yourcompany,dc=com
password=<secret>
connectvia=ssl

##############################
# Default Values
##############################
prefix=A48
maxtries=100000
attributeforuniquevalue=CN
counterpad=false
startvalue=U46Z99
maxlength=6
usealpha=true

##############################
# Do not Change following lines.
# for tests only
##############################
mytestflag=false
printflag=false

WARNING#

Do not set the values for the following parameters in uniquevaluefinder.properties to "true" in production.

LDAP Connection#

The LDAP connection is maintained until one of the following occurs: Only then the LDAP connection is disconnected.

Currently no LDAP Fail Over#

If this is a real need, let us know and we will look into adding that functionality.

LDAPS #

Yes we do LDAPS but have not added StartTLS. If this is a real need, let us know and we will look into adding that functionality.

Usage #

Command-Line Arguments

WARNING TLS or SSL no keystore#

When you use SSL or TLS connections done with this Tool, we will assume the SSL or TLS cert presented by the server is valid. No certificate Validation of the certificate presented by the LDAP server will be performed. We use our Fake Trust Manager

Error Results#

You should only get a proper value or one of the following Error Results:

Unique Value Finder Download(info)#

Unique Value Finder Download(info)

Note: the .Z extension is a simple ZIP file.

Unique Value Finder with Driver#

An example of how it is used with a DirXML driver

Unique Value Finder with User Application!!Question, Comments, Suggestions?#

Let us know.

More Information#

There might be more information for this subject on one of the following: