Connecting Metabase to Snowflake with key pair authentication

Set up a self-hosted Metabase connection to Snowflake with an RSA key pair or workload identity instead of a password, and understand why the role field does not limit access.

On this page

Connecting Metabase to Snowflake with key pair authentication

A security or data team that needs Metabase querying Snowflake should plan for a connection without a stored password. Snowflake blocks password authentication for service users by October 2026, and Metabase's Snowflake connection supports an RSA private key in PEM format with an optional passphrase. The alternative is Workload Identity Federation, where the Metabase host's AWS IAM role, Azure managed identity or GCP service account is picked up by the Snowflake driver with no extra credential fields in Metabase. Confirm with your Snowflake administrator which method your accounts and service users support before you start, because the choice changes where the secret lives and who rotates it.

This work is a connection and access design task, not only a form fill. The key pair route means generating the key, registering the public key on the Snowflake service user, storing the private key and any passphrase on the Metabase host under controls your security team accepts, and setting a rotation procedure that does not interrupt syncs. The Role field does not limit what the Metabase user can see. Metabase uses the combined permissions of every role granted to that user in Snowflake, and the field only sets the default role in the connection string. Access must therefore be restricted in Snowflake itself, by granting the service user a dedicated role with read access only to the databases, schemas and tables you intend Metabase to expose.

Choose the warehouse with the same care. Pick a dedicated virtual warehouse for Metabase queries so that dashboard load cannot slow other workloads, and set its size and auto-suspend behavior with your data team. Before rollout, test the connection with the key in place, confirm that a user with no Snowflake grants beyond the intended role cannot reach restricted schemas, and record the role grants in your access review evidence. Ask your DeployOpen contact to scope these steps in writing so the key handling, role design and verification are agreed before the build starts.

Where credentials and permissions sit in the connection

The connection starts on the self-hosted Metabase host, which holds either an RSA private key (with an optional passphrase) or no secret at all when Workload Identity Federation picks up the host's cloud identity. That credential authenticates the Snowflake service user. The user's granted roles decide what data is reachable, because Metabase combines every role granted to the user. The default role and warehouse only set where a session starts. Check the trust boundary between your server and Snowflake, and confirm which roles the service user holds.

Credentials authenticate the service user, and granted roles determine data access.

What you need before configuring the connection

Five things have to be settled before you open the Snowflake connection form in Metabase: the service user, the key pair, the network path, the Metabase host and how credentials will be stored or identified. Each one changes what you enter in the form and who can later reach the warehouse.

A dedicated Snowflake service user

Create a service user for Metabase rather than reusing a person's account. Snowflake's documentation ties the login to the account's authentication policy, so a service user keeps the key and the access owner separate from any individual. Confirm with your Snowflake administrator which network policy and authentication method apply to that user before you test the connection.

Metabase Snowflake docs

RSA key pair generation and registration

Generate an RSA key pair, store the private key as a PEM file with a passphrase if you use one, and register the public key on the Snowflake service user. Metabase accepts the private key in the connection form, so the file must be readable only by the service that handles the connection. Record which key version is registered so you can rotate it without a surprise outage.

Password deadline year
2026

Network path from the Metabase host

Confirm that the server running Metabase can reach your Snowflake account endpoint over the network path your security team approves, including any egress firewall, proxy or private connectivity arrangement. Test this from the same host and user that run the Metabase JAR or container, because a path that works from a laptop can still fail from the server.

A self-hosted Metabase with database admin access

You need a self-hosted Metabase instance and an admin account that can open Admin settings, then Databases, and add or edit a Snowflake connection. Check that the instance runs a version whose Snowflake driver supports RSA key authentication, and confirm the application database is PostgreSQL or another production store rather than the embedded H2 file.

Key storage or workload identity host type

Decide early whether Metabase will hold a private key or whether the host will authenticate through an AWS IAM role, Azure managed identity or GCP service account using Workload Identity Federation. Key storage needs a secrets process for rotation and access. Workload identity removes stored credentials from Metabase but requires the cloud identity to be mapped to the Snowflake user, so confirm that mapping with your Snowflake and cloud teams first.

Configuring the key pair connection step by step

