investigate hero_proxy OAuth-access-token pass-through for zero-setup cockpit→Forge calls (Option 3 polish over D-22 BYO) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Investigate hero_proxy OAuth-access-token pass-through so cockpit can reuse front-door session for Forge API calls (zero-setup BYO)
Context
Demo VMs provisioned via
hero_os_tfgrid_deployerare reached via Forge-OAuth-gated public URLs (per hero_os_tfgrid_deployer#2 goal): user clicks VM URL → hero_proxy intercepts → OAuth redirect toforge.ourworld.tf→ user authenticates → bounce back to cockpit. From the user's perspective they're already authenticated against Forge by the time cockpit loads.s140 / D-22 locked BYO as the v1 wire path for cockpit→Forge calls (feedback submission per hero_os_tfgrid_deployer#1 §9): user mints their own scoped token (Settings → Applications → New Token,
write:issue) at forge.ourworld.tf and pastes into cockpit Settings, where it lands atcockpit/USER_FORGE_TOKENper D-16. ~30s user-side detour because they're already on the page.This issue tracks a polish path that could drop that 30s to zero: if hero_proxy passes the OAuth access token from the front-door handshake through to backend cockpit calls, cockpit can use it directly for Forge API operations as the user, without the BYO Settings paste step.
Goal
Investigate whether hero_proxy currently exposes the Forge OAuth access token to backend services, and if not, scope what it would take. If viable, ship as a transparent upgrade behind a feature flag — cockpit detects the pass-through token first, falls back to BYO
cockpit/USER_FORGE_TOKENif absent. Forward-compatible with D-22; the D-16 storage slot stays valid as fallback for operations OAuth scopes don't cover.Investigation checklist
write:issuescope (and any others cockpit needs)? If not, what's the config / flow change?X-Hero-Forge-Tokenheader, session cookie, or hero_proxy's own RPC?Acceptance (if shipped)
cockpit.feedback_submit(and future cockpit→Forge calls as the user) read the OAuth access token from hero_proxy's pass-through first; fall back tocockpit/USER_FORGE_TOKENif absent.Not in scope
cockpit/USER_FORGE_TOKEN(D-16 slot stays).CreateUserOutput { user_id, forge_username, initial_password }is unchanged).References
decisions/D-22-deployer-forge-token-namespacing-and-byo-landing.md(Validation section explicitly flags this as the polish path).decisions/D-16-cockpit-byok-user-forge-token-namespacing.md.memory/investigation_forge_admin_token_mint_2026_05_21.md.Signed-by: mik-tf mik-tf@noreply.invalid