How to Configure BigQuery Grant Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up bigquery grant permissions by assigning cloud roles to users or groups. You can apply these rules at the project, dataset, or table level. Many teams start by giving broad project roles to speed up work. Broad roles let anyone read or change sensitive data across every table. When a single account has wide rights, one mistake can drop key tables. A stolen key can also expose private customer records across the whole project. How bigquery grant permissions work in cloud projects Clo

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 bigquery grant permissions by assigning cloud roles to users or groups. You can apply these rules at the project, dataset, or table level. Many teams start by giving broad project roles to speed up work. Broad roles let anyone read or change sensitive data across every table. When a single account has wide rights, one mistake can drop key tables. A stolen key can also expose private customer records across the whole project.

How bigquery grant permissions work in cloud projects

Cloud access control links an identity to a role on a specific resource. An identity can be a person, a team group, or an app account. A role holds a list of allowed actions, like running a job. The resource is the exact project, dataset, or table the user wants.

Roles pass their rights down from top resources to lower ones. If you grant a role on a project, it covers all datasets inside. If you grant it on one dataset, it covers only those tables. Teams can also set rules on single tables or specific views. This inheritance model means you must plan your top roles with care.

Keep job running rights separate from data reading rights in your setup. A user needs one role to run a query in a project. That user needs a second role to read the target dataset. Splitting these two roles keeps users from scanning tables they do not need. You can also use authorized views to share specific query results with others. The user reads the view without getting direct rights to the base table.

Why static roles leave gaps during live queries

Static cloud roles do a great job of deciding who can log in. They also define which tables a user or app can touch. This setup works well for stable apps and fixed reporting pipelines. It gives you a clear base layer of control in the cloud.

Still, static roles do not inspect what individual SQL statements do in flight. Once a user has read rights on a table, they read every row by default. Once an engineer has write rights, they can run a bad update statement. Cloud roles stay active until an admin removes the user from the group. People often keep high rights long after they finish a quick fix.

BigQuery IAM + AI Agent Permissions: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Data tables also hold sensitive fields like emails, phone numbers, and card numbers. Setting up fine column rules on hundreds of tables takes lots of time. Teams often skip column rules because they slow down daily data work. Without live checks on results, queries return raw emails and national IDs. Masking rewrites matched fields in results before they reach the client screen. Teams also need a way to approve risky statements one by one.

Best practices for managing dataset and table roles

Always grant roles to team groups instead of single user accounts. When someone leaves a team, remove them from the group in one step. Avoid basic owner or editor roles on live data projects at all costs. Use narrow roles that match the exact task the team needs to do.

Put your sensitive tables inside a separate project or a dedicated dataset. Give most analysts read access only to clean, shared views in another dataset. Review your active role bindings every month to spot old accounts. Remove unused app keys and temporary roles as soon as work ends.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

What is the lowest level for setting data permissions?

You can set permissions down to individual tables, views, and specific columns. Many teams manage rules at the dataset level to keep daily admin work simple.

How do you let a user run queries without reading all data?

Give the user a project role that only allows running query jobs. Then grant them data reader rights only on the specific dataset they need.

Why can a user still read a dataset after you remove table rights?

Permissions flow down from the folder and project levels to lower items. Check if the user belongs to a group with a broad project role.

The query runs. The emails stay hidden.