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

Published
Length
3 min read

Luis Felipe Dias

All posts

Using bigquery and openshift together lets container apps run fast queries on cloud data. This setup helps data teams build pipelines and dashboards inside enterprise clusters. OpenShift runs your code in pods across hybrid or local servers. BigQuery stores huge datasets and runs analytic queries in seconds. Linking them well takes clear identity rules and tight permission scopes. When teams rush this link, they often leave long-lived keys sitting inside cluster secrets. A clean design ties clu

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.

Using bigquery and openshift together lets container apps run fast queries on cloud data. This setup helps data teams build pipelines and dashboards inside enterprise clusters.

OpenShift runs your code in pods across hybrid or local servers. BigQuery stores huge datasets and runs analytic queries in seconds. Linking them well takes clear identity rules and tight permission scopes. When teams rush this link, they often leave long-lived keys sitting inside cluster secrets. A clean design ties cluster identities to cloud roles and tracks every query.

How bigquery and openshift share identity and data

Apps running in OpenShift need a way to prove who they are to Google Cloud. Each pod runs under a specific Kubernetes service account inside its namespace. Instead of storing static key files, teams can map pod identities to cloud accounts. The pod gets a short token from the cluster and trades it for cloud access. Then the app sends queries to the data warehouse over an encrypted network path.

Inside the cluster, Kubernetes RBAC controls who can touch these pods and service accounts. A Role sets permissions within one namespace, while a ClusterRole covers the whole cluster. A RoleBinding grants those permissions to a user or group in that single namespace. Because RBAC rules are purely additive, there are no deny rules in this system. You must start with zero permissions and grant only what each pod needs.

Data flows back to the pod after the warehouse finishes the query job. The app reads the rows, processes the numbers, and serves them to users. If an engineer needs to debug a pod, they might read logs or run commands. In Kubernetes RBAC, those actions use subresources like pod logs or pod exec. Scoping who can use those subresources keeps people from stealing cloud tokens from running pods.

Common failure modes with shared accounts and broad roles

The biggest mistake teams make is sharing one cloud service account across many OpenShift namespaces. When every app uses the same identity, you cannot tell who ran a bad query. One compromised pod can read or delete tables meant for a different team. Even worse, teams often mount static JSON keys into pods as standard secrets. Anyone with read rights on secrets in that namespace can copy that key out.

Broad cloud roles create another major risk for your data warehouse. Giving a cluster service account full editor rights lets pods drop tables or change schemas. It also lets test apps read sensitive tables holding emails, phone numbers, or card numbers. Without field masking to rewrite matched fields in results, test pods pull raw personal data. If a developer checks pod logs, those raw emails or national IDs might leak there.

BigQuery IAM + OpenShift RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged interactive queries also hurt security and drive up cloud bills. Engineers often open a shell inside an OpenShift pod to run manual warehouse queries. Because the query uses the pod service account, cloud logs only show the app name. You lose track of which human ran the command and why they needed that data.

Scoping roles and network paths between clusters and data

Start by giving each OpenShift workload its own dedicated service account and namespace. Bind that account to a narrow Role using a RoleBinding in that single namespace. Never use a ClusterRoleBinding unless the workload truly needs access across every namespace. Restrict who can use the pod exec subresource so users cannot hijack pod credentials.

On the Google Cloud side, grant permissions at the dataset or table level. Give read-only roles to reporting apps and write roles only to ingestion jobs. Separate production and staging namespaces so test pods never touch live customer tables. Set up network egress rules in OpenShift so only approved pods reach Google APIs. Finally, require human engineers to use their own identities for ad-hoc data checks.

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

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How should OpenShift pods log in to BigQuery without static keys?

Use workload identity federation to link Kubernetes service accounts to Google Cloud service accounts. The pod trades its local cluster token for a short-lived cloud token at runtime.

How do we stop engineers from pulling cloud keys out of running pods?

Remove static keys and restrict RBAC permissions for secrets and the pod exec subresource. Use a RoleBinding in each namespace so only required admins can run commands in pods.

Why do our BigQuery audit logs show the same user for every query?

Your pods or engineers are sharing a single cloud service account for all workloads. Give each app its own account and make humans log in with individual identities.

The query runs. The emails stay hidden.