Repository navigation
Commit e6a3a11
feat: attach tickets (vgi.attach_tickets.v1), the reference implementation
A ticket seals a user's ATTACH -- catalog name, options (secret ones
included), version specs -- so a runner holding that user's grant can
reattach later without ever seeing an option.
- Format: "vgia1." + canonical unpadded base64url of the attach-envelope
construction (XChaCha20-Poly1305 under VGI_SIGNING_KEY, version 0x01),
AAD "vgi.attach_ticket.v1\0" + principal. Principal only, not
(domain, principal): sealed under the login domain, opened under
"grant". Fixed little-endian payload; options are the opaque Arrow IPC
bytes of CatalogAttachRequest.options, capped at 16 KiB. Verification:
prefix, length, canonical base64url, open under the caller's principal,
strict parse, lifetime with 60 s skew.
- vgi.attach_tickets.v1 seal_attach: hosted on HTTP only when the signing
key is configured explicitly (a key vgi-serve minted, incl. one exported
to pre-fork children, never counts) and the worker can issue grants.
Anonymous -> action_denied; options validated against the catalog's
declared AttachOptionSpecs -> invalid_request + BadRequest; lifetime
capped at the grant maximum, 0 = as long as allowed.
- catalog_attach redeems vgi_attach_ticket before any catalog code: no
other option beside it (invalid_request), attach_ticket_invalid /
attach_ticket_expired, then the sealed request runs as typed. MetaWorker
redeems before routing, so the sealed catalog picks the child.
vgi_attach_ticket is a reserved attach-option name.
- Cross-SDK: attach_ticket_vectors.json (mint/accept/reject/redeem,
generated by scripts/gen_attach_ticket_vectors.py, drift-checked), the
ticket_probe fixture catalog (region + secret required api_key, table
main.probe reveals region and sha256(api_key)[:12]) in both fixture
workers, and the normative spec docs/protocol/vgi-attach-tickets.md.
The fixture HTTP server's test bearers now count as fresh logins and let
vgig1. bearers fall through to grants.
Mutation checks (each turns tests/test_attach_ticket.py red): principal
dropped from the AAD (18 fail), (domain, principal) AAD (18), expiry check
removed (2), no-other-options rule removed (6).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 1d50004 commit e6a3a11
16 files changed
Lines changed: 3111 additions & 12 deletions
File tree
- docs
- api
- protocol
- scripts
- tests
- vgi
- _test_fixtures
- catalog
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
506 | 520 | | |
507 | 521 | | |
508 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
0 commit comments