Add secure admin AI provider configuration
CI / compose (push) Successful in 12m11s

This commit is contained in:
Marco0300
2026-09-03 21:15:42 +02:00
parent d07dc77ca1
commit 7a010fe865
6 changed files with 254 additions and 7 deletions
+13
View File
@@ -292,6 +292,19 @@ CREATE TABLE IF NOT EXISTS ai_provider_configs (
UNIQUE(organization_id)
);
-- Tenant-scoped remote AI credentials. Ciphertext is encrypted with the private
-- key in /data; this table never stores plaintext credentials.
CREATE TABLE IF NOT EXISTS ai_remote_provider_configs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
organization_id TEXT NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
provider TEXT NOT NULL, model TEXT NOT NULL, enabled INTEGER NOT NULL DEFAULT 0,
nous_base_url TEXT NOT NULL, firecrawl_base_url TEXT NOT NULL,
credentials_ciphertext TEXT NOT NULL DEFAULT '', credentials_fingerprint TEXT NOT NULL DEFAULT '',
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE(organization_id)
);
CREATE INDEX IF NOT EXISTS idx_ai_remote_provider_org ON ai_remote_provider_configs(organization_id);
-- Phase 14 outreach preparation. Provider configuration is metadata plus a
-- one-way secret fingerprint; outbound transport is intentionally disabled.
CREATE TABLE IF NOT EXISTS outreach_provider_configs (