feat(bundle): carry the boot show-token on the render-bundle URL - #56
Open
forge-by-clodocapeo[bot] wants to merge 1 commit into
Open
feat(bundle): carry the boot show-token on the render-bundle URL#56forge-by-clodocapeo[bot] wants to merge 1 commit into
forge-by-clodocapeo[bot] wants to merge 1 commit into
Conversation
ZabGate now gates GET /orion/api/v1/scenes/{id}/render-bundle on a viewer
`?token=` (mirror of the WS gate — ZabGate PR#69). Solar built that URL
without the token it already holds at boot, so the CEF bundle fetch would
stay 401 behind the gateway even after the gate lands: the runtime's
`Authorization: Bearer` header is not the credential this route reads.
Thread the mount-time show-token (the string the host entries resolve via
`resolveShowToken`) into `orionBundleUrl` as an optional second argument,
appended as `&token=`. An absent/empty token emits no `token=` param, so
the unauthenticated dev/local URL shape is byte-identical. A provider
token (`SolarTokenProvider`) cannot be awaited in the sync resolver and
keeps the Authorization-header path only. The token lives solely in this
URL — never logged, and the runtime's fetch errors do not echo the URL.
Refs ZabLaboratory/ZabCanvas#346
Agent-Role: forge
Agent-Thread: SOLAR-BUNDLE-TOKEN/forge
Work-Unit: SOLAR-BUNDLE-TOKEN
Issue: ZabLaboratory/ZabCanvas#346
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
ZabGate (PR ZabLaboratory/ZabGate#69, en clearance) gate désormais
GET /orion/api/v1/scenes/{id}/render-bundlesur un?token=viewer — miroir dugate WS que le show-token de Solar passe déjà. Solar construisait cette URL sans
token (
src/internal/orion-bundle-url.ts, câblé dansmount.ts) : le fetch dubundle resterait 401 derrière la gateway même après le merge côté gate, le header
Authorization: Bearerdu runtime n'étant pas la credential lue par cette route.Ce diff propage le show-token dont Solar dispose au boot — la string que les
entries host résolvent via
resolveShowTokenet passent àmount({ token })—jusqu'à l'URL du bundle, en second argument optionnel d'
orionBundleUrl,émis comme
&token=:token=(jamais un param vide) ; la formed'URL dev/local non authentifiée est byte-identique ;
SolarTokenProvider, async) → inchangé : le resolver duruntime est sync, impossible d'
awaitsans changer sa signature (paquetlumencast externe, hors périmètre) ; ce chemin garde le header Authorization ;
runtime (
bundle fetch failed: <status>) n'échoient pas l'URL — vérifié dans@lumencast/runtimesrc/render/bundle.ts.Aucun nouveau canal de configuration ; pas de refonte du résolveur ; rotation de
token (
setToken) hors périmètre (le résolveur garde le token de boot).Tests
Rouge prouvé sur le code non patché (src stashé) :
Les 3 rouges sont exactement les assertions « l'URL porte le token » (2 unit
orion-bundle-url, 1 seambundle-fetch-authvia le vraimount()→ runtime →fetch mocké) ; les négatifs (« pas de
token=sans token ») passent déjà, commeattendu.
Après patch :
Nouveaux tests :
tests/unit/orion-bundle-url.test.ts(append + percent-encodingtests/unit/bundle-fetch-auth.test.tsx(seamcomplet :
token=présent dans la query du fetch avec show-token au boot, absentsans).
Écarts / hypothèses
SolarTokenProvidern'y apparaît pas (resolver sync côté runtime) — ce casgarde le seul header Authorization. Aucun host in-tree ne monte avec un
provider aujourd'hui (host-entry/dev-entry passent une string).
setTokenne met pas à jour l'URL du bundle (résolveur créé aumount) — cohérent avec le bail (token de boot), signalé pour mémoire.
Eleven, dans le sillage de ZabGate#69.
Refs ZabLaboratory/ZabCanvas#346