---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.3
alternate:
  - https://ytsaurus.tech/docs/en/flow/yql/authentication.md
  - https://ytsaurus.tech/docs/ru/flow/yql/authentication.md
  - href: https://ytsaurus.tech/docs/en/flow/yql/authentication.md
    type: text/markdown
    title: Markdown version
  - href: https://ytsaurus.tech/docs/en/llms.txt?revision=181542d8c2d9f36be925894a517db8203cafae65
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://ytsaurus.tech/docs/en/llms.txt?revision=181542d8c2d9f36be925894a517db8203cafae65

<!-- source: en/_includes/flow/yql/authentication.md -->
# Authentication in YQL over YTsaurus Flow

To authenticate with YTsaurus as someone other than your query's submitting user, or with external providers, add token through YTsaurus UI.

## Uploading a token to Cypress {#upload-token}

Before adding a token in UI settings, upload file containing it to Cypress. Example command:

```bash
cat /path/to/local/secret | yt --proxy <pipeline-cluster> write-file //path/to/secret
```

{% note warning "Token file security" %}

You are responsible for securing your token file using ACLs.<br>
Only you should have access to this file — make sure no one else has permission to read this node.

{% endnote %}

## Adding a token {#add-token}

To add a token:

1. Open **Settings** using its gear icon at bottom left.
2. Select **Queries** in your settings sidebar.
3. Under **Request tokens**, click **Add Query Token** and specify Cypress path to your token file.
4. Attach tokens to your query: open **Tokens** using its key icon in your top toolbar and select tokens to attach.

## Token names {#token-names}

To use a token by default without specifying additional pragmas, choose its name by provider:

- `default_ytflow` — for access to internal YTsaurus Flow tables.
- `default_yt` — for access to YTsaurus.

To select a custom token for a query, use its provider's `{provider}.Auth` pragma.
<!-- endsource: en/_includes/flow/yql/authentication.md -->
