From f027764c47f8aef3b2e876b972b8b75c1bfcaf46 Mon Sep 17 00:00:00 2001 From: richjohnrambo Date: Thu, 17 Sep 2026 16:59:47 +0800 Subject: [PATCH] fix: update uid encryption key fallback --- configs/workbench.local.json | 2 +- configs/workbench.test.json | 2 +- internal/config/config.go | 2 +- internal/httpapi/uid.go | 2 +- internal/httpapi/uid_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/workbench.local.json b/configs/workbench.local.json index 1a31fef..7cf3e73 100644 --- a/configs/workbench.local.json +++ b/configs/workbench.local.json @@ -19,7 +19,7 @@ "auth": { "api_keys": [], "session_key_pattern": "im:session:token:%s", - "uid_key": "la6YsO+bNX/+XIkOqc5Svw==", + "uid_key": "dkXxWLwqUNRfYmdXRzOkZw==", "allow_dev_header_auth": true, "required_tenant_code": true, "required_api_key": false, diff --git a/configs/workbench.test.json b/configs/workbench.test.json index 04a0eb6..8b1c227 100644 --- a/configs/workbench.test.json +++ b/configs/workbench.test.json @@ -23,7 +23,7 @@ "auth": { "api_keys": [], "session_key_pattern": "im:session:token:%s", - "uid_key": "la6YsO+bNX/+XIkOqc5Svw==", + "uid_key": "dkXxWLwqUNRfYmdXRzOkZw==", "allow_dev_header_auth": false, "required_tenant_code": true, "required_api_key": true, diff --git a/internal/config/config.go b/internal/config/config.go index 8516726..48c57d1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -100,7 +100,7 @@ func defaultConfig() *Config { }, Auth: AuthConfig{ SessionKeyPattern: "im:session:token:%s", - UIDKey: "la6YsO+bNX/+XIkOqc5Svw==", + UIDKey: "dkXxWLwqUNRfYmdXRzOkZw==", RequiredTenantCode: true, RequiredAPIKey: true, }, diff --git a/internal/httpapi/uid.go b/internal/httpapi/uid.go index 874e7d5..7c776ad 100644 --- a/internal/httpapi/uid.go +++ b/internal/httpapi/uid.go @@ -14,7 +14,7 @@ import ( type userID int64 -const defaultUIDKey = "la6YsO+bNX/+XIkOqc5Svw==" +const defaultUIDKey = "dkXxWLwqUNRfYmdXRzOkZw==" var ( uidCodecMu sync.RWMutex diff --git a/internal/httpapi/uid_test.go b/internal/httpapi/uid_test.go index 4a70eea..c4ff393 100644 --- a/internal/httpapi/uid_test.go +++ b/internal/httpapi/uid_test.go @@ -24,7 +24,7 @@ func TestUserIDJSONAcceptsIMUserID(t *testing.T) { func TestUserIDCodecMatchesIMServer(t *testing.T) { const ( - publicID = "usrOj2NWDNdlMU" + publicID = "usr3rZjh8TD_34" dbID = int64(1574592702383656960) ) got, err := parseUserID(publicID)