Purpose

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

Valid Values

userIdPassword

Behavior

If set to userIdPassword, the driver uses SCRAM-SHA-256 user ID and password authentication. The user property provides the user ID, and the Password property provides the password.

Notes

  • The userIdPassword setting is appropriate for servers that do not have authentication enabled. In a scenario where AuthenticationMethod has been set to userIdPassWord but the server has not been configured for user ID/password authentication, the driver will still connect to the database server.

  • If authentication has not been enabled, client applications will have access to all databases on the server. If authentication has been enabled, a client application will only have access to the database specified by the DatabaseName property assuming it has the required permissions. However, an application with clusterAdmin privileges will have access to all databases on the server even when authentication is enabled.

Data Source Methods

public String getAuthenticationMethod()

public void setAuthenticationMethod(String)

Default Value

userIdPassword

Data Type

String