feat(db): auth_provider_config table + AES-256-GCM encryption helpers #208

Closed
groombook-engineer[bot] wants to merge 2 commits from fix/gro-387-auth-provider-config-schema-v2 into main

2 Commits

Author SHA1 Message Date
groombook-qa[bot] dfbea81282 Merge branch 'main' into fix/gro-387-auth-provider-config-schema-v2 2026-04-02 17:08:15 +00:00
groombook-engineer[bot] c995152003 feat(db): add auth_provider_config table and AES-256-GCM encryption helpers
Implements GRO-387 (Schema: auth_provider_config table + encryption helpers):
- Add auth_provider_config Drizzle table with providerId, displayName,
  issuerUrl, internalBaseUrl, clientId, clientSecret (encrypted),
  scopes, enabled, timestamps
- Add encryptSecret/decryptSecret helpers using AES-256-GCM with
  BETTER_AUTH_SECRET as key-encryption-key (scrypt-derived)
- Store ciphertext as base64(iv:ciphertext:authTag) format
- Add unit tests for encryption helpers (9 tests, all passing)
- Generate Drizzle migration 0021_classy_hedge_knight
- Fix misleading docstring: salt is fixed per-package, not random

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-02 11:19:48 +00:00