feat(daemon): add authentication for daemon API routes
Issue daemon auth tokens (mdt_) on pairing session claim, bound to workspace_id + daemon_id with 1-year expiry. Add DaemonAuth middleware that validates these tokens and falls back to JWT/PAT for backward compatibility. Apply middleware to all daemon routes except pairing endpoints.
This commit is contained in:
parent
dc3dec8ebe
commit
afdfee78b9
9 changed files with 306 additions and 16 deletions
1
server/migrations/028_daemon_token.down.sql
Normal file
1
server/migrations/028_daemon_token.down.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE IF EXISTS daemon_token;
|
||||
Loading…
Add table
Add a link
Reference in a new issue