Commit ff48f45
feat(server): implement OSEP-0011 signed endpoint for secure route access (#787)
* feat(server): implement OSEP-0011 signed endpoint for secure route access
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>
* chore: remove routeToken field from Endpoint schema
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>
* feat(sdk): add GetSignedEndpoint to all five SDKs
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>
* feat(helm): shared signing key config for server and ingress
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>
* feat(e2e): add GetSignedEndpoint test and signing key config for ingress
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>
* fix(kotlin): fix spotless formatting on getSignedEndpoint
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(js): convert expires to string in getSignedEndpoint query param
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(python): convert expires to str in get_signed_sandbox_endpoint calls
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(csharp): add GetSignedSandboxEndpointAsync to test stub
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(e2e): prepend protocol to signed endpoint URL for /ping call
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>
* chore(e2e): log all headers from signed endpoint response
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(csharp): remove made-up X-Route-Token header from test stub
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: mark OSEP-0011 as implemented
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(server): omit SecureAccessToken header from signed endpoint response
feat(tests): verify signed endpoint omits and unsigned includes the header
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(server): reject expires values exceeding uint64 max before signing
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>
* fix(server): enforce unique secure_access key_ids in config validation
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>
* fix(server): rename leftover reference to key_ids -> seen after refactor
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent b481aa8 commit ff48f45
43 files changed
Lines changed: 1738 additions & 24 deletions
File tree
- kubernetes/charts/opensandbox-server
- templates
- oseps
- scripts/common
- sdks/sandbox
- csharp
- src/OpenSandbox
- Adapters
- Services
- tests/OpenSandbox.Tests
- go
- javascript/src
- adapters
- api
- services
- kotlin/sandbox/src/main/kotlin/com/alibaba/opensandbox/sandbox
- domain/services
- infrastructure/adapters/service
- python/src/opensandbox
- adapters
- api/lifecycle/api/sandboxes
- services
- sync
- adapters
- services
- server
- opensandbox_server
- api
- services
- k8s
- tests
- k8s
- tests/python/tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
146 | 172 | | |
147 | 173 | | |
148 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
565 | 578 | | |
566 | 579 | | |
567 | 580 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
122 | 140 | | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
239 | 252 | | |
240 | 253 | | |
241 | 254 | | |
| |||
0 commit comments