You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): add workspace token auth to CLI auth endpoints
Fixes bd-critical-016: Workspace Daemon Auth - Unauthenticated Endpoints
The workspace daemon's CLI auth endpoints were exposed without
authentication. In cloud mode, attackers could potentially:
- Submit malicious codes to active auth sessions
- Enumerate active sessions
- DoS the PTY processes
- Hijack OAuth flows mid-completion
Changes:
- Add validateWorkspaceToken middleware to dashboard-server
- Apply middleware to all /auth/cli/* endpoints
- Skip auth in local mode (no WORKSPACE_TOKEN set)
- Update cloud server onboarding.ts to send Authorization header
- Add generateWorkspaceToken() helper matching provisioner logic
- Store workspaceId in session for subsequent requests
The workspace token is an HMAC-SHA256 hash of the workspace ID,
signed with the session secret. This matches the token generation
in the provisioner.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy file name to clipboardExpand all lines: .trajectories/active/traj_7ludwvz45veh.json
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -191,6 +191,18 @@
191
191
"reasoning": "Hamburger menu visibility, logs button always visible on mobile, responsive padding throughout"
192
192
},
193
193
"significance": "high"
194
+
},
195
+
{
196
+
"ts": 1767636873294,
197
+
"type": "decision",
198
+
"content": "Starting work on bd-critical-016: Workspace Daemon Auth security fix: Starting work on bd-critical-016: Workspace Daemon Auth security fix",
199
+
"raw": {
200
+
"question": "Starting work on bd-critical-016: Workspace Daemon Auth security fix",
201
+
"chosen": "Starting work on bd-critical-016: Workspace Daemon Auth security fix",
0 commit comments