We were considering a new gateway for a global industrial manufacturer. It looked like it ought to fit, so I tried it in my own subscription before we committed to it. In one test, a user could read another user's order.
I've been Zure's lead architect and technical owner since August 2026. The plan is to route all of the manufacturer's AI use through the gateway to models and MCP tools. Teams can bring their own apps. We're building a chat-driven app builder for people who don't write code.
What we needed from the gateway
A newer gateway option had just appeared, still without general availability or an SLA. We also needed to accept bearer tokens on their own, limit calls by tenant, user and calling app, and keep access private behind Front Door. The wider design uses hub-and-spoke networking and keeps internal traffic private.
I tried 12 cases. The gateway couldn't forward the caller's token and had no private access. Any client app in the tenant could get through, and one of its tool paths let one user read another user's order. A limit of three let four calls through, twice. A failover call took 20.6 seconds. I kept API Management v2 for the first version.
- Must-have failedThe caller’s token couldn’t be passed through to the backend.
- Must-have failedThere was no private access.
- Also foundAny client app in the tenant got through.
- Also foundOne tool path let one user read another user’s order.
- Also foundA limit of 3 let 4 calls through.
- Also foundA failover call took 20.6 s.
How I checked the designs
Give the plan to someone who hasn't seen the conversation
Dave Rensin's Elephant-Goldfish Model is available as an open-source plugin from Google. The elephant writes the plan with the full project and conversation context. Fresh goldfish reviewers read the written plan. They never saw the conversation, so they can point out gaps or parts that look wrong. The author decides what to change.
I was worried that API Management could become a single point of failure, so I had the elephant start goldfish reviewers to challenge the architecture, including whether we could drop that layer from the first release. We ended up keeping it. I added the same kind of review to my skill for customer decision pages. A design critic goes through the arguments and checks Azure claims against Microsoft Learn. A fresh reviewer then zooms out and looks at the decision as a whole. When I work through a plan with an agent, we can both miss that a decision only exists in the chat. I want a reviewer to catch that before we build.
Try identity changes in a developer tenant
I used a separate Entra ID sponsorship tenant so agents could build and test identity setups without touching the customer's tenant. The rules were to stay in the test tenant, keep no raw tokens and clean up everything afterwards. We could also leave tests running overnight [confirm].
One test checked when a group-assigned role showed up in an agent's on-behalf-of token. The user's token had it first. The role was missing from the agent's token at 4 seconds and present at 5 minutes. Another live test corrected a decision record. The admin needed both Privileged Role Administrator and Agent ID Administrator, and the platform API never saw the admin's token.
Put the test next to the decision
I use a spike or a live test to show an approach works before I put it in a decision record. I keep the evidence with the decision, as I did for the gateway. For app hosting, I could restrict a Container Apps sandbox port to the provider's managed identity in a test, so I dropped a planned identity exception.
Built in the app builder
Built by the team
What the sandbox doesn’t do: it protects the platform, but shows nothing about whether a built app is correct or safe for its own users.
The app builder uses one sandbox per app environment behind a shared provider. I treated the sandbox endpoint like a management plane, similar to Azure Resource Manager, and wrote the trade-offs into the decision record so the customer's security team could weigh in. I'd bring them into those decisions earlier next time.
Review found two high and three medium issues in the sandbox work, all fixed before merge. The group identities are now frozen after setup, and each environment's provider has its own identity. Those checks protect the hosting platform. We still have to check that each app works correctly and is safe for the people using it.
Cost got the same treatment. The platform agent carries 74 MCP tools in its context, which looked expensive, so I measured its prompt cache. The tool definitions stayed identical between calls, and 98 to 99% of the input came from cache. The measurement also showed that the system prompt is fixed for each conversation, so a prompt change only reaches new conversations.
Whose permissions does the backend see?
I removed subscription keys from the baseline. The caller gets an Entra token for the backend. The gateway checks it and passes it through, and the backend authorizes the request even if it came over the private network. On-behalf-of and the gateway's managed identity are the two documented exceptions to forwarding the caller's token.
Network access is not permission.
An app calls a model
An agent calls an MCP tool for a person
Agents we run have per-agent grants and act on behalf of a person, so both sets of permissions apply. With custom MCP tools in Copilot Studio, the gateway sees the connector's shared client. I also kept consent changes per backend because letting the platform edit its own consent policy would give someone who compromised it tenant-wide reach.
The MCP gateway checks the person's grant and forwards the token. Each server owner manages its app registration. Adding clients made the grants multiply, and the client ID alone couldn't reliably distinguish local clients. I proposed using Entra directly with the platform's client list.
Making identity readable for other developers
Identity was the hardest part of the design to follow, especially for developers who hadn't been in the discussions. A decision record says what we decided. It doesn't show how a person's token gets from the chat to a backend, or what changes when an agent acts for them.
So I built visual explainers for the user journeys, the architecture, identity and the providers, and put them in a handbook site for the team and the customer. The identity explainer walks through each kind of caller one step at a time: who signs in, which token the gateway checks and what the backend sees. Every term is defined once and opens in a panel wherever it's mentioned. The explainer also lists the questions that are still open.
Each page shows whether it's undecided, decided or verified, and names the decision record that settled it. The decision records decide, and a page that differs from one says so.
I build these with agents too. My skill for explainer pages tells them to lead with visuals, use a step-through player for anything that happens in order, and check every page at phone width. The agents draft from the decision records and research, and I go through the story. The pages are generated from the explainer's source, so agents keep them up to date like any other code.
Where the build stands
We started the production build in mid-November 2026 after the demo. We had three developers on the foundation side, so I split the work into three streams to keep us from stepping on each other's toes. I brought over the delivery flow I'd been using and planned the repo handoff so the team could work with just the customer's GitHub Copilot. I also ran workshops on personas and how we'd work together.
The first 261 PRs in 12 days went through my account while the team waited for access. I'd get the other developers in earlier next time so I could see whether the flow worked for them too.
Comments