feat(mcp): the remote door and the sign-in behind it (P15 B1, D-83, D-86)
A second HTTP listener in the books server, on 127.0.0.1 only, off until the app's admin request (RemoteStart) names the one public address. Every connection begins with the relay's PROXY v2 header, whose address is the caller's (never an HTTP header); the door speaks stateless plain-JSON MCP for one company per path, and is its own OAuth 2.1 server: metadata at every place products look, client ID metadata documents, dynamic registration and a typed client id and secret, PKCE S256, exact redirects, single-use short codes, rotated refresh tokens (a reused one ends its family), short access tokens, the issuer pinned. /authorize never approves: it parks the request and only the owner-only admin socket turns it into a code. An approval is one principals token (so A4's list and revoke see it) plus a record naming the product, which survives the product registering again. Read and draft by default; posting raised per approval. Every table is bounded and expires; secrets are kept as SHA-256 only. A stranger's unsigned request is a 401 with the metadata pointer and is counted, never written to the books' record. The access record gains an optional 'from' (the caller's address), kept as an IP when it is one (the TIN masking would turn it to dots). The tools a model reaches for first now carry the company's name and 'call books.start first' in their own descriptions (plan 3.4), local and remote. Dependencies: none new to the tree. reqwest (client documents, as ledger-host already uses it), subtle, getrandom and hyper-util (already pulled in by ledger-store and axum) are now declared by ledger-mcp; cargo deny and the notices check pass unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
eafd269ba0
commit
e00e52f2f3
15 files changed
+5839
-41
No files matched your search
Generated
+4
@@ -4119,7 +4119,9 @@ dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
"futures-util",
|
||||
"getrandom 0.2.17",
|
||||
"http-body-util",
|
||||
"hyper-util",
|
||||
"ledger-config",
|
||||
"ledger-core",
|
||||
"ledger-import",
|
||||
@@ -4127,12 +4129,14 @@ dependencies = [
|
||||
"ledger-store",
|
||||
"ledger-vault",
|
||||
"libc",
|
||||
"reqwest",
|
||||
"rmcp",
|
||||
"rust_decimal",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"subtle",
|
||||
"tempfile",
|
||||
"thiserror 2.0.21",
|
||||
"tokio",
|
||||
|
||||
Reference in new issue
Block a user