The Simplest Way to Make Azure Storage and Google Pub/Sub Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair azure storage and google pub/sub to move event data across clouds. A file write in Azure triggers a message in Google Cloud for downstream apps. This setup lets teams store raw files in one cloud and process events in another. You do not need to move all your apps to one single cloud vendor. Instead, each cloud handles the specific task it does best for your team. How azure storage and google pub/sub pass data and keys The workflow starts when an app writes a new blob to an Azure

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.

Teams pair azure storage and google pub/sub to move event data across clouds. A file write in Azure triggers a message in Google Cloud for downstream apps.

This setup lets teams store raw files in one cloud and process events in another. You do not need to move all your apps to one single cloud vendor. Instead, each cloud handles the specific task it does best for your team.

How azure storage and google pub/sub pass data and keys

The workflow starts when an app writes a new blob to an Azure container. Azure detects this file change and emits a storage event to its event service. A serverless worker or event hook picks up that notice right away.

Next, that worker must log in to Google Cloud to send the message. The best method uses workload identity federation between the two cloud providers. Azure issues a short token that represents the specific worker identity.

Google Cloud checks this token against a trust rule you set up beforehand. When the check passes, Google grants a temporary role to the Azure worker. The worker then writes the file metadata into the Google topic as a message. Downstream workers on Google Cloud read the message and fetch the Azure file.

Common failure modes and how to scope roles

Many teams make the mistake of using long-lived service account keys for this link. Engineers export a static key file from Google and paste it into Azure settings. If that key leaks, an attacker can write fake events to your topics. Static keys also break production workflows when someone forgets to rotate them on time.

Broad permissions create another big risk in cross-cloud event pipelines. Teams often grant full storage admin or topic owner roles just to make things work. A compromised worker could then delete buckets or read messages from unrelated topics.

Azure RBAC + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix this by scoping roles down to the single resource level. Give the Azure worker permission to publish to one Google topic only. Give the Google consumer permission to read from one specific Azure blob container. Never share one service identity across multiple apps or dev and prod stages.

How to secure network paths and audit logs

Cross-cloud traffic often travels over the public internet by default. You should restrict which network addresses can talk to your storage buckets and topics. Set up firewall rules on Azure so only known Google egress addresses can read blobs. Require encrypted transport for every single call between the two cloud platforms.

Unlogged reads and writes also hurt teams during security reviews or outages. When a bad message enters a topic, you need to know who sent it. Turn on data read and write logs in both Azure and Google Cloud. Make sure every worker uses a distinct identity so your logs show clear actions. Mask sensitive fields like emails, phone numbers, or card numbers before sending event payloads.

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 does Azure send events to Google Cloud without static keys?

Use workload identity federation between the two clouds. Azure gives your worker a managed identity token, and Google swaps it for a short access token.

Should I put the whole file inside the Google message?

No, message buses work best with small payloads. Send only the file path and metadata in the message, then let the reader fetch the blob.

What happens if Google is down when a file lands in Azure?

Use an event queue with a retry rule and a dead-letter bucket on the Azure side. Failed events wait in the queue until the topic responds again.

The query runs. The emails stay hidden.