---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/reference/languages-and-apis/jdbc-driver/properties.md?version=main
  - https://ydb.tech/docs/ru/reference/languages-and-apis/jdbc-driver/properties.md?version=main
sourcePath: en/core/reference/languages-and-apis/jdbc-driver/properties.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# JDBC driver properties

The JDBC driver for YDB supports the following configuration properties, which can be specified in the [JDBC URL](#jdbc-url-examples) or passed via additional properties:

* `saKeyFile` — a path to the service account key file for authentication. {#saKeyFile}

* `iamEndpoint` — custom IAM endpoint for authentication using a service account key.

* `token` — token value for authentication. {#token}

* `tokenFile` — a path to the file with token value for authentication. {#tokenFile}

* `useMetadata` — indicates whether to use metadata authentication. Valid values are: {#useMetadata}

  * `true` — use metadata authentication.
  * `false` — do not use metadata authentication.

  Default value: `false`.

* `metadataURL` — custom metadata endpoint.

* `localDatacenter` — the name of the data center local to the application being connected.

* `secureConnectionCertificate` — a path to the custom CA certificate file for TLS connections.

{% note info %}

The values of the `saKeyFile`, `tokenFile`, or `secureConnectionCertificate` properties can be either absolute paths from the file system root or relative paths from the user's home directory. Examples:

* `saKeyFile=~/mysakey1.json`

* `tokenFile=/opt/secret/token-file`

* `secureConnectionCertificate=/etc/ssl/cacert.cer`

{% endnote %}

## JDBC URL examples {#jdbc-url-examples}

<!-- source: en/reference/languages-and-apis/jdbc-driver/_includes/jdbc-url-examples.md -->
- Local Docker container with anonymous authentication and without TLS:<br/>`jdbc:ydb:grpc://localhost:2136/local`
- Remote self-hosted cluster:<br/>`jdbc:ydb:grpcs://<host>:2135/Root/<testdb>?secureConnectionCertificate=~/<myca>.cer`
- A cloud database instance with a token:<br/>`jdbc:ydb:grpcs://<host>:2135/<path/to/database>?tokenFile=~/my_token`
- A cloud database instance with a service account:<br/>`jdbc:ydb:grpcs://<host>:2135/<path/to/database>?saKeyFile=~/sa_key.json`
<!-- endsource: en/reference/languages-and-apis/jdbc-driver/_includes/jdbc-url-examples.md -->
