refactor(weknoracloud): update credential handling and configuration
- Replaced references to Docreader credentials with WeKnoraCloud credentials across multiple services and handlers. - Introduced a new CredentialsConfig structure to manage third-party provider credentials, specifically for WeKnoraCloud. - Updated database schema to include a credentials column for storing WeKnoraCloud AppID and AppSecret. - Enhanced methods for retrieving and utilizing WeKnoraCloud credentials, ensuring proper encryption and decryption during storage and retrieval. This update improves the management of WeKnoraCloud credentials, streamlining the integration and enhancing security measures.
This commit is contained in:
@@ -16,6 +16,7 @@ CREATE TABLE IF NOT EXISTS tenants (
|
||||
web_search_config TEXT DEFAULT NULL,
|
||||
parser_engine_config TEXT DEFAULT NULL,
|
||||
storage_engine_config TEXT DEFAULT NULL,
|
||||
credentials TEXT DEFAULT NULL,
|
||||
chat_history_config TEXT,
|
||||
retrieval_config TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE tenants DROP COLUMN IF EXISTS credentials;
|
||||
@@ -0,0 +1,5 @@
|
||||
-- Description: Add credentials column to tenants for third-party provider credentials (e.g. WeKnoraCloud AppID/AppSecret).
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000035] Adding credentials column to tenants'; END $$;
|
||||
|
||||
ALTER TABLE tenants ADD COLUMN IF NOT EXISTS credentials JSONB DEFAULT NULL;
|
||||
COMMENT ON COLUMN tenants.credentials IS 'Third-party provider credentials (e.g. WeKnoraCloud AppID/AppSecret); encrypted at application level';
|
||||
Reference in New Issue
Block a user