Azure Front Door JWT Validation Preview: Protect ASP.NET Core APIs

Microsoft announced public-preview JWT validation for Azure Front Door Premium on November 12, 2026. An Auth Policy checks Microsoft Entra ID bearer tokens at the edge. With Block selected, missing or invalid tokens receive HTTP 401 before they reach the origin. With Log selected, requests continue and the result is recorded. Microsoft documents the preview without an SLA and advises against relying on it for production workloads.
- Client obtains Entra access token
- Front Door Premium checks token
- Block returns HTTP 401 or Log forwards
- ASP.NET Core applies API authorization
Which token properties does Front Door validate?
Front Door gets the signing key from the configured Entra key set and checks the signature, expiration, issuer, and audience. Match the expected issuer and audience to the API’s access tokens. You can apply a policy to a profile, domain or route. When scopes overlap, the route wins, followed by the domain and then the profile.
How to test a policy with ASP.NET Core
- Use a staging Premium profile and a route connected to your ASP.NET Core API. Confirm that a Microsoft Entra application registration represents the API.
- Configure your issuer, audience and bearer-token header. Start in Log mode and associate the policy with the staging route.
- Send requests with a valid token, a missing token, an expired token and a token issued for a different audience. Check Front Door diagnostics and application access logs.
- Switch the staging route to Block and repeat the test. Expect HTTP 401 from Front Door for the failing cases. Verify that the valid request reaches the API.
curl -i -H "Authorization: Bearer $ACCESS_TOKEN" https://api.example.com/orders
curl -i https://api.example.com/ordersWhich checks stay in the application?
Apply app-level authorization for resource ownership, roles and scopes. For example, a valid access token may identify the caller while the orders API still needs to verify that the caller may read the requested order. Restrict direct origin access so that callers cannot bypass the edge, and keep token forwarding enabled if the application needs to validate the client token.
What if Front Door uses managed identity for the origin?
Microsoft documents using Proxy-Authorization for the incoming client bearer token in that setup. This leaves Authorization available for Front Door’s origin authentication token. Test the two authentication hops independently.
Comments
Post a Comment