Commit 58ddac9
release: 0.22.0 — proxy-proof resolver, vgi-rpc floor to 0.28.2
Adds VGI_PROXY_PROOF_* handling to the worker's env-driven auth
resolution, so a worker can refuse any request that did not arrive
through a trusted proxy. Reads MODE / ORIGIN_ID / SECRETS / SKEW and
builds the gate from vgi-rpc.
The gate is composed with require_all(), not chained. Chaining is
first-success-wins, so a gate placed in a chain would be satisfied by
whichever credential came next — precisely the bypass it exists to
close. `inner` may be None: proof alone means "only my proxy may call
this worker", with user identity handled upstream.
Restructures _resolve_authenticate()'s hardcoded two-way combiner into a
list so a third scheme is one entry rather than another branch, keeping
JWT ahead of bearer (bearer does a constant-time scan over its token
set, so the cheaper check goes last).
Malformed configuration aborts startup rather than degrading to off. The
secret is shared with an independently-deployed proxy, so a typo would
otherwise silently derive a different key on each side and turn require
mode into a total rejection outage with nothing pointing at the cause.
Floor moved to vgi-rpc>=0.28.2, where the proxy-proof API lives.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 6cdac1c commit 58ddac9
3 files changed
Lines changed: 87 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
432 | 436 | | |
433 | 437 | | |
434 | 438 | | |
| |||
438 | 442 | | |
439 | 443 | | |
440 | 444 | | |
441 | | - | |
442 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
443 | 448 | | |
444 | | - | |
| 449 | + | |
| 450 | + | |
445 | 451 | | |
446 | 452 | | |
447 | | - | |
448 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
449 | 523 | | |
450 | 524 | | |
451 | 525 | | |
| |||
0 commit comments