feat(service): declare COLLAB_AUTH_MODE in service.toml so lab can forward it #71
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_collab!71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_sameh"
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?
Problem
COLLAB_AUTH_MODE=dev lab service hero_collab --startwas silently ignored — collab still came up inproxymode, and every browser RPC failed with "Authentication required".Root cause
labonly forwards env vars that a binary declares in itsservice.toml [[env]](it iteratesinfo.env, applying each declared var's default and letting the shell override it —service_manager.rs:~2300). hero_proc spawns children with a clean env, so an undeclared var never reaches the process. collab declared no auth env → the shellCOLLAB_AUTH_MODE=devwas dropped → server used itsproxydefault.Fix
Declare
COLLAB_AUTH_MODE(defaultproxy) on both the server and web (admin) actions. This makes lab forward an operator override:lab service hero_collab --start→ proxy (production-safe; unchanged compiled/CLI default)COLLAB_AUTH_MODE=dev lab service hero_collab --start→ devNo insecure default committed —
proxystays the default everywhere.Verification
With the declaration,
COLLAB_AUTH_MODE=dev lab service hero_collab --startbrings both binaries up withCOLLAB_AUTH_MODE=devunder hero_proc;channel.list/huddle.listreturn 200 through hero_router (were "Authentication required"). Both jobs stayrunning attempt=0(with the #69 health-check fix).Present identically on
main— will cherry-pick after merge.`lab` only forwards env vars a binary declares in its `service.toml [[env]]` block (it iterates `info.env`, then lets the operator's shell override each declared var's default). hero_proc spawns children with a clean env, so an undeclared var never reaches the process. collab declared no auth env, so `COLLAB_AUTH_MODE=dev lab service hero_collab --start` silently dropped the override and the server came up in `proxy` mode — every browser RPC then failed with "Authentication required". Declare COLLAB_AUTH_MODE on both the server and web (admin) actions with `default = "proxy"`: - bare `lab service hero_collab --start` → proxy (production-safe, unchanged from the compiled binary default) - `COLLAB_AUTH_MODE=dev lab service hero_collab --start` → dev (shell override now reaches the child) No insecure default is committed; the compiled binary default and the `hero_collab` CLI default both remain `proxy`. Verified: with the declaration, the server + web come up with COLLAB_AUTH_MODE=dev under hero_proc supervision; channel.list/huddle.list return 200 through hero_router instead of "Authentication required".