Repository navigation
OpenSecret: remove Transport V1 - #1647
Merged
Merged
Conversation
This was referenced Nov 18, 2026
AnthonyRonning
force-pushed
the
remove-transport-v1
branch
from
November 19, 2026 19:36
2102d02 to
507b5e4
Compare
Transport V2 has been the only transport the in-tree SDKs speak since
September 14 (Research 3.4.0, SDK 4.0). The backend still served V1 beside
it: the application router was mounted on the listener as well as behind the
V2 gateway, and nearly every boundary carried a second, weaker branch for
it. This removes that branch everywhere.
The listener now serves only /health-check, the public attestation
document, the relay fleet's admission check and the two /v2 endpoints.
Application routes are reachable only inside a V2 envelope, and each one
refuses a request the gateway did not decrypt: only the gateway can attach
the in-process session marker, and authentication reads only the credential
the envelope carried, never an outer header.
Removed with it:
- POST /key_exchange, the per-nonce ephemeral keys, the V1 session store
and its maintenance task, per-field request and response encryption, and
per-event SSE encryption;
- the V1 access and refresh token audiences. Nothing issues or accepts
them; they stay reserved against third-party tokens;
- unbound OAuth authorization URLs and state. Every redirect is bound to
its initiating session with PKCE or the Apple nonce;
- the operator-computable provider cache namespaces. A completion without
a cache root is refused;
- the lenient end-of-stream rule that accepted a provider stream without
[DONE] after a finish signal;
- the route and handler gates that existed only to reject V1 sessions on
recovery, password-reset and remote routes.
GET /attestation/{nonce} stays, as a public attestation document rather
than a handshake: it attests no key and stores no state. The apps'
verification page and deployment checks read it.
Handler call sites keep their names (decrypt_request, encrypt_response,
TransportSession); only what is underneath them changed.
Clients older than Research 3.4.0 or SDK 4.0, including older proxy builds,
cannot use a backend built from this commit.
Co-Authored-By: Claude <noreply@anthropic.com>
Follow-ups from review of the Transport V1 removal. - A source invariant now walks every router under src/web and requires a transport-boundary layer on each handler of each application route. The existing invariant also pins how main() serves the listener and the exact routes of the four plaintext routers. - The OAuth redirect callback no longer has an exchange path without the PKCE verifier or a verification path without the Apple nonce: a missing binding is an internal error instead of a silent skip. - Refresh request types are no longer deserializable, since a refresh token only ever arrives as the envelope's resumption credential. - Drop the key_exchange diagnostics route class, rename the SSE event helper, and correct docs, comments and test names that still described per-session encryption. Co-Authored-By: Claude <noreply@anthropic.com>
The test arrived on master after this branch was cut and still built the cache policy through the variant and the user argument this branch removes, so the rebased branch did not compile its tests. Co-Authored-By: Claude <noreply@anthropic.com>
AnthonyRonning
force-pushed
the
remove-transport-v1
branch
from
November 19, 2026 19:56
f433b4d to
1a935b3
Compare
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.
Removes Transport V1 from the OpenSecret backend. Transport V2 is now the only way to reach the application.
Both in-tree SDKs, Research, the proxy and the Agent have spoken only V2 since September 14 (Research 3.4.0, SDK 4.0). The backend still served V1 beside it: the application router was mounted on the listener as well as behind the V2 gateway, and most boundaries carried a second, weaker branch for V1 callers.
What a deploy of this changes
Clients older than Research 3.4.0 or SDK 4.0, including older proxy builds, stop working against a backend built from this commit. They can neither start a session (
POST /key_exchangeis gone and the attestation document carries no key) nor use one they already hold (application routes return 404 in plaintext). V1 access and refresh tokens are accepted nowhere. API keys are unaffected.GET /attestation/{nonce}stays, because the apps' verification page and deployment checks read it. It is now a public attestation document rather than a handshake: it attests no key (public_keyis null) and stores no state.Change
The listener serves
/health-check,/attestation/{nonce},/v1/remote/relay-accessand the two/v2endpoints, and nothing else. Application routes are mounted only inside the gateway. Each one also refuses a request the gateway did not decrypt: only the gateway can attach the in-process session marker, and authentication reads only the credential the envelope carried, never an outerAuthorizationheader.Removed:
POST /key_exchange, the per-nonce ephemeral keys, the V1 session store (lease_aware_cache.rs) and its maintenance task, per-field request and response encryption, and per-event SSE encryption.access,refresh,platform_access,platform_refresh). Nothing issues or accepts them. They stay reserved so a third-party token can never carry one.SHA-256(user UUID). A completion without a cache root is refused.[DONE]after a finish signal. V2 already required[DONE].Handler call sites keep their names (
decrypt_request,encrypt_response,TransportSession), so branches in flight do not conflict in every handler.encrypt_responseand the SSE helpers now only serialize, since the gateway encrypts the whole response.Two things moved rather than disappeared:
bounded_ttl_cache.rsloses the take and retire methods only the V1 pending-key store used. Sticky routes still use the rest.Docs:
transport-v2-protocol.mdgets a "Transport V1 is retired" section in place of "V1 compatibility", and the skills and smaller docs that said the two transports coexist are corrected.Tests
New or changed coverage for what replaced the V1 tests:
encryption_middleware).Authorizationheader is not a credential (recovery_route_tests).jwt).main()to serving that router as built, and the application to the gateway.src/weband requires a transport-boundary layer on each handler of each application route (over 100 handlers), so a router mounted in the wrong place still fails closed.Checked locally
os-rust:cargo fmt --check, Clippy with-D warnings, andcargo test: 1,170 passed, 103 ignored.disposable_db_tests.sh: 129 database-backed tests passed (27 AEAD, 2 OAuth, 6 callback, 21 compaction, 43 recovery). Its pinned counts change with the removed V1 cases: callback completion 4 to 2, recovery routes 31 to 30.os-sdk-e2esteps on free local ports: the TypeScript SDK's 87 integration tests and the Rust SDK's integration tests, including the native-handoff full-stack round trip, pass against this backend./health-checkand/attestation/<nonce>return 200;/key_exchange,/login,/protected/user,/v1/modelsand/v1/chat/completionsreturn 404;/v1/remote/relay-accesswithout its token returns 403.Not checked: a built EIF, a hosted deployment, or a released V1 client against this backend.
Left for follow-up
@opensecret/react-v1). It cannot sign anyone in once this is deployed.🤖 Generated with Claude Code