The Simplest Way to Make BigQuery and Onelogin Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You link bigquery and onelogin so teams log in to Google Cloud with single sign-on. OneLogin checks user identity, and Google Cloud grants data permissions based on group roles. This workflow stops teams from sharing static JSON keys across local laptops. Instead, analysts sign in once to run SQL queries against production data tables. Admins manage user groups in one central directory. When someone leaves the company, disabling their directory account cuts off data access right away. How big

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 link bigquery and onelogin so teams log in to Google Cloud with single sign-on. OneLogin checks user identity, and Google Cloud grants data permissions based on group roles.

This workflow stops teams from sharing static JSON keys across local laptops. Instead, analysts sign in once to run SQL queries against production data tables. Admins manage user groups in one central directory. When someone leaves the company, disabling their directory account cuts off data access right away.

How bigquery and onelogin handle sign-in and permissions

The link between bigquery and onelogin relies on federated identity standards. OneLogin acts as the central identity provider for your whole team. Google Cloud acts as the service provider that hosts your data warehouse.

First, an engineer or analyst tries to open the data console or run a query. Google Cloud redirects that sign-in request to OneLogin. OneLogin checks the user password and prompts for multi-factor sign-in. After the user passes that check, OneLogin sends a signed assertion back to Google.

That assertion tells Google who the user is and which groups they belong to. You can also set up automated user sync between the two platforms. When you add an analyst to a group in OneLogin, that group updates in Google Cloud.

Inside Google Cloud, IAM roles control which datasets and tables that group can read or change. OneLogin handles the sign-in check, while Google Cloud enforces the data rules. Data never flows back to OneLogin. The identity tool only passes identity tokens, while query results go straight to the user client.

Common failure modes with shared accounts and broad roles

Many teams set up single sign-on for the web console but skip local tools. Analysts and scripts still need to run queries from local editors and BI tools. To save time, teams often create a shared Google Cloud service account key. They pass this static JSON file around in chat channels or store it on laptops.

Shared service keys break the identity link you built with OneLogin. When five people use one service account, audit logs show the same generic account name. You cannot tell which person ran an expensive query or exported sensitive tables. Worse, a leaked JSON key works from anywhere until someone rotates it by hand.

OneLogin + BigQuery IAM: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Overbroad group roles cause another major risk in production. Admins often grant project-wide editor roles to a single directory group. Every analyst in that group can then read raw tables with emails, phone numbers, or card numbers. If an attacker steals one user session, they gain access to your whole data warehouse.

Another gap happens when contractors finish a project. Someone might remove their specific dataset role in Google Cloud by hand. Still, if their OneLogin account stays active, they still keep default project roles.

How to scope roles and audit every query

To fix these gaps, stop issuing static service account keys to human users. Require every engineer and analyst to sign in with their own OneLogin identity for local sessions. When everyone uses personal credentials, cloud logs link every query to a real person.

Next, split your OneLogin groups by job need and data sensitivity. Create separate groups for finance analysts, product analysts, and data engineers. Map each group to a narrow Google Cloud IAM role at the dataset level, not the project level.

Give most users read-only roles on clean, aggregated views. Keep raw tables with emails, phone numbers, and national IDs locked down to a small group. For customer support or general analytics, apply data masking rules so queries rewrite matched fields in results.

Finally, review your sign-in logs and query logs together on a regular schedule. Check that closed OneLogin accounts lose their active sessions right away. Set up alerts for queries that scan huge amounts of data outside normal work hours.

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 beside the service as an open-source proxy, a sidecar for your database or API.

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 review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Does OneLogin replace Google Cloud IAM roles for BigQuery?

No, OneLogin only checks who the user is and sends group membership details. Google Cloud IAM still controls which datasets and tables that user can read or write.

How do we stop teams from sharing service account JSON keys?

Turn off service account key creation in your Google Cloud team policy. Require users to sign in with their personal OneLogin accounts for all local tools and editors.

What happens to active data sessions when we disable a OneLogin user?

Disabling a user in OneLogin blocks new sign-ins right away. Still, existing cloud tokens may stay active until they expire unless you revoke them in Google Cloud.

The query runs. The emails stay hidden.