This sequence takes a Snowflake service user from password-free setup to a working Metabase connection, with each step closed by a check so the team knows the previous step held before moving on. It produces a connection that authenticates with an RSA key and runs queries under a role you chose on purpose.

  1. Generate the RSA key pair

    The Snowflake administrator or platform engineer creates a private key and matching public key on a workstation or secrets host that you control, using a standard key generation tool. Decide whether the private key will carry a passphrase, and record where it will be stored, since the Metabase server needs it later. Store the private key in your secrets manager, not in a shared folder or a ticket. You know this step is done when the private key is in PEM format, the public key file exists alongside it, and the file permissions limit reads to the people who need them.

  2. Register the public key on the service user

    A Snowflake administrator assigns the public key to a dedicated service user for Metabase, using the key-pair attribute on that user. Use a user that exists only for Metabase, not a personal account, so that access can be reviewed and revoked without affecting people. Confirm that password login is disabled for this user, since Metabase should not hold a password for it. You know this step is done when a test login with the private key succeeds from a host outside Metabase and the user shows the registered public key in Snowflake.

  3. Grant a narrow role and set the default

    Create or choose a Snowflake role that contains only the database, schema and table privileges Metabase needs for the questions and dashboards your team will build. Grant that role to the service user and set it as the default role. Metabase combines the permissions of every role granted to the user, so do not grant the user additional roles for convenience, and review the role grants with the same care as the grant itself. You know this step is done when a query run as the user with its default role returns only the expected objects, and a SHOW GRANTS TO USER check lists no unplanned roles.

  4. Choose the warehouse and its size

    Pick a dedicated virtual warehouse for Metabase so its query load can be separated from ETL and other teams, and confirm which warehouse the default role can use. Ask the Snowflake administrator for the warehouse's auto-suspend and auto-resume settings and its size, because these drive how much compute Metabase consumes when dashboards refresh. Metabase's own sync and scan schedules also query the warehouse, so note these for later tuning. You know this step is done when the service user can run USE WAREHOUSE on the chosen warehouse and the administrator can see its usage in Snowflake.

  5. Add the Snowflake connection in Metabase

    A Metabase administrator opens the database settings, selects Snowflake, and enters the account, username, warehouse and role. In the authentication field, choose the RSA private key option, paste the PEM contents or point to the mounted key file as your deployment supports, and enter the passphrase only if you set one in the first step. Keep the Role field aligned with the default role you granted, understanding that it sets the default and does not restrict access. You know this step is done when the form saves without error and the database appears in the admin list with the expected name.

  6. Run the connection test

    Use the connection test in the Metabase database settings and read the result closely, because a failure can come from the account identifier, the key format, the passphrase or the user registration. If the test fails, compare the error with the Snowflake login history to see whether the key reached Snowflake, and check the Metabase server logs for the driver message. Do not switch to a password as a shortcut, because this removes the control the page is built around. You know this step is done when the test reports success and the Snowflake login history shows a key-authenticated session from the Metabase host.

  7. Run a sample query and confirm scope

    Open a new question against one table the team expects to see, and run a simple count and a filtered query. Then run the same query against a table the role should not reach, and confirm that Snowflake denies it. This is the check that the role boundary sits in Snowflake, not in Metabase. Record the query results and the denial in the change ticket so the access decision is traceable. You know this step is done when the permitted table returns rows, the restricted table fails at the warehouse, and both results are recorded for the reviewer.

Key pair or workload identity: choosing the method

The RSA key pair method works on any host that can run Metabase, whether it sits in a data center, a private cloud or a public cloud VM. You generate a private key, register the matching public key on the Snowflake service user, and give Metabase the private key in PEM format. If the key is encrypted, you also supply the passphrase in the connection settings. Because the key lives in your environment, your team owns its entire lifecycle.

  • Key generation: Generate the key pair with a method your security team approves, and record where the private key is stored and who can read it.
  • Passphrase handling: An encrypted PEM adds a second secret to manage, so confirm how the passphrase is stored and rotated.
  • Rotation: Plan a rotation schedule that adds the new public key to the Snowflake user, updates Metabase, then removes the old key.
  • Storage burden: The private key is a long-lived secret on the Metabase host or in its secret store, so access to that host becomes access to the warehouse user.
  • Operational effort: Every rotation and host rebuild repeats the key handoff, which recurs for the life of the connection.

