The Simplest Way to Make Google Pub/Sub and Phabricator Work Like They Should
Linking google pub/sub and phabricator lets teams move code review events into cloud queues. This setup runs builds, updates tasks, and sends alerts when code changes. Phabricator tracks code reviews, tasks, and git repos for your team. Google Pub/Sub moves messages between cloud apps at high speed. When you join them, a review event can start a build job right away. Cloud apps can also post build results back to a Phabricator task. How data and keys flow between google pub/sub and phabricato
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.
Linking google pub/sub and phabricator lets teams move code review events into cloud queues. This setup runs builds, updates tasks, and sends alerts when code changes.
Phabricator tracks code reviews, tasks, and git repos for your team. Google Pub/Sub moves messages between cloud apps at high speed. When you join them, a review event can start a build job right away. Cloud apps can also post build results back to a Phabricator task.
How data and keys flow between google pub/sub and phabricator
Data flows in two ways between these two tools. First, Phabricator can send webhook events out to a cloud endpoint. That endpoint checks the event and writes a message to a Pub/Sub topic. Second, a worker app can read messages from a Pub/Sub subscription. That worker then calls the Phabricator API to update a task or review.
Each direction needs its own keys and roles. Phabricator uses API tokens tied to bot accounts or user accounts. Google Cloud uses service accounts and IAM roles to guard topics. The sender needs a publish role on the target topic. The reader needs a subscribe role and a valid Phabricator token.
Good setups keep these keys apart and scope them tight. A webhook handler only needs permission to write to one topic. A worker app only needs permission to read from one subscription. Neither app should hold full admin rights in either system.
Common risks with shared keys and broad roles
Many teams start by making one shared bot token in Phabricator. They put that same token into many cloud workers. If one worker leaks the token, an attacker can read private code. You also lose track of which worker made a change.
Service account keys on the cloud side bring similar risks. Teams often create JSON key files That never expire. Developers copy these files to local laptops for quick tests. Soon, no one knows who has publish rights to production topics.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged API calls create another big blind spot for security teams. When a worker updates a review, Phabricator logs the shared bot name. It does not log the cloud event or the human who started it. Auditing a broken build or a bad merge becomes very hard.
How to scope roles and network paths
Start by giving each worker its own bot account in Phabricator. Limit what that bot can see using project spaces and policies. Rotate the API tokens on a set schedule every few months. Store tokens in a cloud secret store instead of plain text files.
On the Google Cloud side, avoid static JSON key files when you can. Use workload identity so cloud apps get short-lived tokens by default. Grant the publish role only on the exact topic the app uses. Grant the subscribe role only on the single queue the worker reads.
Lock down the network paths between your code host and the cloud. Put your Phabricator host behind a strict firewall with an allowlist. Only let known worker IP addresses call the Phabricator API endpoints. Check webhook signatures on every message before you write to Pub/Sub. Also check message fields for emails, phone numbers, or card numbers. Masking rewrites matched fields in results before they land in task comments.
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
Can Phabricator publish straight to a Google Pub/Sub topic?
Phabricator sends standard HTTP webhooks when tasks or reviews change. You need a small receiver app to check the webhook and publish to Pub/Sub. This keeps cloud keys out of your Phabricator host.
What kind of account should call the Phabricator API from a worker?
Create a dedicated bot account in Phabricator for each worker app. Never use a real engineer's personal API token for automated cloud jobs. If that engineer leaves, the integration will break when you lock their account.
How do we stop poison messages from breaking Phabricator tasks?
Set up a dead-letter topic on your Google Pub/Sub subscription. If a worker fails to update Phabricator after a few tries, move the message there. Your team can inspect and fix the bad message later.
Related guides
In this post