style: formatted the docs with prettier

This commit is contained in:
2025-07-13 17:11:11 +02:00
parent 5fb491214a
commit b946bdc803
12 changed files with 571 additions and 553 deletions

View File

@ -59,7 +59,7 @@ GET /api/csp-metrics
#### Query Parameters #### Query Parameters
| Parameter | Type | Description | Default | Example | | Parameter | Type | Description | Default | Example |
| ---------------- | ------- | ------------------------- | ------- | ---------------------- | | ---------------- | ------- | ------------------------------------------------------------------------------- | ------- | ---------------------- |
| `timeRange` | string | Time range for metrics | `24h` | `?timeRange=7d` | | `timeRange` | string | Time range for metrics | `24h` | `?timeRange=7d` |
| `format` | string | Response format | `json` | `?format=csv` | | `format` | string | Response format | `json` | `?format=csv` |
| `groupBy` | string | Group results by field | `hour` | `?groupBy=directive` | | `groupBy` | string | Group results by field | `hour` | `?groupBy=directive` |

View File

@ -45,14 +45,17 @@ DATABASE_URL="postgresql://user:pass@host:5432/db?connection_limit=20&pool_timeo
### Fixed Issues ### Fixed Issues
1. **Multiple PrismaClient Instances**: 1. **Multiple PrismaClient Instances**:
- ❌ Before: Each scheduler created its own PrismaClient - ❌ Before: Each scheduler created its own PrismaClient
- ✅ After: All modules use singleton pattern from `lib/prisma.ts` - ✅ After: All modules use singleton pattern from `lib/prisma.ts`
2. **No Connection Management**: 2. **No Connection Management**:
- ❌ Before: No graceful shutdown or connection cleanup - ❌ Before: No graceful shutdown or connection cleanup
- ✅ After: Proper cleanup on process termination - ✅ After: Proper cleanup on process termination
3. **No Monitoring**: 3. **No Monitoring**:
- ❌ Before: No visibility into connection usage - ❌ Before: No visibility into connection usage
- ✅ After: Health check endpoint and connection metrics - ✅ After: Health check endpoint and connection metrics

View File

@ -380,22 +380,26 @@ csv-import-scheduler-eu:
### From Current Architecture ### From Current Architecture
1. **Phase 1: Extract Schedulers** 1. **Phase 1: Extract Schedulers**
- ✅ Create BaseSchedulerService - ✅ Create BaseSchedulerService
- ✅ Implement CsvImportSchedulerService - ✅ Implement CsvImportSchedulerService
- ✅ Create SchedulerManager - ✅ Create SchedulerManager
- ⏳ Implement remaining scheduler services - ⏳ Implement remaining scheduler services
2. **Phase 2: Deployment Options** 2. **Phase 2: Deployment Options**
- ✅ Add ServerSchedulerIntegration for backwards compatibility - ✅ Add ServerSchedulerIntegration for backwards compatibility
- ✅ Create StandaloneSchedulerRunner - ✅ Create StandaloneSchedulerRunner
- ✅ Add health check endpoints - ✅ Add health check endpoints
3. **Phase 3: Container Support** 3. **Phase 3: Container Support**
- ⏳ Create Dockerfile for scheduler containers - ⏳ Create Dockerfile for scheduler containers
- ⏳ Add Kubernetes manifests - ⏳ Add Kubernetes manifests
- ⏳ Implement distributed coordination - ⏳ Implement distributed coordination
4. **Phase 4: Production Migration** 4. **Phase 4: Production Migration**
- ⏳ Deploy separate scheduler containers - ⏳ Deploy separate scheduler containers
- ⏳ Monitor performance and stability - ⏳ Monitor performance and stability
- ⏳ Gradually increase horizontal scaling - ⏳ Gradually increase horizontal scaling

View File

@ -9,6 +9,7 @@ The Security Monitoring and Alerting System provides comprehensive real-time sec
### Core Components ### Core Components
1. **Security Monitoring Service** (`lib/securityMonitoring.ts`) 1. **Security Monitoring Service** (`lib/securityMonitoring.ts`)
- Real-time event processing - Real-time event processing
- Anomaly detection algorithms - Anomaly detection algorithms
- Alert generation and management - Alert generation and management
@ -16,17 +17,20 @@ The Security Monitoring and Alerting System provides comprehensive real-time sec
- Threat level assessment - Threat level assessment
2. **Enhanced Security Logging** (`enhancedSecurityLog`) 2. **Enhanced Security Logging** (`enhancedSecurityLog`)
- Integrates with existing audit logger - Integrates with existing audit logger
- Processes events through monitoring system - Processes events through monitoring system
- Triggers immediate threat detection - Triggers immediate threat detection
3. **API Endpoints** (`app/api/admin/security-monitoring/`) 3. **API Endpoints** (`app/api/admin/security-monitoring/`)
- `/api/admin/security-monitoring` - Main metrics and configuration - `/api/admin/security-monitoring` - Main metrics and configuration
- `/api/admin/security-monitoring/alerts` - Alert management - `/api/admin/security-monitoring/alerts` - Alert management
- `/api/admin/security-monitoring/export` - Data export - `/api/admin/security-monitoring/export` - Data export
- `/api/admin/security-monitoring/threat-analysis` - Threat analysis - `/api/admin/security-monitoring/threat-analysis` - Threat analysis
4. **Dashboard UI** (`app/platform/security/page.tsx`) 4. **Dashboard UI** (`app/platform/security/page.tsx`)
- Real-time security metrics - Real-time security metrics
- Active alerts management - Active alerts management
- Threat analysis visualization - Threat analysis visualization
@ -69,16 +73,19 @@ enum AlertType {
The system implements several anomaly detection algorithms: The system implements several anomaly detection algorithms:
1. **Geographic Anomaly Detection** 1. **Geographic Anomaly Detection**
- Detects logins from unusual countries - Detects logins from unusual countries
- Compares against historical user patterns - Compares against historical user patterns
- Confidence scoring based on deviation - Confidence scoring based on deviation
2. **Temporal Anomaly Detection** 2. **Temporal Anomaly Detection**
- Identifies activity spikes during unusual hours - Identifies activity spikes during unusual hours
- Compares current activity to historical averages - Compares current activity to historical averages
- Configurable thresholds for different event types - Configurable thresholds for different event types
3. **Behavioral Anomaly Detection** 3. **Behavioral Anomaly Detection**
- Multiple failed login attempts - Multiple failed login attempts
- Rapid succession of actions - Rapid succession of actions
- Pattern deviation analysis - Pattern deviation analysis
@ -348,21 +355,25 @@ await enhancedSecurityLog(
### Planned Features ### Planned Features
1. **Machine Learning Integration** 1. **Machine Learning Integration**
- Behavioral pattern recognition - Behavioral pattern recognition
- Adaptive threshold adjustment - Adaptive threshold adjustment
- Predictive threat modeling - Predictive threat modeling
2. **Advanced Analytics** 2. **Advanced Analytics**
- Threat intelligence integration - Threat intelligence integration
- Cross-correlation analysis - Cross-correlation analysis
- Risk trend analysis - Risk trend analysis
3. **Integration Enhancements** 3. **Integration Enhancements**
- SIEM system connectors - SIEM system connectors
- Webhook customization - Webhook customization
- Mobile app notifications - Mobile app notifications
4. **Automated Response** 4. **Automated Response**
- IP blocking automation - IP blocking automation
- Account suspension workflows - Account suspension workflows
- Incident response orchestration - Incident response orchestration