feat(embed): scope OAuth and sessions per visitor principal
Add embed visitor principals (X-Embed-Visitor), widen sessions.user_id, embed MCP OAuth/approval routes, OAuth callback context detachment, and CloneContext principal preservation for async QA streams.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- Migration: 000066_sessions_user_id_widen (down)
|
||||
-- Note: fails if any row has user_id longer than 36 characters.
|
||||
|
||||
ALTER TABLE sessions
|
||||
ALTER COLUMN user_id TYPE VARCHAR(36);
|
||||
@@ -0,0 +1,10 @@
|
||||
-- Migration: 000066_sessions_user_id_widen
|
||||
-- Description: Widen sessions.user_id to store principal-based owner IDs
|
||||
-- (embed_session, api_external_user, etc.), not only UUIDs.
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000066] Widening sessions.user_id to VARCHAR(512)'; END $$;
|
||||
|
||||
ALTER TABLE sessions
|
||||
ALTER COLUMN user_id TYPE VARCHAR(512);
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000066] sessions.user_id widened'; END $$;
|
||||
Reference in New Issue
Block a user