refactor(mcp): extract transport-security concern and rename identity modules#400
Draft
gbrlcustodio wants to merge 2 commits into
Draft
refactor(mcp): extract transport-security concern and rename identity modules#400gbrlcustodio wants to merge 2 commits into
gbrlcustodio wants to merge 2 commits into
Conversation
Move build_transport_security out of core/ into a package-root transport_security module, a peer of auth/ rather than a module under the composition tier. It imports only auth (ResourceServer) and settings and is consumed by the runtime, so it slots into the layering contract between core and auth. This is the incremental app-level step toward the target architecture, where core/ dissolves into named concerns.
request_identity.py becomes inbound_identity.py (it extracts the inbound bearer a caller presents) and session_identity.py becomes outbound_identity.py (it resolves the outbound httpx.Auth each session binds). The names now state the axis the docstrings already framed, so the pair reads as counterparts. No behavior change; the auth facade re-exports the same contract symbols.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #397, split out per the earlier call to keep the core/ to named-concern migration in its own reviewable change. Two atomic commits, no behavior change.
What
Why
This is the incremental app-level step toward the target architecture, where core/ dissolves into named concerns. Transport security ultimately belongs in the monorepo infra/ package; this root module is the interim home until that package exists.
Verification
Base
Targets feat/303-transport-host-allowlist (PR #397). Retarget onto dev once #397 merges.