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:
kaitranntt committed 2025-12-25 14:35:43 -05:00
1 parent af071cd467
commit c4f09168ff
4 files changed
+235 -1

No files matched your search

+13
View File
@@ -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';