You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MapAAuthResource places signature verification in front of its own discovery endpoints #48
At commit f44587f6317f886a2b7e1cbe081270ed55d6f8d8, the MapAAuthResource() convenience method appears to make its resource metadata and public keys inaccessible to an ordinary discovery client.
Expected behavior: after configuring the advertised unified helper with signing keys, unsigned GETs to /.well-known/aauth-resource.json and /.well-known/jwks.json return their public JSON, while protected resource endpoints still require valid AAuth requests. The JWKS endpoint is only published when signing keys are configured.
With normal WebApplication routing, ASP.NET Core executes mapped endpoints at the end of the middleware pipeline. Mapping them before app.Use does not bypass that middleware. The source and framework behavior therefore imply that both discovery requests pass through the missing-signature rejection before reaching their handlers. This prevents normal SDK discovery from retrieving the resource metadata and keys, and can stop the first authorization exchange. I have not reproduced the HTTP responses under .NET.
The primary samples use a different setup: MapAAuthWellKnown() plus the route-aware UseAAuth(), which passes endpoints without AAuth requirement metadata through. I found no exact invocation of MapAAuthResource() in the test source. This is therefore specific to the convenience composition, not a claim that the main sample flows all fail.
Suggested regression test: create an in-process resource with signing keys using AddAAuthResource() and MapAAuthResource(), retrieve both discovery documents unsigned, and verify that an unsigned protected resource request remains rejected. The implementation could preserve public discovery through route-aware or explicitly scoped middleware, or the API could be retired in favor of the supported composition if that is the intended direction.
Review basis: declared draft-10, source inspection only; no .NET runtime reproduction was possible in my environment.
Activity