Repository navigation
docs: show the MCP and OAuth steps in the architecture diagrams - #1270
Conversation
The request pipeline now shows UseMcpOriginCheck, UseOAuthApiAddressLimits and UseOAuthApiInFlightRelease in Program.cs order, with a placement row for each. Authentication covers OpenIddict reference tokens on /mcp, the epoch node covers superseded app tokens and last-use stamps, and forwarded headers come only from trusted proxies (#1260). The MustChangePassword node id is MUSTCHANGE, so it no longer reads as the MCP server. The deployment diagram adds AI apps calling /mcp and the OAuth endpoints, and Access's label covers connected apps and OAuth.
The Origin row now names the step that answers first when the check moves: the rate limits (429), authorization (401) or the endpoint (405). The binding-error response gets a node and a row, because outside the request logger malformed JSON logs a 500 at Error while the client gets a 400. The epoch row now states its real constraint: after authentication, before authorization and idempotent replay. Its query does not depend on tenant resolution.
|
Before and after for the three diagrams this PR changed. Before is Deployment. AI apps (MCP clients) are added as a caller, and the API box now lists Feature modules. Access is relabelled "users, Identity, connected apps and OAuth". The module names are unchanged. Request pipeline. The new steps are the MCP Origin check, the OAuth API address limits and the in-flight permit release. The authentication and epoch nodes are reworded, the edge node adds the binding-error response, and the The images are attached in this order: deployment before and after, feature modules before and after, request pipeline before and after. |






docs/architecture.mdpredates the MCP milestone (#789). This PR adds/mcpand its OAuth gates to the deployment, module and request-pipeline diagrams. It also corrects three pipeline claims that were wrong before the MCP work. Only this one file changes.What changed
UseMcpOriginCheck,UseOAuthApiAddressLimitsandUseOAuthApiInFlightReleasein theirProgram.csorder:/mcp.MCP, which wasMustChangePasswordMiddleware, is nowMUSTCHANGE./mcpand the OAuth authorization server. No provider names were added.Corrections to rows that were already wrong
UseCluckworkBindingFailureResponsewas missing from the diagram. It must sit directly inside request logging. If it moves outside the logger, malformed JSON logs a 500 at Error while the client gets a 400.CredentialEpochVerifierbypasses the tenant filter. The row now gives the real constraint. The check runs after authentication and before authorization and idempotent replay.How it was checked
Every claim was checked against the code at
497e29e6. These tests pin the placements:RequestLoggingTests.Binding_failure_logs_one_completion_at_information_with_status_400McpEndpointTests.ForeignOrigin_Gets403_BeforeAuthentication_OnEveryMethodOAuthFailClosedTests.ForgedBearers_FromOneAddress_RunOutOfTheFailureBudget,BearersInFlight_FromOneAddress_AreCapped_AndAnotherAddressIsNotCredentialEpochMiddlewareOrderTests.Program_PinsTheCompleteCredentialGateSequenceOAuthFailClosedTests.AuthenticatedWorkInFlight_DoesNotHoldAuthenticationPermitsThese ran locally and passed:
CouplingMatrixRealTreeTests, 3 of 3. This test checks the module diagram's node set.The changed Mermaid blocks render with mermaid-cli. Two local review rounds found no remaining defect.
Refs #789, #806.