The Simplest Way to Make Backstage and Cosmosdb Work Like They Should
Teams pair backstage and cosmosdb to manage database resources from one developer portal. This setup lets developers spin up, track, and inspect database containers through self-service catalogs. Backstage acts as the central home for service owners and platform engineers. CosmosDB stores fast, global data for the apps those teams build. When you link them well, teams spend less time waiting on manual database tickets. They can check container health, view ownership, and request new databases 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.
Teams pair backstage and cosmosdb to manage database resources from one developer portal. This setup lets developers spin up, track, and inspect database containers through self-service catalogs.
Backstage acts as the central home for service owners and platform engineers. CosmosDB stores fast, global data for the apps those teams build. When you link them well, teams spend less time waiting on manual database tickets. They can check container health, view ownership, and request new databases from one screen.
How backstage and cosmosdb share identity and data
To work together, the portal must talk to your cloud account and database APIs. Backstage uses cloud plugins or custom actions to read metadata from Azure. First, a developer logs into the portal using the company identity provider. Then, the portal checks which team the developer belongs to.
When the portal fetches database metrics, it calls the cloud control plane. It uses a cloud identity or service principal to read container names and throughput limits. The portal then shows this data on the service page next to the code repo.
Data flows in two ways between these tools. The first path is control plane traffic, which creates databases or reads billing tags. The second path is data plane traffic, where plugins run queries to check live items. Both paths need strict role rules so one team cannot change another team's data.
Common failure modes and how to scope roles
Many teams start by giving the portal one master database key. This shared key has full admin rights over every account and container. If that key leaks from the portal server, an attacker can read or delete everything. Also, shared service accounts ruin your audit logs.
When twenty engineers run actions through one portal identity, the database logs show one user. You cannot tell which engineer ran a heavy query or deleted a record. Unlogged queries also expose sensitive fields like emails, phone numbers, card numbers, and national IDs.
CosmosDB RBAC + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, split your roles by task and by team. Give the portal catalog reader rights on the control plane only. Never store master read-write database keys inside static portal files. Use managed cloud identities with short lifetimes instead of permanent secrets.
Next, lock down the network path between the portal host and the database. Place both systems inside private virtual networks or restrict traffic to known IP ranges. Map every database action back to the logged-in human user, not just the server.
Building a clean self-service workflow for database teams
A good portal workflow separates day-to-day checks from high-risk changes. Developers should see container status, region settings, and index rules right on their component page. This read-only view needs very low permissions and carries almost no risk.
When a developer needs to create a new container, use a template action. The template asks for the team name, data region, and throughput cap. Instead of writing straight to the database, the template can open a pull request. Your deployment pipeline then checks the rules and builds the database safely.
For live data checks, teams must protect customer records during support tasks. Data masking rewrites matched fields in results, such as card numbers or national IDs. This lets engineers fix app bugs while keeping private customer fields safe during live checks.
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
Should Backstage hold primary read-write keys for CosmosDB?
No, storing primary keys in the portal creates a huge security risk for your data. Use scoped cloud identities that only read metadata, and tie data queries to individual users.
How do we track which developer ran a query from the portal?
Shared portal accounts hide user names in standard database logs. You must pass the logged-in user identity through the request so audit logs record the person.
Can we mask personal data when teams inspect items?
Yes, you can apply data masking on query results before they reach the screen. Masking rewrites matched fields like emails and phone numbers so teams can debug safely.
Related guides
In this post