/** * CREDENTIAL VAULT - Secure storage for API keys and secrets * AES-256 encryption, rotation support, external vault integration */ export interface VaultConfig { encryption_key?: string; vault_backend?: 'memory' | 'aws-secrets-manager' | 'azure-key-vault' | 'hashicorp-vault'; aws_config?: { region: string; secret_name_prefix?: string; }; azure_config?: { vault_url: string; tenant_id: string; client_id: string; client_secret: string; }; hashicorp_config?: { endpoint: string; token: string; mount_path?: string; }; } export interface CredentialMetadata { created_at: Date; updated_at: Date; rotated_at?: Date; expires_at?: Date; version: number; tags?: Record; } export interface StoredCredential { key: string; encrypted_value: string; iv: string; metadata: CredentialMetadata; } export interface RotationPolicy { enabled: boolean; rotation_interval_days: number; notify_before_expiry_days?: number; auto_rotate?: boolean; } export declare class CredentialVault { private encryption_key; private credentials; private config; private rotation_policies; constructor(config?: VaultConfig); /** * Store a credential securely */ store(key: string, value: string, metadata?: Partial): Promise; /** * Retrieve and decrypt a credential */ retrieve(key: string): Promise; /** * Delete a credential */ delete(key: string): Promise; /** * List all credential keys */ list(): string[]; /** * Rotate a credential */ rotate(key: string, new_value: string): Promise; /** * Set rotation policy for a credential */ setRotationPolicy(key: string, policy: RotationPolicy): void; /** * Check which credentials need rotation */ getCredentialsNeedingRotation(): Array<{ key: string; days_until_expiry: number; }>; /** * Export encryption key (for backup/migration) */ exportEncryptionKey(): string; /** * Import credentials from external vault */ importFromExternalVault(): Promise; /** * Export all credentials to external vault */ exportToExternalVault(): Promise; private decrypt; private syncToExternalVault; private fetchFromExternalVault; private deleteFromExternalVault; private syncToAWS; private fetchFromAWS; private deleteFromAWS; private importFromAWS; private syncToAzure; private fetchFromAzureSecret; private deleteFromAzureSecret; private getAzureToken; private importFromAzure; private syncToHashiCorp; private fetchFromHashiCorp; private deleteFromHashiCorp; private importFromHashiCorp; } export declare class CredentialManager { private vault; constructor(config?: VaultConfig); /** * Store API key for a provider */ storeApiKey(provider: string, api_key: string, options?: { expires_in_days?: number; rotation_interval_days?: number; tags?: Record; }): Promise; /** * Retrieve API key for a provider */ getApiKey(provider: string): Promise; /** * Store webhook secret */ storeWebhookSecret(webhook_id: string, secret: string): Promise; /** * Get webhook secret */ getWebhookSecret(webhook_id: string): Promise; /** * Store database credentials */ storeDatabaseCredentials(connection_name: string, username: string, password: string): Promise; /** * Get database credentials */ getDatabaseCredentials(connection_name: string): Promise<{ username: string; password: string; }>; /** * Rotate all credentials needing rotation */ rotateExpiring(): Promise>; /** * List all stored credentials */ listCredentials(): string[]; /** * Delete a credential */ deleteCredential(key: string): Promise; /** * Export encryption key for backup */ exportEncryptionKey(): string; } //# sourceMappingURL=credential-vault.d.ts.map