mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
feat(cliproxy): add customizable auth token manager
- Add CLIProxyAuthConfig type with api_key and management_secret fields - Implement auth-token-manager.ts with inheritance chain: variant auth → global auth → default constants - Add secure token generation using crypto.randomBytes (256-bit entropy) - Export auth functions from cliproxy barrel (index.ts) - Bump UNIFIED_CONFIG_VERSION to 6
This commit is contained in:
1 parent
af071cd467
commit
c4f09168ff
4 files changed
+235
-1
No files matched your search
@@ -135,3 +135,16 @@ export { detectRunningProxy, waitForProxyHealthy, reclaimOrphanedProxy } from '.
|
||||
// Startup lock (prevents race conditions between CCS processes)
|
||||
export type { LockResult } from './startup-lock';
|
||||
export { acquireStartupLock, withStartupLock } from './startup-lock';
|
||||
|
||||
// Auth token manager (customizable API key and management secret)
|
||||
export {
|
||||
generateSecureToken,
|
||||
maskToken,
|
||||
getEffectiveApiKey,
|
||||
getEffectiveManagementSecret,
|
||||
setGlobalApiKey,
|
||||
setGlobalManagementSecret,
|
||||
setVariantApiKey,
|
||||
resetAuthToDefaults,
|
||||
getAuthSummary,
|
||||
} from './auth-token-manager';
|
||||
Reference in new issue
Block a user