How to Configure BigQuery Password Policy

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a bigquery password policy in your cloud identity provider, not in the database. BigQuery does not store local user passwords or run its own password rules. Instead, it relies on Google Cloud accounts and external login providers to check user logins. Teams link their company directory to Google Cloud and enforce password length and rotation rules there. Still, when teams assign broad database roles to those accounts, users can still run risky queries. How a bigquery password policy

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 bigquery password policy in your cloud identity provider, not in the database. BigQuery does not store local user passwords or run its own password rules. Instead, it relies on Google Cloud accounts and external login providers to check user logins. Teams link their company directory to Google Cloud and enforce password length and rotation rules there. Still, when teams assign broad database roles to those accounts, users can still run risky queries.

How a bigquery password policy works in practice

To enforce password rules for human users, admins use Google Cloud Identity or Workspace. You set rules for minimum length, character types, and reset timers in the admin console. Many teams also connect an external login provider using federation. In that setup, your main identity provider checks the password and MFA token before login. Once the user logs in, Google Cloud IAM checks their assigned roles to allow query runs.

Apps and scripts do not use human passwords to read or write data. They use service accounts instead. Service accounts rely on workload federation or downloaded JSON keys to prove their identity. A strong security plan treats service account key rules as part of your password policy. Admins set org policies to block new key creation or force regular key rotation. This stops old static keys from sitting on laptops or in code repos for years.

Why identity rules alone leave data gaps

Strong login rules and key limits stop strangers from entering your cloud account. They prove who the user is before the session starts. Yet login checks cannot control what a valid user does once they are inside. IAM roles grant permissions at the project, dataset, or table level. If an analyst has read permissions on a customer table, they can query every row by default.

This creates a gap during daily database work and support tasks. A user with a valid password can still pull full tables of emails or card numbers. Static IAM roles also stay active all day, even when no one needs them. Native cloud logs record that a query ran, but they cannot pause a bad statement first. Login rules verify the person at the door, while queries run without statement-level checks.

Application-to-Application Password Management + BigQuery IAM: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing service keys and human sessions safely

Securing data warehouse sessions requires looking past the initial login screen. Teams need a way to remove shared service account keys from local developer machines. Engineers should log in with their own directory accounts for every query tool they use. Each query should go through a check before it hits the data warehouse.

When you check statements in flight, you can apply data masking to sensitive columns. Masking rewrites matched fields like phone numbers or national IDs in the query results. High-risk commands, such as dropping a table or exporting data, can wait for peer approval. Combining identity password rules with query-level controls keeps both accounts and table data safe.

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

Does BigQuery have a built-in password setting?

No, the data warehouse does not manage local database users or passwords. You must set password rules in Google Workspace, Cloud Identity, or your federated login provider.

How do you enforce password rules for service accounts?

Service accounts use cryptographic keys or token federation instead of passwords. You secure them by disabling static key creation and using short-lived tokens through workload federation.

Can IAM password policies hide sensitive columns in query results?

No, password policies only control how users log in to their cloud accounts. To hide emails or card numbers in results, you need column-level security or dynamic data masking.

The query runs. The emails stay hidden.