Configuring Authentication Using a Credentials File

You can configure the Simba Couchbase JDBC Driver to authenticate your connection to the database by providing a credentials file in JSON format.

The credentials file contains the credentials of one or more users, specified in the following format, where [UserName] is a user name and [Password] is the corresponding password:

[{"user": "[UserName1]", "pass":"[Password1]"}, {"user": "[UserName2]", "pass":"[Password2]"}]

For example:

[{"user": "Skroob", "pass":"12345"}, {"user": "Admin", "pass":"simba123"}]

You provide the configuration information to the connector in the connection URL. For more information about the syntax of the connection URL, see Building the Connection URL.

To configure authentication in a credentials file:

  1. Set the AuthMech property to 1.
  2. Set the CredFile property to the full path of a JSON file containing the appropriate credentials.

For example:

jdbc:couchbase://localhost:8093/default2;AuthMech=1;
CredFile=C:\\Documents\\Couchbase_JDBC_Credentials.json;