Confirm with your security team how the private key is protected at rest and who can read it on the Metabase host before choosing this method.

Mapping Metabase settings to Snowflake objects

This table pairs each Metabase connection field with the Snowflake object it points to and states what that setting controls and what it leaves open. Read the last column first: several fields look like access controls but only choose a starting point, so the effective permissions come from the grants on the user.

Metabase field or conceptWhat it sets in SnowflakeWhat it controlsWhat it does not control
AccountThe Snowflake account identifier that hosts the warehouseWhich Snowflake account Metabase connects toWhich databases, schemas or tables the user can read
UserA Snowflake service user, ideally created for Metabase aloneThe identity Snowflake authenticates and auditsIts privileges, which come from the roles granted to it
Authentication methodWhether the user signs in with an RSA key pair or a passwordHow Metabase proves its identity to SnowflakePermissions, since key pair and password users can hold the same grants
Private key and passphraseThe public key registered on the service userWhether the Metabase host can sign in without a stored passwordAccess scope; anyone holding the private key can act as the user
RoleThe default role in the connection stringWhich role Snowflake activates when the session startsAccess restriction; Metabase still gets the combined permissions of every granted role
Granted rolesRoles assigned to the service user with GRANT ROLEThe actual data and object privileges available to MetabaseNothing outside the grants; this is where least privilege must be set
WarehouseThe virtual warehouse used for query computeWhich compute resources run queries and what they costWhich data is visible
Database and schemaThe default database and schema for the sessionWhere unqualified table names resolve and where sync startsAccess to other databases or schemas the granted roles already cover

Why the role field does not limit what the Metabase user can see

The Role field in the Metabase Snowflake connection does not restrict what the Metabase user can read. Metabase gets the combined permissions of every role granted to that Snowflake user. The Role field only sets the default role in the connection string, so queries run under that role first. Any other role granted to the user still applies, and Metabase can reach whatever those roles allow. Treat the Role field as a convenience setting, not as an access control.

The control that matters sits in Snowflake. Create a dedicated, read-only role for Metabase, grant it usage on the specific warehouse and database, and grant select only on the schemas and tables that analysts need to query. Do not grant Metabase's user roles such as ACCOUNTADMIN, SYSADMIN or broad functional roles that happen to be assigned to the same service user. Then confirm the user has no other role grants by listing them in Snowflake before go-live, and repeat that check after any role change. Confirm the exact grant statements and privilege names against Snowflake's current documentation for your account edition.

Metabase permission groups do not replace Snowflake grants. Groups and data permissions inside Metabase control what each Metabase user sees in the application, but they run on top of the single database connection that Snowflake authorizes. Record this split in your access design: who may query which schema is decided in Snowflake, and who may open which saved question or collection is decided in Metabase. Keep both views in your access review so that a reviewer can trace a Metabase user to the Snowflake role that actually determines their data reach.

Hardening the key pair connection

Key pair authentication removes the stored password, but the private key, the Snowflake grants and the network path still decide what the Metabase service user can reach. The cards below cover the controls that connect those pieces, from the PEM file on the host to the query history you review afterward.

Protect the PEM file and passphrase

The RSA private key in PEM form is the credential Metabase presents to Snowflake, so anyone who copies it can act as the service user. Store the file on the Metabase host with read access limited to the service account that runs Metabase, and keep the passphrase in your secrets manager rather than in a shared runbook. Check file permissions and backup copies as part of the review, because a key left in an old image or snapshot is still a live credential.

Snowflake connection docs

Plan key rotation

Snowflake assigns one public key to the service user, so rotation means generating a new key pair, registering the new public key, updating the private key Metabase reads, and then retiring the old key. Schedule the steps in a change window and confirm that Metabase can sync and query before you remove the previous public key. Record who owns the rotation so it does not slip after the initial setup.

Grant least privilege to the service user

Metabase uses every privilege that flows from every role granted to the user, so the Role field in the connection is not a boundary. Grant the service user only the warehouse usage, database and schema privileges that the analytics need, and revoke roles that were added for convenience. Review grants whenever someone adds a role to the user, since the new privileges apply to Metabase immediately.

