The Simplest Way to Make Google Pub/Sub and Harness Work Like They Should
You pair google pub/sub and harness to trigger pipelines from live cloud events. One tool sends messages while the other runs build and deploy jobs. Teams use this pair to connect cloud events to fast software delivery. When an event lands on a topic, a pipeline starts right away. You can also send build status notes back to a topic. Other apps can read those notes to track each release. How google pub/sub and harness pass data and roles Data flows between these two tools in two main ways. F
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 pair google pub/sub and harness to trigger pipelines from live cloud events. One tool sends messages while the other runs build and deploy jobs.
Teams use this pair to connect cloud events to fast software delivery. When an event lands on a topic, a pipeline starts right away. You can also send build status notes back to a topic. Other apps can read those notes to track each release.
How google pub/sub and harness pass data and roles
Data flows between these two tools in two main ways. First, a message on a topic can start a pipeline run. Second, a pipeline step can write a new message to a topic. Both paths need clear trust rules between your cloud project and your pipeline tool.
To set up trust, you create a dedicated cloud service account. This account needs a narrow role for the single topic it uses. For reading messages, give the account a subscriber role on that resource. For sending messages, give it a publisher role on that topic alone.
Your pipeline runner uses this cloud identity to talk to the message bus. When you run a local worker in your cloud, it can use workload identity. Workload identity ties the worker to the cloud account without static keys. If your worker runs outside that cloud, you must store a key in a secret store. The pipeline then reads the secret when a job starts.
Push triggers work well when the message bus sends HTTP calls to a webhook. You set up a push subscription that points to the pipeline webhook URL. You also attach a token or secret to the webhook URL. The pipeline tool checks that token before it starts any job. This check stops outside actors from starting fake builds.
Common failure modes and how to scope access
Many teams fail by using one big service account for all pipelines. If one pipeline breaks or leaks a key, every topic is at risk. A bad actor could read all messages or trigger production jobs. Shared keys also make audit logs hard to read during an incident. You cannot tell which team or job sent a bad message.
End-to-End Encryption + Harness Security Features: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Broad roles cause another common problem in cloud projects. Teams often grant project-wide editor roles just to get a webhook working fast. A project-wide role lets a pipeline touch storage buckets and compute nodes it should not see. Always scope roles down to the exact topic or subscription needed for that one job.
Unlogged payloads can also create risk when messages hold user data. Sometimes an event message includes an email, phone number, or card number. If a pipeline logs the full raw event, those fields stay in build logs. Masking rewrites matched fields in results so emails and card numbers do not leak into logs. You should also strip private fields before sending events to build tools.
Network paths between the two systems need tight rules as well. If you use pull subscriptions, place your pipeline workers inside a private network. Let those workers reach the cloud API through private network routes. This setup keeps message traffic off the public internet. Rotate any stored keys on a regular schedule and remove unused subscriptions right away.
Keeping event payloads and pipeline runs clean
Message queues can retry failed deliveries many times if a webhook times out. If your pipeline takes too long to reply, the topic sends the same event again. This retry loop can start five builds for the same code change. Make sure your webhook answers fast and checks the message ID first.
You should also set up a dead-letter topic for bad messages. When a message fails to trigger a build after a few tries, move it aside. Your team can inspect the dead-letter topic later and fix the broken payload. This simple step keeps your main queue clean and fast.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How does a message on a topic start a pipeline run?
You create a push subscription on your topic that points to a pipeline webhook. When a message arrives, the topic sends a payload to the webhook to start the run.
What role does the pipeline worker need to send messages?
Give the worker service account the publisher role on the single target topic. Avoid granting project-wide roles so the worker can only write to that one place.
How can we avoid storing static cloud keys in our build tool?
Run your pipeline worker inside your cloud cluster and turn on workload identity. The worker will use short-lived cloud tokens instead of long-lived static key files.
Related guides
In this post