How to Configure Snowflake permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up snowflake permissions by creating custom roles and granting those roles to users. Each role holds specific read or write privileges on warehouses, databases, schemas, and tables. Many teams start by handing out broad admin roles to move fast during early builds. Over time, those wide privileges let any user or script alter tables or pull sensitive rows. How snowflake permissions work with role hierarchies Snowflake uses role-based rules to control every action inside the data platf

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up snowflake permissions by creating custom roles and granting those roles to users. Each role holds specific read or write privileges on warehouses, databases, schemas, and tables. Many teams start by handing out broad admin roles to move fast during early builds. Over time, those wide privileges let any user or script alter tables or pull sensitive rows.

How snowflake permissions work with role hierarchies

Snowflake uses role-based rules to control every action inside the data platform. Users never get direct privileges on tables, views, or compute warehouses. Instead, an admin creates a role and attaches specific object grants to that role. Then the admin assigns the role to a human user or a service account.

A clean setup splits functional job roles from low-level object roles. Object roles hold simple grants like read rights on one schema. Functional roles match real team jobs like data analyst or backend engineer. You grant several object roles to a functional role to build a clear hierarchy.

Every object in the platform also has a single owning role. That owner can drop the table or pass grants to other roles. Managed schemas fix this by letting only the schema owner control future grants. This rule stops table creators from sharing data with the wrong people.

Why you should separate compute and storage grants

Snowflake splits compute power from data storage in its core design. A user needs two things to run a query on any table. First, their active role needs usage grants on a virtual warehouse for compute. Second, that same role needs usage grants on the parent database and schema.

Without warehouse grants, a user can see table names but cannot run queries. Without schema grants, a user can start a warehouse but cannot read any tables. Keeping compute roles separate from data roles helps teams track cloud costs per group. It also stops small reporting scripts from using large, expensive compute clusters.

Snowflake Access Control + AI Agent Permissions: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native roles solve and what they miss

Native role hierarchies do a great job of grouping static database privileges. They define which teams can use specific warehouses and which schemas they can read. You can also set up native masking policies on columns that hold sensitive data. When a query runs, masking rewrites matched fields like emails, phone numbers, or card numbers.

Still, native grants stay active twenty-four hours a day once you assign them. A role decides who logs in, not what individual statements do in flight. If an engineer has write rights for rare fixes, they keep those rights all week. A bad script under that role can drop a table during normal work.

Rotating static passwords and private keys across many apps also takes heavy manual work. Admins must update secrets in every tool whenever a team member leaves. Native roles also lack a fast approval step for one-off production changes. Teams end up giving permanent high-level roles just to handle rare incidents.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.

Before a query runs, hoop.dev guardrails check the statement against your rules, an AI Analyzer you configure can score intent or hold risky calls for human approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Why can a user see a table name but not read its rows?

The active role has usage rights on the database and schema, not select rights. Grant select privileges on the table to that role and check warehouse usage grants.

How do future grants help manage new tables?

Future grants apply your read or write rules to new tables inside a schema. Admins do not need to run manual grant updates after every pipeline run.

Should service accounts share roles with human engineers?

No, service accounts should use dedicated roles with only the grants their task requires. Separate roles make audit logs clear and stop people from using app credentials.

The query runs. The emails stay hidden.