How to Configure Windsurf Bigquery Least Privilege
You set up windsurf bigquery least privilege by granting scoped roles to the agent identity. You also limit which datasets and tables that identity can read or change. Teams often let the AI editor use their personal cloud login on a laptop. That shortcut gives the agent broad rights across production data and billing projects. If a prompt goes wrong, the agent can run huge scans or drop tables. How windsurf bigquery least privilege works in practice Cognition renamed Windsurf to Devin Deskto
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 windsurf bigquery least privilege by granting scoped roles to the agent identity. You also limit which datasets and tables that identity can read or change. Teams often let the AI editor use their personal cloud login on a laptop. That shortcut gives the agent broad rights across production data and billing projects. If a prompt goes wrong, the agent can run huge scans or drop tables.
How windsurf bigquery least privilege works in practice
Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The app keeps the same IDE features and uses the Cascade agent. This agent can run terminal commands on its own when the user gives permission. It opens a dedicated shell that loads the local user shell setup. Because of this, the agent inherits local aliases and shell variables.
The Cascade agent also talks to external tools through Model Context Protocol servers. Whether the agent uses the shell or an MCP tool, it needs cloud keys. To enforce least privilege, you must stop the agent from using your personal login. Instead, you create a dedicated cloud identity just for the coding agent.
Next, you grant that identity only the minimum roles needed for the task. You split job permissions from data permissions in your cloud project. The agent needs one role to run query jobs inside a workspace project. It needs a separate read role on the specific dataset it must inspect. You do not grant project-wide read roles or admin rights to this identity.
You can also set query size limits on the project to control cloud spend. This setup stops the agent from touching other datasets in the same cloud account. When the agent runs a command in its shell, it uses these limited keys.
Why static cloud roles leave a runtime gap
Native cloud roles do a good job of scoping which datasets an identity can reach. They block the agent from reading tables outside its assigned dataset. They also stop the agent from deleting datasets if you only grant read rights. This is a strong first step for any team using AI coding tools.
Still, static roles only check who logs in at the start of a request. They do not inspect what individual queries do while they run in flight. If an agent has read rights on a customer table, it can read every column. The native role cannot stop a query from pulling emails, phone numbers, or card numbers. Those sensitive values go straight into the agent context and out to the model provider.
Least Privilege Principle + BigQuery IAM: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Static keys on a developer laptop also create a key management problem. Because the agent shell loads local variables, any script in that shell can read the key. If you give the agent write rights for a staging task, those rights stay active. The agent could run a drop or delete statement before a human notices. Cloud audit logs will show the service identity, not which prompt or user triggered it.
Closing the gap with query-level controls
To fix this, teams need controls that work at the query level in real time. You should separate the right to run a query from the raw data returned. Data masking rewrites matched fields like emails or national IDs in query results. This keeps sensitive text out of the model prompt while letting schemas stay clear.
Teams also need a way to pause risky commands for human review before they run. Tying every query log back to an individual user identity makes audits clear and fast.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev sits inline in the protocol beside each supported service as an open-source proxy, a sidecar for your database or API. For every query or command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.
First, hoop.dev guardrails block banned queries before they run or hold risky ones for review, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Does Devin Desktop use the same setup as Windsurf?
Yes, Windsurf became Devin Desktop in June 2026 and keeps the same IDE features. Its Cascade agent still runs terminal commands and uses MCP servers the same way.
Why should the agent not use my personal cloud login?
The agent shell loads your local setup and inherits all your personal permissions. A separate identity limits what the agent can read or change if a prompt fails.
Can cloud roles stop an AI agent from reading sensitive columns?
Standard dataset roles grant read access to whole tables at once. To rewrite sensitive fields like card numbers in results, you need runtime data masking.
Related guides
In this post