@gati-framework/runtime
Version:
Gati runtime execution engine for running handler-based applications
69 lines • 1.73 kB
TypeScript
/**
* @module runtime/secrets-manager
* @description Secure secrets management with caching and audit logging
*/
import type { SecretsManagerConfig, SecretAccessRequest, SecretAccessResult, SecretsManager as ISecretsManager, SecretAuditEntry } from './types/secrets-manager.js';
/**
* Cache statistics
*/
interface CacheStats {
size: number;
hits: number;
misses: number;
evictions: number;
}
/**
* Secrets manager implementation
*/
export declare class SecretsManager implements ISecretsManager {
private readonly config;
private readonly cache;
private readonly auditLog;
private readonly stats;
constructor(config: SecretsManagerConfig);
/**
* Get a single secret
*/
getSecret(request: SecretAccessRequest): Promise<SecretAccessResult>;
/**
* Get multiple secrets
*/
getSecrets(keys: string[], context?: {
requestId?: string;
handlerId?: string;
}): Promise<Map<string, SecretAccessResult>>;
/**
* Check if a secret exists
*/
hasSecret(key: string): Promise<boolean>;
/**
* Invalidate cached secret
*/
invalidate(key: string): void;
/**
* Clear all cached secrets
*/
clearCache(): void;
/**
* Get cache statistics
*/
getCacheStats(): CacheStats;
/**
* Get audit log entries
*/
getAuditLog(): SecretAuditEntry[];
/**
* Fetch secret from providers (fallback chain)
*/
private fetchFromProviders;
/**
* Calculate TTL with bounds checking
*/
private calculateTtl;
/**
* Log secret access for audit trail
*/
private logAccess;
}
export {};
//# sourceMappingURL=secrets-manager.d.ts.map