/**
 * Security Configuration Management
 * Centralised security settings and policy management
 */
import type { LogContext } from '../utils/logger';
export interface SecurityPolicy {
    /** Input validation settings */
    inputValidation: {
        maxFileSize: number;
        allowedExtensions: string[];
        allowedMimeTypes: string[];
        allowSymlinks: boolean;
        maxPathDepth: number;
        rateLimit: number;
    };
    /** File access control settings */
    fileAccess: {
        defaultOperations: string[];
        requireIntegrityCheck: boolean;
        tempFileTimeout: number;
        maxConcurrentHandles: number;
        auditLogRetention: number;
    };
    /** Error handling and disclosure settings */
    errorHandling: {
        hideSystemPaths: boolean;
        sanitiseErrorMessages: boolean;
        maxStackTraceDepth: number;
        logSecurityEvents: boolean;
    };
    /** Cryptographic settings */
    cryptography: {
        hashAlgorithm: 'sha256' | 'sha512';
        encryptSensitiveData: boolean;
        keyDerivationIterations: number;
        saltLength: number;
    };
    /** Network and external access settings */
    network: {
        allowExternalConnections: boolean;
        allowedDomains: string[];
        requestTimeout: number;
        maxRequestSize: number;
    };
    /** Process isolation settings */
    process: {
        restrictFileSystemAccess: boolean;
        disableShellExecution: boolean;
        memoryLimit: number;
        cpuLimit: number;
    };
}
export interface SecurityConfiguration {
    /** Current security policy */
    policy: SecurityPolicy;
    /** Environment-specific overrides */
    environmentOverrides: Map<string, Partial<SecurityPolicy>>;
    /** Security feature flags */
    features: {
        enableAdvancedThreatDetection: boolean;
        enableRealTimeMonitoring: boolean;
        enableBehaviouralAnalysis: boolean;
        enableIntrusionDetection: boolean;
    };
    /** Compliance settings */
    compliance: {
        enableGDPRMode: boolean;
        enableSOXCompliance: boolean;
        enableHIPAAMode: boolean;
        dataRetentionDays: number;
    };
}
/**
 * Default security policy with secure defaults
 */
export declare const DEFAULT_SECURITY_POLICY: SecurityPolicy;
/**
 * Security Configuration Manager
 */
export declare class SecurityConfigManager {
    private static instance;
    private config;
    private configValidators;
    private sensitiveKeys;
    private constructor();
    static getInstance(): SecurityConfigManager;
    /**
     * Get current security policy
     */
    getSecurityPolicy(): SecurityPolicy;
    /**
     * Update security policy with validation
     */
    updateSecurityPolicy(updates: Partial<SecurityPolicy>, context?: LogContext): void;
    /**
     * Apply environment-specific security overrides
     */
    applyEnvironmentOverrides(environment: string): void;
    /**
     * Get security features configuration
     */
    getSecurityFeatures(): Record<string, boolean>;
    /**
     * Enable or disable security features
     */
    updateSecurityFeatures(features: Partial<Record<keyof SecurityConfiguration['features'], boolean>>, context?: LogContext): void;
    /**
     * Get compliance settings
     */
    getComplianceSettings(): Record<string, unknown>;
    /**
     * Check if a specific security feature is enabled
     */
    isFeatureEnabled(feature: keyof SecurityConfiguration['features']): boolean;
    /**
     * Get effective security policy for environment
     */
    getEffectivePolicy(environment?: string): SecurityPolicy;
    /**
     * Validate current security configuration
     */
    validateConfiguration(): {
        isValid: boolean;
        errors: string[];
        warnings: string[];
        recommendations: string[];
    };
    /**
     * Export security configuration (with sensitive data redacted)
     */
    exportConfiguration(includeSensitive?: boolean): Record<string, unknown>;
    /**
     * Import security configuration with validation
     */
    importConfiguration(configData: Record<string, unknown>, context?: LogContext): void;
    private initializeValidators;
    private initializeSensitiveKeys;
    private loadEnvironmentOverrides;
    private validatePolicyUpdates;
    private validateImportedConfig;
    private deepMergePolicy;
    private sanitiseForLogging;
    private logSecurityEvent;
}
/**
 * Factory function for easy access
 */
export declare function getSecurityConfig(): SecurityConfigManager;
/**
 * Security policy builder for fluent configuration
 */
export declare class SecurityPolicyBuilder {
    private policy;
    static create(): SecurityPolicyBuilder;
    inputValidation(config: Partial<SecurityPolicy['inputValidation']>): SecurityPolicyBuilder;
    fileAccess(config: Partial<SecurityPolicy['fileAccess']>): SecurityPolicyBuilder;
    errorHandling(config: Partial<SecurityPolicy['errorHandling']>): SecurityPolicyBuilder;
    cryptography(config: Partial<SecurityPolicy['cryptography']>): SecurityPolicyBuilder;
    network(config: Partial<SecurityPolicy['network']>): SecurityPolicyBuilder;
    process(config: Partial<SecurityPolicy['process']>): SecurityPolicyBuilder;
    build(): Partial<SecurityPolicy>;
}
/**
 * Pre-defined security profiles
 */
export declare const SecurityProfiles: {
    /** High security profile for production environments */
    HIGH_SECURITY: Partial<SecurityPolicy>;
    /** Balanced security profile for general use */
    BALANCED: Partial<SecurityPolicy>;
    /** Development profile with relaxed security for debugging */
    DEVELOPMENT: Partial<SecurityPolicy>;
};
//# sourceMappingURL=security-config.d.ts.map