How to Configure Cursor Bigquery Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up cursor bigquery read only access by linking the editor to a viewer role. You then pass those cloud credentials to a database tool or local shell session. Many engineering teams start by sharing their own personal cloud credentials with the coding agent. When those developer roles have broad write permissions, the agent can change or delete production tables. A small prompt mistake can trigger a bad query that wipes out vital records. How to set up cursor bigquery read only access S

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 cursor bigquery read only access by linking the editor to a viewer role. You then pass those cloud credentials to a database tool or local shell session. Many engineering teams start by sharing their own personal cloud credentials with the coding agent. When those developer roles have broad write permissions, the agent can change or delete production tables. A small prompt mistake can trigger a bad query that wipes out vital records.

How to set up cursor bigquery read only access

Setting up safe cloud database permissions starts inside your cloud provider identity console. First, an admin creates a dedicated service identity for the coding agent to use. Next, the admin assigns a role that only allows reading table metadata and running select queries. This role blocks any attempt to create, update, or drop tables in the project.

Once the cloud role is ready, the developer sets up the local coding tool. AI coding agents reach external databases through Model Context Protocol servers or local shell tools. The developer links the restricted cloud identity to the local database server tool. When the agent needs to check a schema, it sends a request through this server. The cloud database checks the role permissions before it runs the query and returns rows. If the agent tries to write data, the cloud service rejects the request right away.

What native roles solve and what they leave open

Native cloud roles do a good job of stopping accidental writes and table drops. They decide who can log in and which datasets that identity can read. This setup protects the integrity of your stored data from bad update statements.

Still, static cloud permissions cannot inspect what individual select queries do in flight. A read role still lets an AI agent pull millions of rows at once. Even worse, read queries return sensitive customer data stored inside those cloud tables. If a table holds emails, phone numbers, card numbers, or national IDs, the query reads them. Those raw values flow back into the local editor and out to the model provider. Native role settings also force teams to store credential files on developer laptops. If a local key leaks, an attacker gains full read access to every allowed dataset.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why local agent keys create audit blind spots

Sharing service keys across a team makes security audits very hard to run. When five developers use the same read role, cloud logs show one shared identity. Security teams cannot tell which person or agent prompt ran a costly query. Rotating those keys also breaks local setups and slows down daily engineering work.

Teams also lack a central way to approve sensitive read queries before they run. Local editor prompts ask the user for approval, but developers often click through them fast. Without query inspection, sensitive columns flow straight into external model prompts without any filtering.

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

How does Cursor run queries against BigQuery?

The editor connects to external databases through Model Context Protocol servers or terminal commands. These local tools use your cloud credentials to send SQL queries and read results.

Does a read-only role hide sensitive customer columns?

No, a standard read role allows full select queries on all permitted tables. Without field masking that rewrites matched fields in results, queries return raw emails and card numbers.

Why should teams avoid storing service keys on laptops?

Local credential files can leak through bad scripts, stolen laptops, or broad agent file reads. Removing static keys from laptops stops attackers from stealing persistent read permissions.

The query runs. The emails stay hidden.