Skip to content

How to Configure Snowflake Key-Pair Authentication

August 2026

Snowflake key-pair authentication works when the private key file, the assigned RSA public key, and the target Snowflake user all line up with the role and warehouse the workload actually needs.

Short Answer

To configure Snowflake key-pair authentication, generate a PKCS8 private key and matching public key, assign the public key to the Snowflake user with ALTER USER ... SET RSA_PUBLIC_KEY = ..., and then point the client at the private key file. The docs recommend key-pair auth and note that it is required when MFA is enforced, so the normal production shape is account, user, private_key_path, plus the database, schema, warehouse, and role that workload needs.

A typical flow is the exact one in the docs: openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out snowflake_key.p8 -nocrypt, then openssl rsa -in snowflake_key.p8 -pubout -out snowflake_key.pub, then ALTER USER skippr_svc SET RSA_PUBLIC_KEY="...". After that, set SNOWFLAKE_ACCOUNT, SNOWFLAKE_USER, and SNOWFLAKE_PRIVATE_KEY_PATH in the environment. If the private key file is correct and the user has the right grants, Snowflake auth stops being a human-login story and becomes a repeatable workload identity.

Why Teams Struggle with This

Key-pair auth tends to break at the seams between systems: key generation, user assignment, file paths, and Snowflake privileges. The error often shows up as a generic auth failure, but the root cause is usually one of those boundaries.

  • The private key has to be in the format Snowflake expects. A random PEM file or the wrong conversion path can fail even before Snowflake evaluates the user grants.
  • Assigning the public key to the wrong Snowflake user is a common mistake, especially when teams test with a personal account and deploy with a service account.
  • A working auth identity can still fail the workload if the role lacks USAGE on the warehouse or database, USAGE and CREATE TABLE on the raw schema, or CREATE SCHEMA on the database.
  • File-path issues matter in automation. A key that exists on a laptop does not help if the runner cannot access the same .p8 path at runtime.

How Skippr Handles It

Skippr maps cleanly to Snowflake key-pair auth because the public connector surface already includes the fields that matter: account, user, private_key_path, database, schema, warehouse, role, and optional staging controls. That makes it easy to tell whether the problem is authentication, authorization, or staging configuration.

The service-account path in the docs is especially useful here. A dedicated skippr_svc user with its own role gives you cleaner audit history, avoids human-account MFA drift, and makes the key-pair setup match the way production pipelines actually run.

  • Supports private_key_path directly in the Snowflake warehouse config.
  • Works with regular users or dedicated Snowflake service accounts.
  • Encourages environment-variable interpolation so the private key path and account details stay out of committed config.
  • Keeps the role, warehouse, schema, and optional stage settings explicit, which helps separate auth problems from destination-shape problems.

What the First Useful Version Looks Like

The first useful version is one Snowflake service user, one dedicated role, one warehouse, and one raw schema such as ANALYTICS.RAW. If that identity can authenticate with the private key and create the expected raw objects, the key-pair setup is doing its job.

Once that path works, add the rest of the destination shape, such as silver and gold schema creation or external staging. Do not debug every destination concern at once. Key-pair auth is easiest to trust when the first target is small and specific.