Authentication modes

The JDBC Driver for YDB supports the following authentication modes:

  • Anonymous is used when a username and password are not specified and no other authentication properties are configured. No authentication credentials are provided.

  • Static credentials are used when a username and password are specified.

  • Access token is used when the token property is configured. This authentication method requires a YDB authentication token, which can be obtained by executing the following YDB CLI command: ydb auth get-token.

  • Metadata is used when the useMetadata property is set to true. This method extracts the authentication data from the metadata of a virtual machine, serverless container, or serverless function running in a cloud environment.

  • Service Account Key is used when the saFile property is configured. This method extracts the service account key from a file and uses it for authentication.