The Simplest Way to Make Azure App Service and Firestore Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running azure app service and firestore together lets teams host web apps on Microsoft cloud while storing documents in Google Cloud. Your app uses federated identity to read and write data without saving static keys. Many teams split their stack across clouds to use specific tools. Developers might run web backends on Azure while mobile apps sync data through Google Cloud. This setup works well when you link the two clouds with clean identity rules. Poor setups rely on shared keys that create

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.

Running azure app service and firestore together lets teams host web apps on Microsoft cloud while storing documents in Google Cloud. Your app uses federated identity to read and write data without saving static keys.

Many teams split their stack across clouds to use specific tools. Developers might run web backends on Azure while mobile apps sync data through Google Cloud. This setup works well when you link the two clouds with clean identity rules. Poor setups rely on shared keys that create big security risks.

How azure app service and firestore share identity and data

In a clean setup, your Azure web app uses a managed identity. This identity issues a short token from your Azure tenant. Google Cloud checks this token through workload identity federation. Once Google Cloud trusts the token, it grants temporary database permissions to your app.

Data flows over encrypted web calls from the Azure compute host to the Google document store. You do not need to store JSON key files inside your app code. You also avoid putting static secrets into your Azure app settings. When the app scales up, every new instance gets the same clean trust path.

Permissions stay locked to the exact collections your app needs to read or write. You map the Azure identity to a specific Google role with narrow database rules. If a web app only reads product catalogs, you grant read permissions on that path alone. Write calls to other collections fail right away.

Fixing common failures with shared keys and broad roles

The biggest mistake teams make is downloading a service account key file from Google. Engineers often paste that file into Azure app settings to get things working fast. That static key never expires unless someone rotates it by hand. If the key leaks in a build log, an attacker can read your whole database.

Another common failure is granting project editor roles to the web app identity. Broad roles let a single bug wipe out every collection in your project. Instead, you should build custom roles that limit actions to specific document paths. Give each app environment its own distinct identity and its own database project.

Service-to-Service Authentication + Azure RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged database queries also cause headaches during security reviews. When ten developers and three apps share one service account, audit logs lose their value. You cannot tell which person or app changed a sensitive document. Giving every human and every app a unique identity fixes this blind spot.

Securing developer and support workflows across clouds

Production apps are only half of the access story. Engineers still need to inspect documents, fix broken records, and debug live issues. Giving developers direct console roles in both clouds creates role sprawl across two platforms. Teams end up managing two sets of groups and two sets of audit logs.

A better pattern keeps human engineers out of raw production roles altogether. Developers log in with their main work identity and request narrow permissions for a task. Every read or write action gets tied to their real name in a central log. Sensitive fields like emails, phone numbers, and card numbers get masked in query results.

Network controls add one more layer of safety between the two clouds. You can route outbound traffic from your Azure app through a fixed IP address. Then you set Google Cloud perimeter rules to accept traffic only from that address. This blocks outside hosts from calling your database even if they steal a token.

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 do we connect Azure App Service to Firestore without JSON keys?

Enable managed identity on your Azure app and set up workload identity federation in Google Cloud. Google Cloud will trust the Azure token and grant database access without saved keys.

How can we reduce latency between Azure and Google Cloud?

Place your Azure app and your Google database in regions located in the same city. Keep your queries small and cache common document reads inside your web app memory.

How should developers debug live Firestore data from Azure?

Avoid sharing the app identity with human engineers for local testing. Require developers to log in with personal accounts that enforce masking on emails and card numbers.

The query runs. The emails stay hidden.