The Simplest Way to Make Firestore and IIS Work Like They Should
Running Firestore and IIS together lets Windows web apps use a fast cloud database. Your IIS server hosts the web app while Firestore stores and syncs data in real time. Many teams still run critical business apps on Windows servers. At the same time, they want modern cloud storage that scales without manual database tuning. Linking these two systems gives teams the best of both worlds. You keep your local Windows web stack and gain a flexible document store. How firestore and iis share keys
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 Firestore and IIS together lets Windows web apps use a fast cloud database. Your IIS server hosts the web app while Firestore stores and syncs data in real time.
Many teams still run critical business apps on Windows servers. At the same time, they want modern cloud storage that scales without manual database tuning. Linking these two systems gives teams the best of both worlds. You keep your local Windows web stack and gain a flexible document store.
How firestore and iis share keys and data
To link firestore and iis, your web app needs a Google Cloud service account. This account acts as the identity for your Windows server. The IIS app pool runs under a local Windows identity on the host machine. That local identity reads a service account key file or uses federation to log in.
Once the app logs in, it uses the official client library to talk to the database. All traffic moves over encrypted web channels from the Windows host to Google Cloud. The client library handles token refresh tasks in the background while the app runs. Your web app then reads and writes documents based on the roles of that service account.
For this setup to work well, you must align your local app pool settings. Each IIS site should run in its own isolated app pool. This stops one site from reading the cloud keys of another site on the same server. You also need to make sure the Windows host keeps its system clock accurate. If the local clock drifts, cloud token checks will fail and block your database calls.
Common risks with shared keys and broad roles
The biggest risk in this setup is a static service account key file on disk. Teams often drop a key file into a shared folder on the IIS server. If an attacker compromises the web app, they can steal that file. They can then read or delete your cloud data from anywhere.
Another common mistake is giving the service account a broad project role. Many teams grant full editor rights just to get the app working fast. This means a single bug in one IIS app can wipe out collections used by other services. Instead, you should scope the role to only the specific actions the app needs.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged database queries also create blind spots for security teams. When ten developers share one admin account to fix data, audit logs show only that single account. You cannot tell who ran a read or write operation during an incident. You also risk leaking sensitive fields like emails, phone numbers, card numbers, or national IDs in query results.
Scoping permissions and network paths
Start by removing static key files whenever you can. Use workload identity federation if your Windows servers run in another cloud or link to an identity provider. If you must use a key file, lock down the folder permissions on the Windows host. Only the specific IIS app pool user should have read rights to that file.
Next, tighten your cloud permissions and network rules. Create a dedicated service account for each IIS app pool rather than sharing one across the whole server. Restrict outbound traffic from the IIS host so it only reaches required Google Cloud endpoints. Finally, review your audit logs often to spot odd query patterns from your web servers.
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 IIS store credentials for Google Cloud?
Avoid storing raw key files in your web root folder. Keep credentials in a secure path outside the site directory and restrict read rights to the specific IIS app pool identity.
Why do database calls from IIS fail after an app pool recycle?
This usually happens when the app creates too many new client instances or loses access to its key path. Reuse a single client instance across requests and verify that the app pool user keeps its file permissions.
How can teams protect sensitive data in document queries?
Use strict role scoping so each app only reads the collections it needs. You can also apply data masking so the system rewrites matched fields like emails or card numbers in results.
Related guides
In this post