---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/recipes/ydb-sdk/auth.md
  - https://ydb.tech/docs/ru/recipes/ydb-sdk/auth.md
  - href: en/recipes/ydb-sdk/auth.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/recipes/ydb-sdk/auth.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Authentication

YDB supports multiple authentication methods when connecting to the server side. Each of them is usually specific to a particular pair of environments, that is, depends on where you run your client application (in the trusted YDB zone or outside it) and the YDB server part (in a Docker container, Yandex.Cloud, data cloud, or an independent cluster).

This section contains code recipes with authentication settings in different YDB SDKs. For a general description of the SDK authentication principles, see the [Authentication in an SDK](https://ydb.tech/docs/en/recipes/ydb-sdk/auth.md).

Table of contents:

- [Using a token](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-access-token.md)
- [Anonymous](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-anonymous.md)
- [Service account file](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-service-account.md)
- [Metadata service](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-metadata.md)
- [Using environment variables](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-env.md)
- [Username and password based](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-static.md)
