feat(server): implement OSEP-0011 signed endpoint for secure route access#787
Merged
hittyt merged 17 commits intoalibaba:mainfrom Apr 27, 2026
Merged
feat(server): implement OSEP-0011 signed endpoint for secure route access#787hittyt merged 17 commits intoalibaba:mainfrom
hittyt merged 17 commits intoalibaba:mainfrom
Conversation
…cess Add route signing utilities (base36 expiry, SHA256-based signature), config models for secure access keys, and API/service layer changes to issue time-limited signed route tokens on GetEndpoint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The routeToken field is not needed since the signed route is already embedded in the endpoint URL. Remove the corresponding field from the schema, the build_signed_route_token utility, and all related tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Implement get_signed_endpoint across Go, JS, Python, Kotlin, and C# SDKs. Each SDK exposes a new method (GetSignedEndpoint / get_signed_endpoint / getSignedEndpoint) that calls the existing endpoint API with the expires query parameter for OSEP-0011 signed route tokens. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add server.gateway.secureAccess to values.yaml. When keys are provided, the Helm chart renders [ingress.secure_access] into the server's TOML config and passes --secure-access-keys to the ingress gateway container, ensuring both sides use the same OSEP-0011 signing keys. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add K8s E2E test for OSEP-0011 signed endpoints: verify route token is returned, make a /ping call through the gateway with the signed endpoint, and confirm expired timestamps are rejected. Wire signing keys into Helm values so server and ingress share the same key for E2E runs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The API returns endpoint without scheme; the SDK internally prepends
{protocol}://. Match that in the E2E test.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(tests): verify signed endpoint omits and unsigned includes the header Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f13df2a6b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Without this check, values > uint64 max reach encode_expires_b36() and raise ValueError, which the generic exception handler converts into a 500. Validate explicitly and return 400 INVALID_PARAMETER. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Duplicate key_id entries cause a runtime mismatch: server signs with the first match while ingress stores keys in a map (last duplicate wins), making all signed endpoints fail verification. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
GetSignedEndpointAPI that returns a time-limited signed route token for sandbox endpoint access. The server signs routes with SHA256, and the ingress gateway verifies the signature before proxying traffic. This enables secure, short-lived access to sandbox ports without sharing static tokens.Changes
Server (OSEP-0011 signing)
GET /sandboxes/{sandboxId}/endpoints/{port}?expires=<unix_seconds>— whenexpiresis provided, returns a signed route token embedded in the endpoint URL/headersPOST /sandboxessecure_accessfield — enables staticSecureAccessTokenheader on unsignedGetEndpointresponseshex8(sha256(BE32(len(secret)) || secret || BE32(len(canonical)) || canonical)) + key_idv1\nshort\n{sandbox_id}\n{port}\n{expires_b36}\n[ingress.secure_access]) in server TOML, shared with ingress via--secure-access-keysSecureAccessTokenheader (route token only)SDKs (all 5)
GetSignedEndpoint(sandboxId, port, expires)method on each SDK — Go, TypeScript, Python, Kotlin, C#.Helm chart
server.gateway.secureAccess.activeKey/keys— shared signing keys_helpers.tplrenders[ingress.secure_access]TOMLingress-gateway.yamlpasses--secure-access-keysflagE2E tests
GetSignedEndpointtest/pingcall through gateway with route token, verify expired timestamps rejectedDocumentation
implementedTesting
Breaking Changes
Checklist