import { EventEmitter } from 'events'; import { SecurityModule } from '../types/index.js'; /** * Comprehensive Security Service for ControlAI MCP * Provides enterprise-grade authentication, authorization, auditing, and encryption */ export declare class SecurityService extends EventEmitter { private config; private auditLog; private rateLimitMap; private encryptionKey; private failedLoginAttempts; constructor(config?: Partial); /** * Authentication Methods */ authenticate(credentials: AuthCredentials): Promise; validateToken(token: string): Promise; /** * Authorization Methods */ authorize(user: UserInfo, resource: string, action: string): Promise; /** * Data Encryption Methods */ encrypt(data: string): EncryptionResult; decrypt(encryptedData: string, ivString: string, authTagString?: string): DecryptionResult; /** * Audit Logging Methods */ private auditEvent; getAuditLogs(filters?: AuditFilters): Promise; /** * Security Health Check */ securityHealthCheck(): Promise; /** * Private Helper Methods */ private checkRateLimit; private isAccountLocked; private recordFailedLogin; private validateCredentials; private generateJWT; private signJWT; private verifyJWT; private hashPassword; private verifyPassword; private getJWTSecret; private getUserPermissions; private generateEncryptionKey; private checkSuspiciousActivity; private setupCleanupTasks; } interface AuthCredentials { identifier: string; password: string; userAgent?: string; } interface AuthResult { success: boolean; error: string | null; token: string | null; user: UserInfo | null; } interface TokenValidationResult { valid: boolean; error: string | null; user: UserInfo | null; } interface UserInfo { id: string; name: string; email: string; roles: string[]; permissions: string[]; } interface AuthorizationResult { authorized: boolean; reason: string; } interface EncryptionResult { success: boolean; encryptedData: string | null; iv: string | null; authTag: string | null; error: string | null; } interface DecryptionResult { success: boolean; decryptedData: string | null; error: string | null; } interface AuditEvent { timestamp: Date; category: string; action: string; userId: string; success: boolean; details?: any; } interface AuditFilters { category?: string; userId?: string; startDate?: Date; endDate?: Date; success?: boolean; } interface SecurityHealthReport { timestamp: Date; overallScore: number; issues: SecurityIssue[]; recommendations: string[]; metrics: SecurityMetrics; } interface SecurityIssue { severity: 'low' | 'medium' | 'high' | 'critical'; type: string; description: string; recommendation: string; } interface SecurityMetrics { totalAuditEvents: number; failedLogins: number; lockedAccounts: number; rateLimitViolations: number; } export {}; //# sourceMappingURL=SecurityService.d.ts.map