The driver supports the User ID/password authentication. It authenticates the user to the database using a user name and password.

In addition, the driver supports the SCRAM-SHA-256 hashing mechanism for enhanced security during authentication. During the connection process, the driver determines whether to send the password in hashed form or as clear text, depending on the server's configuration.
Note: When TLS/SSL is enabled on both the server and the driver, and the server is configured to use SCRAM-SHA-256, the driver automatically uses SCRAM-SHA-256-PLUS for password encryption.

To configure the driver to use user ID/password authentication:

  1. Set the AuthenticationMethod property to userIdPassword.
  2. Set the User property to provide the user ID.
  3. Set the Password property to provide the password.
  4. Specify values for minimum required properties for establishing a connection.
    1. Set the ServerName property to specify either the IP address in IPv4 or IPv6 format, or the server name for your server.
    2. Set the PortNumber property to specify the TCP port of the primary database server that is listening for connections to the database.
For example, the following is a connection string with only the required properties for making a connection using user ID/password authentication.
Connection conn = DriverManager.getConnection 
          ("jdbc:datadirect:greenplum://server1:5432;
          AuthenticationMethod=userIdPassword;User=test;
          Password=secret);