chore: Remove HERO_COMPUTE_BRIDGE_TOKEN from TCP bridge #59
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_compute#59
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?
Summary
The TCP bridge in
hero_compute_explorerhas an optionalHERO_COMPUTE_BRIDGE_TOKENauth mechanism that should be removed.Why remove it
AUTH <token>\nin plain text over TCPProper node identity and authorization should be handled separately (see #57 discussion). Until then, this half-measure adds complexity without real value.
What to remove
HERO_COMPUTE_BRIDGE_TOKENenv var reading intcp_bridge()(crates/hero_compute_explorer/src/main.rs)AUTH <token>\nhandshake logic in the TCP bridgeThe TCP bridge should just accept connections and proxy bytes directly (it already does this when the token is unset).
Implementation Spec for Issue #59
Objective
Remove the optional
HERO_COMPUTE_BRIDGE_TOKENauthentication mechanism from thetcp_bridgefunction inhero_compute_explorer, simplifying the bridge to accept connections and proxy bytes directly.Requirements
HERO_COMPUTE_BRIDGE_TOKENenvironment variable read fromtcp_bridge()AUTH <token>\nhandshake logicbridge_token/tokenvariables and now-unnecessary imports (AsyncBufReadExt,AsyncWriteExt,BufReader)tcp_bridgeto remove the "optionally requires auth token" clauseHERO_COMPUTE_BRIDGE_TOKENrow fromdocs/configuration.mdHERO_COMPUTE_BRIDGE_TOKENFiles to Modify
crates/hero_compute_explorer/src/main.rsdocs/configuration.mdHERO_COMPUTE_BRIDGE_TOKENrow from the env vars tableImplementation Plan
Step 1: Simplify
tcp_bridgeinhero_compute_explorer/src/main.rslet token = bridge_token.clone();from per-connection clone blockStep 2: Update
docs/configuration.mdHERO_COMPUTE_BRIDGE_TOKENrow from the environment variables tableAcceptance Criteria
HERO_COMPUTE_BRIDGE_TOKENdoes not appear anywhere in the codebaseAUTH_FAILEDdoes not appear inhero_compute_explorer/src/main.rstcp_bridgefunction accepts TCP connections and immediately proxies bytes (no handshake)HERO_COMPUTE_BIND_ADDRESS) is preservedcargo buildsucceeds with no warningscargo clippypassesNotes
hero_compute_servercrate has its owntcp_bridgethat never had token auth — no changes needed there🤖 Generated with Claude Code
Test Results
Automated check
Implementation Summary
Changes Made
crates/hero_compute_explorer/src/main.rsHERO_COMPUTE_BRIDGE_TOKENenv var readlet token = bridge_token.clone()from connection handlerdocs/configuration.mdHERO_COMPUTE_BRIDGE_TOKENrow from the Network env vars tableWhat was preserved
HERO_COMPUTE_BIND_ADDRESSTest Results
🤖 Generated with Claude Code
Implementation committed:
e84dc59Browse:
e84dc59Done