Disable password fallback for the service user

Once the service user authenticates with a key, remove any password it still holds and make sure no one can set one through a separate login path. Metabase's docs state that Snowflake blocks password authentication for service users by October 2026, so a password left on the account becomes a risk you did not plan for. Test the account after the change to confirm the key path still works.

Restrict the network path

Snowflake network policies can limit which IP addresses may open sessions for the service user, which keeps a stolen key useless outside your Metabase hosts. Confirm the outbound addresses your Metabase host uses, including any NAT gateway or proxy, before you apply the policy, because a wrong range will break syncs and queries. Ask your Snowflake administrator to document the policy next to the key registration.

Audit the Metabase user's query history

Review Snowflake query history for the Metabase service user on a schedule, looking for queries that fall outside the dashboards and sync jobs you expect. Unusual volume, unfamiliar tables or queries run at odd hours are signals to investigate with the Metabase admin team. Keep the review tied to the grants, so any access the query history reveals can be traced back to a role.

Common Snowflake connection failures and fixes

This table pairs each symptom you are likely to see while connecting a self-hosted Metabase to Snowflake with its probable cause and the fix to try first. Work through the rows in order when a connection test fails, and check the role and warehouse rows before assuming any data access problem is a bug.

SymptomLikely causeFix
Authentication fails right after registering the public keyThe key was registered on a different Snowflake user than the one entered in Metabase, or the user name case does not matchConfirm the user name in the Metabase connection matches the Snowflake user where the public key was set, then retest the connection
Snowflake rejects the key as malformed or invalidThe public key was pasted with its PEM header or line breaks altered, or the wrong half of the pair was registeredRegister only the public key body in the form Snowflake expects, and regenerate the pair if the private key file was lost
Key loads in Metabase but fails with a passphrase errorThe passphrase entered in Metabase does not match the one used when the private key was encrypted, or the key was not encrypted and a passphrase was enteredLeave the passphrase blank for unencrypted keys, or re-enter the exact passphrase used at key creation
Connection works but tables show data the team did not expectThe Metabase user holds several roles, and Metabase uses the combined permissions of all of them, not only the role in the Role fieldList every role granted to the Metabase user, revoke those not needed, and set the Role field only to choose the default role
Queries return errors on tables the role appears to coverThe role lacks USAGE on the warehouse or database, or the schema privileges needed to read tablesGrant USAGE on the warehouse and the required database and schema privileges to the role, then rerun a sample query
Warehouse not found or queries queue indefinitelyThe warehouse named in the connection does not exist, is suspended, or the role cannot operate itCheck the warehouse name and state in Snowflake, grant the role operate and usage rights, and confirm it is the warehouse intended for Metabase
Workload identity not picked up on the Metabase hostThe host has no attached AWS IAM role, Azure managed identity or GCP service account, or the Snowflake user is not mapped to that identityAttach the identity to the host, confirm the Snowflake user is configured for that identity, and check that the driver runs where the identity is available
Password login still expected to workSnowflake blocks password authentication for service users by October 2026, as stated in Metabase's Snowflake documentationMove the service user to RSA key pair or Workload Identity Federation now, rather than planning a password fallback

Questions buyers ask before configuring Snowflake for Metabase

Can open source Metabase connect to Snowflake with key pair authentication?

Yes, the Snowflake connection itself is part of the Metabase database connection options, and it accepts an RSA private key in PEM format with an optional passphrase. The plan matters for other things around it, not for this connection. Single sign-on, row and column level permissions and usage auditing are limited to the Pro and Enterprise plans, according to Metabase's pricing page, so an open source deployment will manage Snowflake access through the Snowflake side and its own Metabase groups. Confirm the current connection options against the Metabase Snowflake docs before you design around them, since the page is the source for what the connection form accepts.

Why does the Snowflake role field not limit what Metabase can see?

The Role field only sets the default role in the connection string. Metabase warns that it receives all permissions combined from every role granted to the Metabase user in Snowflake, so a user holding a broad role can see data even when the default role is narrow. The practical fix is to give the Metabase service user a dedicated role that grants only the schemas and tables the analytics team needs, and to check the user's full set of granted roles in Snowflake during setup and after every change.

