Module org.hsqldb

Class LdapAuthBeanTester


  • public class LdapAuthBeanTester
    extends java.lang.Object
    Tests the settings for LdapAuthBean.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] sa)
      Run this method to try and test configuration settings for LdapAuthBeans, or to troubleshoot.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LdapAuthBeanTester

        public LdapAuthBeanTester()
    • Method Detail

      • main

        public static void main​(java.lang.String[] sa)
                         throws java.io.IOException
        Run this method to try and test configuration settings for LdapAuthBeans, or to troubleshoot. It purposefully does not test the Java Function or the JDBC layer at all. This program will attempt to retrieve and display the schema/roles list for the specified user and with the specified password from the LDAP server according to the specified properties.

        Passwords typed on the command line are inherently not secure, so only use this program when the computer it is run on is secured and where your command line may not be observed, directly or indirectly, by others.

        Set the properties in a properties file to match your LDAP security and Directory Information Tree structure and use this program to check everything between the LdapAuthBean and your LDAP server. You then know the exact settings to use for an LdapAuthBean that you can plug into AuthBeanMultiplexer.

        Run with no arguments to see required syntax.

        The property file may contain any of the following properties, which exactly match the corresponding setter methods in this class.

        • trustStore. This is the only property without a corresponding setter method. Setting this property has the same effect as setting Java system property 'javax.net.ssl.trustStore'.
        • startTls. Takes a boolean value according to method java.util.Boolean.parseBoolean.
        • roleSchemaValuePattern. Corresponds to method setRoleSchemaValuePatternString
        • accessValuePattern. Corresponds to method setAccessValuePatternString
        • ldapPort
        • securityMechanism
        • ldapHost
        • principalTemplate
        • initialContextFactory
        • saslRealm
        • parentDn
        • rdnAttribute
        • rolesSchemaAttribute
        • accessAttribute

        Tokens like ${this} will not be expanded to system property values, and your bean will get the values exactly as you type them in.

        The file sample/ldap-exerciser.properties in the HyperSQL distribution may be used as a template or example.

        Parameters:
        sa - arguments
        Throws:
        java.io.IOException - on io error