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

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
groombook-engineer[bot]
2026-04-02 11:07:22 +00:00
parent 804bb474d2
commit 0ca63f2c65
7 changed files with 2364 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -148,6 +148,13 @@
"when": 1775050467192,
"tag": "0020_typical_daimon_hellstrom",
"breakpoints": true
},
{
"idx": 21,
"version": "7",
"when": 1775127727890,
"tag": "0021_classy_hedge_knight",
"breakpoints": true
}
]
}