skip to main content
Connection property descriptions : AuthenticationMethod
  

Try DataDirect Drivers Now

AuthenticationMethod

Purpose

Determines which authentication method the driver uses when establishing a connection.

Valid values

ActiveDirectoryPassword | auto | kerberos | ntlmjava | ntlm2java | userIdPassword

Behavior

If set to ActiveDirectoryPassword, the driver uses Azure Active Directory (Azure AD) authentication when establishing a connection to Azure. In addition to specifying a user ID and password, a value must be specified for the HostNameInCertificate property. All communications to the service are encrypted using SSL.
If set to auto, the driver uses SQL Server authentication or Kerberos authentication based on the following criteria.
*If a user ID and password is specified, the driver uses SQL Server authentication when establishing a connection. The User property provides the user ID. The Password property provides the password.
*If a user ID and password is not specified, the driver uses Kerberos authentication when establishing a connection.
If set to kerberos, the driver uses Kerberos authentication when establishing a connection. The driver ignores any values specified by the User and Password properties. The driver uses the authentication technology based on the value specified for the LoginConfigName property to establish a Kerberos connection.
If set to ntlmjava, the driver uses NTLMv1 or NTLMv2 depending on the size of the NTLM password. NTLMv1 is used if the password is 14 bytes or less; NTLMv2 is used if the password is more than 14 bytes. A user ID and password must also be specified. If the user ID and password are unspecified, the driver throws an exception. In addition, the driver requires the name of the domain server that administers the database server. You can specify it using the Domain property. If the Domain property is unspecified, the driver attempts to determine the domain server name from the User property. If no domain is specified, the driver throws an exception.
If set to ntlm2java, the driver uses NTLMv2 authentication. A user ID and password must also be specified. If the user ID and password are unspecified, the driver throws an exception. In addition, the driver requires the name of the domain server that administers the database server. You can specify it using the Domain property. If the Domain property is unspecified, the driver attempts to determine the domain server name from the User property. If no domain is specified, the driver throws an exception.
If set to userIdPassword, the driver uses SQL Server authentication when establishing a connection. The User property provides the user ID. The Password property provides the password. If a user ID is not specified, the driver throws an exception.

Notes

*If your are configuring your environment for Kerberos constrained delegation, AuthenticationMethod must be set to kerberos.
*The User property provides the user ID. The Password property provides the password.
*Azure AD authentication (AuthenticationMethod=ActiveDirectoryPassword) requires Java SE 7 or higher.
*When using Azure AD authentication (AuthenticationMethod=ActiveDirectoryPassword), the driver requires root CA certificates to establish an SSL connection to a database. The driver determines the location of the truststore containing the required certificates by using the default JRE cacerts file, unless a different file has been specified by the javax.net.ssl.trustStore Java system property. The truststore location cannot be specified using the driver's Truststore property.
*If you specify AuthenticationMethod=ntlmjava when the LMCompatabilityLevel has been restricted to NTLMv2, an error will be returned. When the LMCompatabilityLevel has been restricted to NTLMv2, AuthenticationMethod must be set to ntlm2java.

Data source method

setAuthenticationMethod

Default

auto

Data type

String

See also

*Authentication
*Authentication properties