Is the Snowflake password option still an option for new Metabase connections?

Metabase's Snowflake documentation says Snowflake blocks password authentication for service users by October 2026 and recommends RSA key pair or Workload Identity Federation instead. If you are setting up a new connection now, plan for key pair or workload identity from the start rather than migrating later. Check Snowflake's own announcement for the exact enforcement scope on your account, because the date and rules belong to Snowflake and your account configuration decides how they apply.

What drives the effort and time for a Snowflake setup?

The Metabase side of the connection is short. Most of the effort comes from the Snowflake side: creating the service user, the role and its grants, the warehouse sizing and auto-suspend settings, generating and storing the key pair, and agreeing with the data owners which schemas are in scope. Effort rises with the number of databases, the number of roles people already hold, whether you use Workload Identity Federation with AWS, Azure or GCP, and whether network policies or private connectivity need changes. Ask any provider to break its estimate into these items.

What must our team provide before a partner starts the Snowflake work?

Expect to provide a Snowflake account identifier and an administrator who can create users, roles and grants, a list of the databases and schemas the analytics team should reach, and the named owners who approve access. You will also need the Metabase host or hosts where the connection will run, and, if you plan to use Workload Identity Federation, access to the AWS IAM role, Azure managed identity or GCP service account attached to that host. Agree who will hold the private key and where it will be stored before the build begins.

Can our own team set this up in-house?

Yes, if you have someone who administers Snowflake roles and grants and someone who runs the Metabase host. The steps are well documented, and the hard parts are conceptual: separating the service role from human roles, verifying effective permissions, and writing down who owns the key. Teams without recent Snowflake administration experience often find the role review the slowest part. A partner is most useful when you want the design, the verification and the handover done together within a written scope.

How do key rotation and access reviews recur after go-live?

Key rotation and access reviews are recurring tasks, not one-time setup. Rotating the RSA key means generating a new key pair, registering the public key on the Snowflake service user, updating the private key in Metabase, and removing the old key once the new one works. Access reviews mean re-checking the effective permissions of the Metabase user as Snowflake roles change, since Metabase combines every granted role. Set a schedule with an owner for both tasks. Ask any provider whether rotation and review are included in the initial scope or sold as a retainer.

What should a partner quote include for this Snowflake connection?

A written quote should list each deliverable and who performs it: the Snowflake service user, role and grants design; warehouse settings; key pair generation and storage; Metabase connection configuration; or Workload Identity Federation setup if chosen; effective permission verification; testing with sample queries; and a handover covering rotation and review. It should name what the client provides, the assumptions about the Snowflake edition and network, the acceptance steps, and what is excluded, such as data modeling or dashboard work. Ask for recurring items to be priced separately from the one-time setup.

How DeployOpen scopes and delivers the Snowflake connection

DeployOpen plans the Snowflake connection for your self-hosted Metabase as a written scope, covering the authentication method, the service user, the role and warehouse, and how access is verified. The work runs in your own infrastructure, and the handover leaves your team able to rotate keys and review access.

How we scope

  • Confirm whether the connection will use an RSA key pair or Workload Identity Federation based on where Metabase runs.
  • Map which Snowflake databases, schemas and roles the Metabase service user needs, and which must stay out of reach.
  • Agree in writing the Metabase edition, the hosting target and the access review steps before work starts.

How we build

  • Create the Snowflake service user, generate the key pair and configure the PEM key and optional passphrase in Metabase.
  • Set the default role and warehouse, then test the effective permissions by querying as the Metabase user.
  • Where Workload Identity Federation is chosen, bind the host's AWS IAM role, Azure managed identity or GCP service account to the Snowflake user.

How we hand over

  • Deliver a written record of the authentication method, the service user, the grants and the key storage location.
  • Document the key rotation procedure and the steps to revoke a key if a server or secret is exposed.
  • Walk your data platform and security teams through the permission checks so they can repeat them after changes.

How we support

  • Offer ongoing support and retesting of Snowflake grants as a retainer, if your team wants continued help after handover.
  • Review the connection again when Metabase is upgraded, since upgrades can change how the connection is configured.
  • Confirm with Snowflake's current documentation the password authentication deadline and any changes to key handling before rollout.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.