Skip to content

feat: add authenticated notes generation API route#39

Open
sammargolis wants to merge 1 commit intofix/sse-auth-without-query-tokenfrom
feat/authz-note-generation-route
Open

feat: add authenticated notes generation API route#39
sammargolis wants to merge 1 commit intofix/sse-auth-without-query-tokenfrom
feat/authz-note-generation-route

Conversation

@sammargolis
Copy link
Collaborator

Summary

  • adds authenticated /api/notes/generate route for hosted note generation
  • disables server-action note generation path in hosted mode
  • records note-generation audit events with org/user context

Security impact

  • enforces authz context for note generation in hosted deployments
  • removes unauthenticated hosted note-generation execution path

PHI handling impact

  • keeps note content out of audit metadata
  • retains non-PHI audit event structure with redacted/sanitized errors

Tests executed

  • pnpm build:test
  • pnpm exec tsc --project apps/web/tsconfig.json --noEmit
  • pnpm test:no-phi-logs

Rollback plan

  • revert this PR to return to prior note generation routing behavior

@sammargolis sammargolis force-pushed the fix/sse-auth-without-query-token branch from c516f2f to dc131e4 Compare March 2, 2026 17:16
@sammargolis sammargolis force-pushed the feat/authz-note-generation-route branch from b001c3d to 85ce49a Compare March 2, 2026 17:17
@sammargolis sammargolis force-pushed the fix/sse-auth-without-query-token branch from dc131e4 to eb0a077 Compare March 2, 2026 17:19
@sammargolis sammargolis force-pushed the feat/authz-note-generation-route branch from 85ce49a to 27622a7 Compare March 2, 2026 17:19
@sammargolis sammargolis force-pushed the fix/sse-auth-without-query-token branch from eb0a077 to 7a66a19 Compare March 2, 2026 17:23
@sammargolis sammargolis force-pushed the feat/authz-note-generation-route branch from 27622a7 to e9d6052 Compare March 2, 2026 17:23
@sammargolis sammargolis force-pushed the fix/sse-auth-without-query-token branch from 7a66a19 to a1561e8 Compare March 3, 2026 00:13
@sammargolis sammargolis force-pushed the feat/authz-note-generation-route branch from e9d6052 to b532975 Compare March 3, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant