Skip to content

fix: update encryption key retrieval to use only USER_API_KEYS_ENCRYPTION_SECRET#137

Merged
willchen96 merged 1 commit into
mainfrom
require-user-api-key-secret
May 15, 2026
Merged

fix: update encryption key retrieval to use only USER_API_KEYS_ENCRYPTION_SECRET#137
willchen96 merged 1 commit into
mainfrom
require-user-api-key-secret

Conversation

@willchen96

Copy link
Copy Markdown
Owner

Summary

Require USER_API_KEYS_ENCRYPTION_SECRET for stored user API key encryption.

Changes

  • Removed fallback to API_KEYS_ENCRYPTION_SECRET.
  • Removed fallback to SUPABASE_SECRET_KEY.
  • Updated the runtime error to explicitly require USER_API_KEYS_ENCRYPTION_SECRET.

Why

Stored user API keys should be encrypted with a dedicated secret only. Falling back to the Supabase service role key couples unrelated secrets and makes rotation/deployment behavior harder to reason about.

Testing

  • npm run build --prefix backend passes in the private repo.
  • OSS backend build was blocked by missing local type packages in open-source-export/backend: @types/cors, @types/express, @types/multer.

…TION_SECRET; remove supabase secret key fallback
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