How to Configure Snowflake Backup User
You set up a snowflake backup user by creating a service account with a scoped role. Next, you attach a public key and grant read rights on specific schemas. Many data teams rush this step and attach broad admin roles instead. Broad roles let backup scripts drop tables or read raw customer secrets by mistake. A good setup limits the account to the exact objects it needs to copy. How to set up a snowflake backup user role Start by making a custom role just for your backup jobs. Never reuse an
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 a snowflake backup user by creating a service account with a scoped role. Next, you attach a public key and grant read rights on specific schemas. Many data teams rush this step and attach broad admin roles instead. Broad roles let backup scripts drop tables or read raw customer secrets by mistake. A good setup limits the account to the exact objects it needs to copy.
How to set up a snowflake backup user role
Start by making a custom role just for your backup jobs. Never reuse an admin role or a general developer role for automated tasks. The custom role needs usage rights on the permissions warehouse, database, and schemas. It also needs select rights on the tables you plan to export.
If your backup job copies data to cloud storage, grant usage on that stage. Apply future grants so the role can read new tables created later. Next, create the user account and set its default role to your custom role. Turn off password login and assign a public key for key-pair login instead. Key-pair login stops password leaks and works well for automated backup scripts.
Setting network rules and warehouse limits
A backup account should only log in from trusted servers. Create a network rule that lists the static IP addresses of your backup runners. Attach a network policy to the user account so other IP addresses get blocked. This step stops attackers from using stolen keys from outside your network.
You should also assign a dedicated warehouse to the backup role. A separate warehouse keeps heavy export queries from slowing down your daily analytics apps. Set a short query timeout and a strict credit limit on that warehouse. These limits stop runaway backup scripts from burning through your monthly cloud budget.
User Provisioning (SCIM) + Snowflake Access Control: 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 roles and network rules control who can log in and start a session. They also define which tables the backup script is allowed to read. This setup stops an outsider from logging in or deleting production data. Still, static role permissions cannot inspect what individual queries do during an active session.
Once the backup user starts a session, it can dump every row in an allowed table by default. Native grants do not rewrite sensitive fields like emails or phone numbers in query results. If a table holds card numbers or national IDs, the backup file gets them too. Teams also struggle when an engineer needs temporary rights to fix a broken backup job. Granting permanent keys to engineers leaves standing privileges open long after the fix ends.
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
Should a backup account use a password or a key pair?
Always use a key pair for automated backup accounts. Key pairs let you rotate credentials on a schedule without breaking active scripts. You should also block password logins on that account to stop brute-force attacks.
Why give the backup role its own virtual warehouse?
Backup jobs read large tables and use a lot of compute power. A dedicated warehouse isolates that heavy load from your main reporting dashboards. It also lets you track exact backup costs and set strict spending caps.
How do we handle new tables added to a schema?
Use future grants when you set up the custom backup role. Future grants give the role select rights on new tables as soon as they appear. This keeps your backups complete without manual permission updates after every release.
Related guides
In this post