Repository navigation
Commit 9b10389
authored
fix(release): keyless subject uniqueness, NO_PROXY IPv6/CIDR, proxied boot secret, and remaining audit follow-ups (#9866)
* docs(api-keys): add rollback guidance to the api-key-read-only flag
* docs(api): say v2 workflow execution needs a full-access API key
* chore(api): regenerate MCP operations for the execute scope wording
* fix(hitl): stop duplicating input fields across listed pause points
* fix(api): refuse a personal v2 key with a missing owner as invalid, not a 500
* fix(credentials): refuse a keyless subject another live credential already holds
A keyless subject proof stays valid for 24 hours and is not bound to one
credential, so a member removed from a keyless AWS or Databricks credential
could save a second credential with the same subject and proof and keep
assuming the customer's role.
Creating or reconnecting a credential onto a subject it did not already hold
now refuses (409 conflict) when another non-revoked credential of the same
owner holds it. The subject lives only in the encrypted secret, so the check
decrypts the owner's keyless credentials inside the write transaction, under a
per-subject advisory lock so concurrent saves serialize. A reconnect keeping
its stored subject binds nothing new and skips the check.
* refactor(tools): detect the saved-credential picker with isSavedCredentialPicker
credentialSuppliedParamsFor matched any oauth-input feeding oauthCredential,
without the credentialKind === 'service-account' check isSavedCredentialPicker
applies. It now uses that predicate. No registered block changes: every block
whose loose-match picker lacks the service-account kind has no tool that
declares credentialSuppliedParams.
* fix(runtime-secrets): fetch the boot secret through the configured proxy
The Secrets Manager client used the SDK's Node handler, which ignores
HTTPS_PROXY, so a container whose only egress is a proxy could not load its
env and never booted. Under Bun with a proxy set, send through Bun's fetch,
which honors HTTPS_PROXY/HTTP_PROXY/NO_PROXY. apps/sim's awsRequestHandler
is out of reach for packages and the realtime bootstrap needs the same path.
* fix(models): mark NVIDIA Nemotron 3 Super retired and move the NVIDIA default
NVIDIA's model page states the nvidia/nemotron-3-super-120b-a12b API is no
longer supported after 2026-10-19, and Pi 1.0.1 dropped it as its NVIDIA
default for the same reason. Mark it deprecated (hidden from pickers, still a
known id for pinned workflows) and default the NVIDIA provider to Nemotron 3
Ultra, which the Pi catalog also serves.
The Mistral IDs Pi 1.5 dropped (mistral-large-2411, devstral-small-2507,
devstral-medium-2507) were retired by Mistral on 2026-05-31 and are already
deprecated here, so saved Pi blocks fail before credentials with the
choose-a-model error instead of being mapped onto a different model.
* fix(credentials): lock keyless subject checks through the advisory-lock helper and refuse on unreadable siblings
assertWorkloadIdentitySubjectUnclaimed now takes a DbTransaction and locks
through acquireAdvisoryXactLock, so the lock carries its SQLCommenter tag and
cannot be taken on the pool by mistake. A sibling keyless credential whose
secret does not decrypt or parse used to throw a generic error, failing every
keyless create or rotation for the owner with a 500. Since it might hold the
subject, the save is now refused as a conflict naming that credential, with a
warning logged, and stored subjects are read with a schema safeParse.
* fix(network): match NO_PROXY entries like curl, including bare IPv6 and CIDR
A bare IPv6 entry such as ::1 was read as host ':' port 1 and never matched,
IP entries only matched their exact spelling, and CIDR ranges were ignored.
Entries now follow curl: domains cover their subdomains, bracketed IPv6 may
carry a port, IP entries match any spelling, and CIDR ranges match IP-literal
destinations. NO_PROXY is parsed once per distinct value. The comments and
the self-hosting networking page describe these rules, and note that Bun's
default fetch applies its own.
* docs(network): note the boot secret fetch follows Bun's NO_PROXY rules
* fix(credentials): decide subject reuse under the lock on every keyless reconnect
A reconnect that kept its subject skipped the uniqueness check, but whether
it kept the subject was decided from the secret read before provider
verification. If another reconnect moved the credential to a new subject and a
second credential claimed the old one meanwhile, the stale reconnect wrote the
old subject back unchecked and two credentials held it.
Every keyless reconnect now locks the subject it is writing, then the
credential row (FOR UPDATE), re-reads the row's current subject, and runs the
sibling check whenever the two differ, with the decision and the write in one
transaction.
* fix(runtime-secrets): pick the boot fetch's proxy with the app's rules
Bun's fetch picks a proxy by scheme only, so with just HTTP_PROXY set the
https Secrets Manager request went direct and a proxy-only container still
could not boot. Move proxy selection (HTTPS_PROXY falling back to HTTP_PROXY,
curl-style NO_PROXY) from apps/sim into @sim/security/environment-proxy, and
have runtime-secrets pass the selected proxy to Bun's fetch explicitly, or
send through the Node handler when NO_PROXY excludes the endpoint.
* docs(api): state the credential and role a manual v2 run requires
Manual runs need api:write, which read-only personal keys lack, workspace
write access, and a personal key or OAuth token; workspace API keys are
refused. Regenerate the OpenAPI document and the MCP operation catalog.1 parent 4266ef6 commit 9b10389
29 files changed
Lines changed: 841 additions & 95 deletions
File tree
- apps
- docs
- content/docs/platform/self-hosting
- sim
- lib
- api
- contracts/v2/openapi
- mcp/generated
- server/routes
- core
- config
- network
- credentials
- __integration__
- orchestration
- workload-identity
- workflows/executor
- providers
- packages
- runtime-secrets
- src
- security
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3958 | 3958 | | |
3959 | 3959 | | |
3960 | 3960 | | |
3961 | | - | |
| 3961 | + | |
3962 | 3962 | | |
3963 | 3963 | | |
3964 | 3964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | | - | |
| 1285 | + | |
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
1255 | | - | |
| 1255 | + | |
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
202 | 224 | | |
203 | 225 | | |
204 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
344 | 404 | | |
345 | 405 | | |
346 | 406 | | |
| |||
0 commit comments