install.sh: enrollment token never on the command line (#18) #30
Merged
logan
merged 3 commits from 2026-10-04 18:28:19 -04:00
fix/18-install-token-argv into main
No Reviewers
Labels
Clear labels
area/ai-pipeline
area/auth
area/billing
area/correlation
area/discord
area/frontend
area/governance
area/growth
area/infra-deploy
area/legal
area/map
area/mqtt
area/node-ota
area/osint
area/recording-audio
area/sdr-radio
area/transcription
board
board:agenda
Scene/entity extraction, summarizer, AI providers, embeddings
AuthN/Z, roles, tenancy/org scoping, API keys, credentials
Plans, entitlements, AI spend accounting and caps
Incident correlation, linking, lifecycle, severity, corr_debug
Discord bot, radio bots, voice streams, bot tokens, webhooks
Web UI: Next.js app and the edge-node local dashboard
Board process, minutes, unattended runner, agent tooling
Go-to-market, outreach, cold email, discovery conversations
CI/CD, VM, registry, Firestore rules/indexes deploy, Terraform/Caddy
ToS, retention, licences/DAAs, CAN-SPAM, E&O, name suppression
Live map: pins, paths, tiles, legend, geocoding
Node-C2 MQTT, checkins, commands, node sweeper, dynsec
Node install, enrollment, OTA updater, image skew
External feeds: cameras, 511, ADS-B, AIS, outages, and their licences
Call capture, boundaries, PulseAudio, ring buffer, trimming, attribution
OP25 decode, SDR hardware/tuning, conventional, second SDR, mesh radio
STT, transcript correction, place verification, name accuracy
Board process: minutes and board-filed items
Needs board scoping at the next sitting; CEO removes the label once scoped
kind
behavior-bug
Wrong product behavior; the instrument reads it correctly
kind
measurement-bug
Corrupts the recording/instrument (debug data, evals, health checks), not behavior
priority
p0
Drop everything: prod broken, live exposure, or owner-ruled P0
priority
p1
Next up: blocks a gate, a customer, or core incident quality
priority
p2
Normal: real defect or planned work, schedule in turn
priority
p3
Low: minor, cosmetic, or someday
status
blocked
Waiting on an external party, spend, or another issue
status
in-progress
Branch or PR open against it
status
needs-decision
Waiting on an owner or board ruling before work
status
needs-info
Root cause or repro unknown; needs a reading first
type
bug
Something built is wrong: code, data, or a measurement
type
chore
Maintenance, refactor, tests, pinning, cleanup: no user-visible change
type
decision
A ruling to make or record: board minutes, owner calls, legal reviews
type
docs
Docs, runbooks, CLAUDE.md, skills, SOPs
type
feature
New capability or an extension of an existing one
type
security
Security, privacy, credential or tenant-isolation exposure
type
tracking
Tracker, checklist, initiative or punch-list spanning several changes
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: logan/node-26#30
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #18. CISO condition from server-26#61: the enrollment token must never appear as a plaintext CLI argument.
3269203("enrollment token via header file too") only got the token off curl's argv.install.sh --token DRB-…was still the documented path: it put the token in shell history, and inpsfor the whole install. So #18 was still open on main.Changes (install.sh + README)
--token-file PATHwarns if the file is group- or world-readable, and an exportedDRB_ENROLLMENT_TOKENworks too.DRB_ENROLLMENT_TOKENisunsetafter it is read, so child processes don't inherit it.--tokenstill works so old copied commands don't break, but it prints a deprecation warning.--token-file. A re-run with a stale pickup secret (401/404) now prompts for a token instead of dying.--token, and they warn thatsudo DRB_ENROLLMENT_TOKEN=X bashleaks the token the same way--tokendoes.Not in this PR: the Server mint panel (
drb-frontend/app/settings/nodes/page.tsx:63) still renders--token ${justMinted}, so it is filed in server-26. This PR does not depend on it: an old command still works, with a warning.Verification:
bash -n. I also ran the argument-parsing section in a harness: file, argv, env, none, missing file and empty file all behave as intended. Not run end-to-end on a Pi. No Python touched. edge-node pytest: 287 passed, 9 skipped. flake8 is clean.🤖 Generated with Claude Code
Review pass (adversarial): pushed
c4b4cb9onto this branch.drb-edge-node/app/internal/key_pickup.pystill logged "Re-run install.sh with --token to recover" — the one re-run hint the PR missed. Reworded.DRB_ENROLLMENT_TOKEN") doesn't survivecurl ... | sudo bash— sudo's env_reset drops it.--helpand README now saysudo --preserve-env=DRB_ENROLLMENT_TOKEN.Local: edge-node pytest 296 passed, 0 skipped (flock shim), flake8 clean. #30 and #31 still merge cleanly together.
🤖 Generated with Claude Code