Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Snowflake

Steps to create Secret to store Snowflake credentials

Pre-requisites

To create a Secret for securing Snowflake credentials, you must have the following information:

See Secret: Access control for who can create a Secret and how access to it is managed.

Source System Requirements

Snowflake Secrets supports two authentication methods. Use one method per Secret.

Username and password authentication

  • Username: The Snowflake username used to authenticate to the Snowflake account. You can get this from your Snowflake administrator or account settings.

  • Password: The password associated with the Snowflake username. If you do not have it, reset it in Snowflake or contact your Snowflake administrator.

  • Role (optional): The Snowflake role to use for the connection. Provide this only if the source is configured to use a specific role.

RSA key pair authentication

  • Username: The Snowflake username used to authenticate to the Snowflake account. This can be obtained from your Snowflake administrator or found in your Snowflake account settings.

  • RSA Key Pair: Generate a public and private RSA key pair in PKCS#8 PEM format for key-pair authentication.

    • The public key (snowflake_rsa_key.pub) must be registered with your Snowflake user account using:

      ALTER USER <snowflake-username> SET RSA_PUBLIC_KEY='<your_public_key>';
    • The private key (snowflake_rsa_key.p8) will be used in the Secret manifest file.

    For key generation steps, see the Generate RSA Key Pair section.

  • Passphrase: A secure passphrase to encrypt the private key. A passphrase is not required for unencrypted private key-pair authentication.

  • Role (optional): The Snowflake role to use for the connection. Provide this only if the source is configured to use a specific role.

Ensure you have the credentials for the authentication method you plan to use before proceeding.

Create a Secret for securing Snowflake credentials

To create a Snowflake Secret in DataOS, ensure you have access to the DataOS Command Line Interface (CLI) and the required permissions. Follow the steps below to complete the creation process efficiently and securely.

Step 1: Create a manifest file

Begin by creating a manifest file to hold the configuration details for your Snowflake Secret.

Use one of the following manifest formats. The username and password format matches the Snowflake Secret manifest in the depots examples; the RSA key pair format is an alternate Snowflake authentication pattern.

Do not combine password and auth_mode: key-pair in the same Secret. Create the Secret with the authentication method you want to use.

role is optional. Provide it only if the source is configured to use a specific Snowflake role; otherwise, omit it and the user's default role is used.

For more information about each attribute, refer to the configurations section.

Step 2: Apply the manifest

To create the Snowflake Secret within DataOS, use the apply command.

Example Usage:

Step 3: Validate the Secret

To validate the proper creation of the Snowflake Secret in DataOS, use the get command.

Expected Output:

To get the list of all the Secrets within the Dataos environment, execute the following command.

Expected Output:

Delete the Secret

To delete the Snowflake Secret, use one of the following commands:

Specify the Resource type and Secret name in the delete command.

Example Usage:

Last updated

Was this helpful?