One attacker. One food delivery backend on Azure. Five different ways in.
For each one, there’s a specific, named Azure control that shuts it. Miss one, and the other four don’t cover for it. Each door guards a different thing.

Attack 1: A flood of junk and injection strings
Stopped by: Azure Front Door WAF, running the OWASP managed ruleset at the edge. Traffic dropped here costs you nothing. No container spins up, no database connection opens.
The catch: WAF ships in Detection mode, which only logs. Switch it to Prevention, or it’s a very expensive diary.
Attack 2: Calls with no token
Stopped by: Microsoft Entra ID. Your API validates the token’s signature, issuer and audience against Microsoft’s published keys. Locally, in microseconds.
The catch: validate the aud claim, not just the signature. A valid token issued for a different app is still a valid token.
Attack 3: A real token asking for someone else’s data
This is the one people miss. The attacker signs in, legitimately, as themselves. Then they call GET /orders/1043, which belongs to someone else. Authentication passed. There’s nothing wrong with their token.
Stopped by: an owner check in your own API. This bug is called broken object level authorization, and it’s number one on the OWASP API Security Top 10.
db.Orders.Where(o => o.UserId == me.GetObjectId())
Take the user id from the validated token, never from the body, the query string or a header, because the moment the client can tell you who it is, the check is decoration.
Attack 4: Someone searching your repo for keys
Stopped by: Azure Key Vault plus a managed identity, so the repo holds a vault URI and nothing else. Turn on GitHub secret scanning too, and scan history, not just the latest commit: a key deleted in a later commit is still sitting in the repo.
Attack 5: Someone dialling the database directly
Stopped by: a private endpoint, with public network access set to Disabled, so the server gets a private IP inside your VNet and no internet-facing address at all.
Which default setting undoes door 5?
Which Azure defences should you check this week?
- Is WAF in Prevention or Detection?
- Can you fetch another user’s record with your own valid token?
- Is public network access
Disabledon SQL, Storage and Key Vault? - Is “allow Azure services” off?
- Is Microsoft Defender for Cloud on, so you hear about trouble before the invoice does?
The same five layers, seen as a request flow rather than as attacks, are in the full request-flow walkthrough.
Key takeaways
- Five common attacks map onto five named controls: WAF, Entra ID, an owner check in your code, Key Vault, and a private endpoint.
- Owner checks are the one control authentication can’t provide — a real, valid token is exactly what BOLA uses.
- WAF’s default Detection mode only logs; switch it to Prevention.
- “Allow Azure services and resources” means every Azure tenant, not yours — keep it off.
- Run the five-question audit regularly, not once.
Official documentation: Azure Web Application Firewall and private endpoints.
Earlier in this series: The Blast Radius of a Hardcoded API Key in a Mobile App and How Azure Protects a Mobile App: The Full Request Flow, Layer by Layer.
