Snowflake Dynamic Secrets

You can use Akeyless dynamic secrets to generate access credentials for Snowflake. To do this, configure a dynamic secret with the details required for Akeyless to authenticate and communicate with the relevant Snowflake account.

Prerequisites

To create a Snowflake dynamic secret, ensure that you have a Snowflake account and credentials for the admin user (with the USERADMIN role or higher).

Create a Snowflake Dynamic Secret from the CLI

👍

Tip

To set up a dynamic secret, you can either configure a connection to the target server first or provide all parameters of the target server in the secret creation command.

We recommend using dynamic secrets together with targets. It allows saving time on the secrets' configuration. To enable this flow, you must ensure that the user responsible for creating dynamic secrets has permission to access or create targets.

To create a dynamic Snowflake secret from the CLI using the existing target, run the following command:

akeyless gateway-create-producer-snowflake \
--name <New Secret Name> \
--target-name <Target Name> \
--gateway-url 'https:\\<Your-Akeyless-GW-URL:8000>' \
--role <New User Role> \
--warehouse <Wahehouse Name>

Where:

  • name: A unique name of the dynamic secret. The name can include the path to the virtual folder where you want to create the new dynamic secret, using slash / separators. If the folder does not exist, it will be created together with the dynamic secret.

  • target-name: A name of the target that enables connection to the Snowflake account. The name can include the path to the virtual folder where this target resides.

  • gateway-url: API Gateway URL.

  • role: The role to assign to the temporary user.

  • warehouse: The warehouse available to the new user with generated credentials.

If you don't have a configured Snowflake target yet, you can use the command with your Snowflake target account connection parameters:

akeyless gateway-create-producer-snowflake \
--name <Secret Name> \
--gateway-url 'https:\\<Your-Akeyless-GW-URL:8000>' \
--role <New User Role> \
--warehouse <Wahehouse Name> \
--account <Snowflake account name> \
--username <Snowflake username> \
--password <Snowflake password> \
--db-name <Database to which the generated credentials are restricted>

Where:

  • account: The Snowflake account name in xy12345.region.cloud_provider format.

  • username: The username for a Snowflake user administrator (with the USERADMIN role or higher).

  • password: The password for the Snowflake user administrator account.

  • db-name: The name of the target Snowflake database.

You can find the complete list of parameters for this command in the CLI Reference - Akeyless Producers section.

Fetch a Dynamic Snowflake Secret value from the CLI

To fetch a dynamic Snowflake secret value from the CLI, run the following command:

akeyless get-dynamic-secret-value --name <Path to your dynamic secret>

Create a Dynamic Snowflake Secret in the Akeyless Console

👍

Tip

To start working with dynamic secrets from the Akeyless Console, you need to configure the Gateway URL thus enabling communication between the Akeyless SaaS and the Akeyless Gateway.

To create dynamic secrets directly from the Akeyless Gateway, you can use the Gateway Configuration Manager.

  1. Log in to the Akeyless Console, and go to Secrets & Keys > New > Dynamic Secret.

  2. Select the Snowflake secret type and click Next.

  3. Define a Name of the dynamic secret, and specify the Location as a path to the virtual folder where you want to create the new dynamic secret, using slash / separators. If the folder does not exist, it will be created together with the dynamic secret.

  4. Define the remaining parameters as follows:

  • Target mode: In this section, you can either select an existing Snowflake Target or specify details of the target Snowflake account explicitly (e.g., if you are not authorized to create and access Targets in the Akeyless Console).

    • Use the Choose an existing target drop-down list to select the existing Snowflake Target.

    • Check the Explicitly specify target properties radio button to provide details of the target Snowflake account on the next step of the wizard.

👍

Tip

We recommend using dynamic secrets together with targets. It allows saving time on the secrets' configuration. To enable this flow, you must ensure that the user responsible for creating dynamic secrets has permission to access or create targets.

  • User Role: Enter the Snowflake role to be assigned to temporary users.

  • Warehouse Name: Enter the name of the target Snowflake warehouse.

  • User TTL: Provide a time-to-live value for a dynamic secret (i.e., a token). When TTL expires, the token becomes obsolete.

  • Time Unit: Select the time unit (seconds, minutes, hours) for the TTL value.

  • Gateway: Select the Gateway through which the dynamic secret will create users.

  • Protection key: To enable Zero-Knowledge, select a key with a Customer Fragment. For more information about Zero-Knowledge, see Implement Zero Knowledge

  1. If you checked the Explicitly specify target properties radio button, click Next.

  2. Provide details of the target Snowflake account:

    • Account Name: Enter the Snowflake account name in the xy12345.region.cloud_provider format.

    • Account Username: Enter the username for a Snowflake admin user (with the USERADMIN role or higher).

    • Account Password: Enter the password for the Snowflake admin user account.

    • DB Name: Enter the name of the target Snowflake database.

  3. Click Finish.

Fetch a Dynamic Snowflake Secret value from the Akeyless Console

  1. Log in to the Akeyless Console, and go to Secrets & Keys.

  2. Browse to the folder where you created a dynamic secret.

  3. Select the secret and click Get Dynamic Secret button.


Did this page help you?