> ## Documentation Index
> Fetch the complete documentation index at: https://nango-marcin-get-deployments-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake (JWT) - How do I link my account?

# Overview

To authenticate with Snowflake (JWT), you need:

1. **Subdomain** - The subdomain for your Snowflake account, typically part of the account URL (e.g., `xy12345` in `xy12345.snowflakecomputing.com`).
2. **Account Identifier** - The unique identifier for your Snowflake account.
3. **User Name** - The Snowflake username used to authenticate with the account.
4. **Private Key** - The private RSA key in PEM format used to sign your JWT for authentication. It corresponds to the public key registered in Snowflake.

This guide will walk you through obtaining and generating these credentials within Snowflake.

### Prerequisites:

* You must have an account with Snowflake (JWT).

### Instructions:

#### Step 1: Finding your Subdomain

1. Log in to your [snowflake account](https://app.snowflake.com/).
2. Click on your account profile in the bottom-left corner, then under **Account**, select the account you wish to connect to.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/profile.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=d2d816aeb94cd24097562ffe4f297758" width="3024" height="1524" data-path="integrations/all/snowflake-jwt/profile.png" />

3. Click on **View account details** for the selected account.
4. A pop-up window will appear displaying all your **Account Details**.
5. Your **Subdomain** is the part before `snowflakecomputing.com` in the **Account/Server URL** field. For example, in `KXOPMLU-RE00572.snowflakecomputing.com`, the subdomain is `KXOPMLU-RE00572`.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/subdomain.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=ddeeaffb1cd882ebdc880d0a4b7bc6ff" width="3024" height="1524" data-path="integrations/all/snowflake-jwt/subdomain.png" />

#### Step 2: Finding your Account Identifier

1. From the same **Account Details** table above, your **Account Identifier** will be displayed within the **Account Identifier** field.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/account-identifier.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=1716e632851f0a5b35d3b1d0d3f3a61a" width="3024" height="1524" data-path="integrations/all/snowflake-jwt/account-identifier.png" />

<Note>If you are using the account locator, exclude any region information from the account locator to obtain the **Account Identifier**. This value should be provided in uppercase.</Note>

#### Step 3: Finding your User Name

1. From the same **Account Details** table above, your **User Name** will be displayed within the **User Name** field.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/account-name.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=c44e2a9f073b728f048043e88ad33039" width="3024" height="1524" data-path="integrations/all/snowflake-jwt/account-name.png" />

<Note>This value should be provided in uppercase.</Note>

#### Step 4: Generating your Private Key

1. Generate the RSA private key with the following command:

```
openssl genrsa -out rsa_key.p8 2048
```

2. Extract the corresponding public key:

```
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
```

3. To view the **Private Key**, run the following:

```
cat rsa_key.p8
```

#### Step 5: Uploading your Public Key

1. From your Snowflake account, navigate to **Projects** > **Worksheets** then click on the **+** button from the top right corner.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/projects.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=36bfca023c3680431f71ea03e1926897" width="3024" height="1524" data-path="integrations/all/snowflake-jwt/projects.png" />

2. Run the following SQL command to assign the **Public Key** to your user:

```
ALTER USER <your_username> SET RSA_PUBLIC_KEY = '<public_key_contents>';
```

<Note>`public_key_contents` refers to the public key generated in the previous step. You can use `cat rsa_key.pub` to view contents.</Note>

Once you have your **Subdomain**, **Account Identifier**, **User Name** and **Private Key**:

1. Open the form where you need to authenticate with Snowflake (JWT).
2. Enter your  **Subdomain**, **Account Identifier**, **User Name** and **Private Key** in their designated fields.
3. Submit the form, and you should be successfully authenticated.

<img src="https://mintcdn.com/nango-marcin-get-deployments-docs/SA2Km1Mnz5zcbziZ/integrations/all/snowflake-jwt/form.png?fit=max&auto=format&n=SA2Km1Mnz5zcbziZ&q=85&s=2edf6607f576cf251784c5e37c81cffc" style={{maxWidth: "450px" }} width="1000" height="1384" data-path="integrations/all/snowflake-jwt/form.png" />

You are now connected to Snowflake (JWT).
