snowflake-auth-private-key-path

--snowflake-auth-private-key-path is a path parameter that specifies the location of the private key file used for Snowflake key pair authentication. This parameter is available in Liquibase Pro/Secure and requires a valid license.

Uses

When using key pair (PKI) authentication with Snowflake, you must provide the path to your private key file. This parameter tells Liquibase where to find the private key needed to authenticate your connection.

Key pair authentication provides several advantages over password-based authentication:

  • No password storage — Eliminates the need to store database passwords in configuration files or environment variables.

  • Automated authentication — Ideal for CI/CD pipelines and automated processes that require non-interactive authentication.

  • Enhanced security — Private keys can be protected with additional encryption and access controls.

  • Rotation support — Keys can be rotated without requiring changes to application code.

You must set --snowflake-auth-private-key-path when:

  • Using PKI authentication — You've configured --snowflake-auth-type to use key pair authentication.

  • Automated deployments — Your CI/CD pipeline authenticates to Snowflake using certificate-based credentials.

  • Security compliance — Your organization requires certificate-based authentication instead of passwords.

Note: This parameter must be used in conjunction with --snowflake-auth-type. If your private key is encrypted (recommended), you must also provide --snowflake-auth-private-key-passphrase.

Path Handling

Absolute vs Relative Paths: Use absolute paths (e.g., /home/user/key.p8 or C:/keys/key.p8) to avoid path resolution issues. Relative paths are resolved from the current working directory and may cause problems if Liquibase is run from different locations.

Cross-Platform Considerations: Use forward slashes (/) even on Windows, as Java handles the conversion automatically. For paths with spaces, enclose the entire path in quotes: "C:/Program Files/keys/key.p8".

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.snowflake.auth.privateKeyPath: <path>

Global flow file argument (example)

stages: Default: actions: - type: liquibase command: update globalArgs: {snowflake-auth-private-key-path: "<path>"}

Global CLI parameter

liquibase --snowflake-auth-private-key-path=<path> update --changelog-file=mychangelog.xml

JVM system property (JAVA_OPTS Environment Variable)

Unix:

JAVA_OPTS=-Dliquibase.snowflake.auth.privateKeyPath=<path>

Windows:

JAVA_OPTS=-D"liquibase.snowflake.auth.privateKeyPath"=<path>

LIQUIBASE_SNOWFLAKE_AUTH_PRIVATE_KEY_PATH=<path>

LIQUIBASE_SNOWFLAKE_AUTH_PRIVATE_KEY_PATH=<path>