mcp-image 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -17
- package/dist/api/geminiClient.d.ts +2 -12
- package/dist/api/geminiClient.d.ts.map +1 -1
- package/dist/api/geminiClient.js +28 -56
- package/dist/api/geminiClient.js.map +1 -1
- package/dist/api/geminiTextClient.d.ts +42 -0
- package/dist/api/geminiTextClient.d.ts.map +1 -0
- package/dist/api/geminiTextClient.js +198 -0
- package/dist/api/geminiTextClient.js.map +1 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.d.ts +84 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.d.ts.map +1 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.js +100 -0
- package/dist/business/__tests__/mocks/mcpSamplingClient.mock.js.map +1 -0
- package/dist/business/bestPracticesEngine.d.ts +149 -0
- package/dist/business/bestPracticesEngine.d.ts.map +1 -0
- package/dist/business/bestPracticesEngine.js +781 -0
- package/dist/business/bestPracticesEngine.js.map +1 -0
- package/dist/business/complexityAssessment.d.ts +132 -0
- package/dist/business/complexityAssessment.d.ts.map +1 -0
- package/dist/business/complexityAssessment.js +488 -0
- package/dist/business/complexityAssessment.js.map +1 -0
- package/dist/business/fallbackStrategies.d.ts +177 -0
- package/dist/business/fallbackStrategies.d.ts.map +1 -0
- package/dist/business/fallbackStrategies.js +368 -0
- package/dist/business/fallbackStrategies.js.map +1 -0
- package/dist/business/imageGenerator.d.ts.map +1 -1
- package/dist/business/imageGenerator.js +26 -5
- package/dist/business/imageGenerator.js.map +1 -1
- package/dist/business/multiImage/aspectRatioController.d.ts +77 -0
- package/dist/business/multiImage/aspectRatioController.d.ts.map +1 -0
- package/dist/business/multiImage/aspectRatioController.js +580 -0
- package/dist/business/multiImage/aspectRatioController.js.map +1 -0
- package/dist/business/multiImage/multiImageCoordinator.d.ts +142 -0
- package/dist/business/multiImage/multiImageCoordinator.d.ts.map +1 -0
- package/dist/business/multiImage/multiImageCoordinator.js +801 -0
- package/dist/business/multiImage/multiImageCoordinator.js.map +1 -0
- package/dist/business/pomlTemplateEngine.d.ts +206 -0
- package/dist/business/pomlTemplateEngine.d.ts.map +1 -0
- package/dist/business/pomlTemplateEngine.js +737 -0
- package/dist/business/pomlTemplateEngine.js.map +1 -0
- package/dist/business/promptOrchestrator.d.ts +173 -0
- package/dist/business/promptOrchestrator.d.ts.map +1 -0
- package/dist/business/promptOrchestrator.js +490 -0
- package/dist/business/promptOrchestrator.js.map +1 -0
- package/dist/business/responseBuilder.d.ts +2 -2
- package/dist/business/responseBuilder.d.ts.map +1 -1
- package/dist/business/responseBuilder.js +6 -1
- package/dist/business/responseBuilder.js.map +1 -1
- package/dist/business/structuredPromptGenerator.d.ts +54 -0
- package/dist/business/structuredPromptGenerator.d.ts.map +1 -0
- package/dist/business/structuredPromptGenerator.js +208 -0
- package/dist/business/structuredPromptGenerator.js.map +1 -0
- package/dist/business/templateNormalizer.d.ts +81 -0
- package/dist/business/templateNormalizer.d.ts.map +1 -0
- package/dist/business/templateNormalizer.js +659 -0
- package/dist/business/templateNormalizer.js.map +1 -0
- package/dist/documentation/apiContractValidation.d.ts +62 -0
- package/dist/documentation/apiContractValidation.d.ts.map +1 -0
- package/dist/documentation/apiContractValidation.js +305 -0
- package/dist/documentation/apiContractValidation.js.map +1 -0
- package/dist/infrastructure/concurrency/concurrencyManager.d.ts +101 -0
- package/dist/infrastructure/concurrency/concurrencyManager.d.ts.map +1 -0
- package/dist/infrastructure/concurrency/concurrencyManager.js +345 -0
- package/dist/infrastructure/concurrency/concurrencyManager.js.map +1 -0
- package/dist/infrastructure/config/secureConfigManager.d.ts +319 -0
- package/dist/infrastructure/config/secureConfigManager.d.ts.map +1 -0
- package/dist/infrastructure/config/secureConfigManager.js +600 -0
- package/dist/infrastructure/config/secureConfigManager.js.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.d.ts +229 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.d.ts.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.js +61 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandler.js.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.d.ts +133 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.d.ts.map +1 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.js +569 -0
- package/dist/infrastructure/errorHandling/orchestrationErrorHandlerImpl.js.map +1 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.d.ts +19 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.d.ts.map +1 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.js +31 -0
- package/dist/infrastructure/mcp/MCPSamplingClient.js.map +1 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.d.ts +59 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.d.ts.map +1 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.js +271 -0
- package/dist/infrastructure/mcp/RealMCPSamplingClient.js.map +1 -0
- package/dist/infrastructure/metadata/generationMetadata.d.ts +72 -0
- package/dist/infrastructure/metadata/generationMetadata.d.ts.map +1 -0
- package/dist/infrastructure/metadata/generationMetadata.js +228 -0
- package/dist/infrastructure/metadata/generationMetadata.js.map +1 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.d.ts +106 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.d.ts.map +1 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.js +456 -0
- package/dist/infrastructure/monitoring/OrchestrationMetrics.js.map +1 -0
- package/dist/infrastructure/monitoring/alertingSystem.d.ts +135 -0
- package/dist/infrastructure/monitoring/alertingSystem.d.ts.map +1 -0
- package/dist/infrastructure/monitoring/alertingSystem.js +549 -0
- package/dist/infrastructure/monitoring/alertingSystem.js.map +1 -0
- package/dist/infrastructure/optimization/performanceOptimizer.d.ts +89 -0
- package/dist/infrastructure/optimization/performanceOptimizer.d.ts.map +1 -0
- package/dist/infrastructure/optimization/performanceOptimizer.js +375 -0
- package/dist/infrastructure/optimization/performanceOptimizer.js.map +1 -0
- package/dist/infrastructure/security/AdvancedContentFilter.d.ts +99 -0
- package/dist/infrastructure/security/AdvancedContentFilter.d.ts.map +1 -0
- package/dist/infrastructure/security/AdvancedContentFilter.js +363 -0
- package/dist/infrastructure/security/AdvancedContentFilter.js.map +1 -0
- package/dist/infrastructure/security/MCPSecurityValidator.d.ts +62 -0
- package/dist/infrastructure/security/MCPSecurityValidator.d.ts.map +1 -0
- package/dist/infrastructure/security/MCPSecurityValidator.js +129 -0
- package/dist/infrastructure/security/MCPSecurityValidator.js.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.d.ts +304 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.d.ts.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.js +61 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddleware.js.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.d.ts +62 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.d.ts.map +1 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.js +591 -0
- package/dist/infrastructure/security/OrchestrationSecurityMiddlewareImpl.js.map +1 -0
- package/dist/infrastructure/security/SecureMCPClient.d.ts +154 -0
- package/dist/infrastructure/security/SecureMCPClient.d.ts.map +1 -0
- package/dist/infrastructure/security/SecureMCPClient.js +292 -0
- package/dist/infrastructure/security/SecureMCPClient.js.map +1 -0
- package/dist/infrastructure/security/SecurityIncidentManager.d.ts +142 -0
- package/dist/infrastructure/security/SecurityIncidentManager.d.ts.map +1 -0
- package/dist/infrastructure/security/SecurityIncidentManager.js +260 -0
- package/dist/infrastructure/security/SecurityIncidentManager.js.map +1 -0
- package/dist/infrastructure/security/apiKeyManager.d.ts +297 -0
- package/dist/infrastructure/security/apiKeyManager.d.ts.map +1 -0
- package/dist/infrastructure/security/apiKeyManager.js +254 -0
- package/dist/infrastructure/security/apiKeyManager.js.map +1 -0
- package/dist/infrastructure/security/dataSanitizer.d.ts +157 -0
- package/dist/infrastructure/security/dataSanitizer.d.ts.map +1 -0
- package/dist/infrastructure/security/dataSanitizer.js +525 -0
- package/dist/infrastructure/security/dataSanitizer.js.map +1 -0
- package/dist/infrastructure/validation/inputValidator.d.ts +54 -0
- package/dist/infrastructure/validation/inputValidator.d.ts.map +1 -0
- package/dist/infrastructure/validation/inputValidator.js +362 -0
- package/dist/infrastructure/validation/inputValidator.js.map +1 -0
- package/dist/integration/parameterOptimizer.d.ts +69 -0
- package/dist/integration/parameterOptimizer.d.ts.map +1 -0
- package/dist/integration/parameterOptimizer.js +317 -0
- package/dist/integration/parameterOptimizer.js.map +1 -0
- package/dist/integration/twoStageProcessor.d.ts +66 -0
- package/dist/integration/twoStageProcessor.d.ts.map +1 -0
- package/dist/integration/twoStageProcessor.js +348 -0
- package/dist/integration/twoStageProcessor.js.map +1 -0
- package/dist/server/handlers/structuredPromptHandler.d.ts +65 -0
- package/dist/server/handlers/structuredPromptHandler.d.ts.map +1 -0
- package/dist/server/handlers/structuredPromptHandler.js +314 -0
- package/dist/server/handlers/structuredPromptHandler.js.map +1 -0
- package/dist/server/mcpServer.d.ts +16 -35
- package/dist/server/mcpServer.d.ts.map +1 -1
- package/dist/server/mcpServer.js +111 -150
- package/dist/server/mcpServer.js.map +1 -1
- package/dist/server/mcpServerWithOrchestration.d.ts +98 -0
- package/dist/server/mcpServerWithOrchestration.d.ts.map +1 -0
- package/dist/server/mcpServerWithOrchestration.js +284 -0
- package/dist/server/mcpServerWithOrchestration.js.map +1 -0
- package/dist/types/mcpOrchestrationTypes.d.ts +135 -0
- package/dist/types/mcpOrchestrationTypes.d.ts.map +1 -0
- package/dist/types/mcpOrchestrationTypes.js +28 -0
- package/dist/types/mcpOrchestrationTypes.js.map +1 -0
- package/dist/types/multiImageTypes.d.ts +328 -0
- package/dist/types/multiImageTypes.d.ts.map +1 -0
- package/dist/types/multiImageTypes.js +27 -0
- package/dist/types/multiImageTypes.js.map +1 -0
- package/dist/types/performanceTypes.d.ts +300 -0
- package/dist/types/performanceTypes.d.ts.map +1 -0
- package/dist/types/performanceTypes.js +50 -0
- package/dist/types/performanceTypes.js.map +1 -0
- package/dist/types/twoStageTypes.d.ts +123 -0
- package/dist/types/twoStageTypes.d.ts.map +1 -0
- package/dist/types/twoStageTypes.js +7 -0
- package/dist/types/twoStageTypes.js.map +1 -0
- package/dist/utils/config.d.ts +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +1 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +11 -4
- package/vitest.config.mjs +0 -47
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* API Key Manager - Secure API key management with rotation and access control
|
|
4
|
+
* Provides separation, protection, and automated management of API keys
|
|
5
|
+
* Addresses SECURITY1 test case requirements
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.APIKeyManager = exports.UnauthorizedAPIAccessError = exports.RestrictionType = exports.SuspiciousActivityType = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Types of suspicious activity
|
|
11
|
+
*/
|
|
12
|
+
var SuspiciousActivityType;
|
|
13
|
+
(function (SuspiciousActivityType) {
|
|
14
|
+
SuspiciousActivityType["UNUSUAL_ACCESS_PATTERN"] = "unusual_access_pattern";
|
|
15
|
+
SuspiciousActivityType["EXCESSIVE_USAGE"] = "excessive_usage";
|
|
16
|
+
SuspiciousActivityType["UNAUTHORIZED_LOCATION"] = "unauthorized_location";
|
|
17
|
+
SuspiciousActivityType["INVALID_PERMISSIONS"] = "invalid_permissions";
|
|
18
|
+
SuspiciousActivityType["RAPID_SUCCESSION_REQUESTS"] = "rapid_succession_requests";
|
|
19
|
+
})(SuspiciousActivityType || (exports.SuspiciousActivityType = SuspiciousActivityType = {}));
|
|
20
|
+
/**
|
|
21
|
+
* Types of authorization restrictions
|
|
22
|
+
*/
|
|
23
|
+
var RestrictionType;
|
|
24
|
+
(function (RestrictionType) {
|
|
25
|
+
RestrictionType["TIME_BASED"] = "time_based";
|
|
26
|
+
RestrictionType["IP_BASED"] = "ip_based";
|
|
27
|
+
RestrictionType["RATE_LIMIT"] = "rate_limit";
|
|
28
|
+
RestrictionType["OPERATION_BASED"] = "operation_based";
|
|
29
|
+
RestrictionType["USER_BASED"] = "user_based";
|
|
30
|
+
})(RestrictionType || (exports.RestrictionType = RestrictionType = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Unauthorized API access error
|
|
33
|
+
*/
|
|
34
|
+
class UnauthorizedAPIAccessError extends Error {
|
|
35
|
+
constructor(reason) {
|
|
36
|
+
super(`Unauthorized API access: ${reason}`);
|
|
37
|
+
this.name = 'UnauthorizedAPIAccessError';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.UnauthorizedAPIAccessError = UnauthorizedAPIAccessError;
|
|
41
|
+
/**
|
|
42
|
+
* API Key Manager implementation
|
|
43
|
+
*/
|
|
44
|
+
class APIKeyManager {
|
|
45
|
+
constructor(keyVault, rotationScheduler, accessLogger) {
|
|
46
|
+
this.keyVault = keyVault;
|
|
47
|
+
this.rotationScheduler = rotationScheduler;
|
|
48
|
+
this.accessLogger = accessLogger;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get secure API key with authorization validation
|
|
52
|
+
*/
|
|
53
|
+
async getAPIKey(service, operation, sessionId) {
|
|
54
|
+
// Validate operation is authorized for this key
|
|
55
|
+
const authorization = await this.validateKeyAuthorization(service, operation);
|
|
56
|
+
if (!authorization.allowed) {
|
|
57
|
+
throw new UnauthorizedAPIAccessError(authorization.reason || 'Access denied');
|
|
58
|
+
}
|
|
59
|
+
// Get appropriate key for service
|
|
60
|
+
const keyInfo = await this.keyVault.retrieveKey(service);
|
|
61
|
+
// Check if key is expired
|
|
62
|
+
if (keyInfo.expiresAt < Date.now()) {
|
|
63
|
+
throw new UnauthorizedAPIAccessError('API key has expired');
|
|
64
|
+
}
|
|
65
|
+
// Log access for security monitoring
|
|
66
|
+
await this.accessLogger.logKeyAccess({
|
|
67
|
+
service,
|
|
68
|
+
operation,
|
|
69
|
+
timestamp: Date.now(),
|
|
70
|
+
keyId: keyInfo.keyId,
|
|
71
|
+
...(sessionId && { sessionId }),
|
|
72
|
+
success: true,
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
key: keyInfo.key,
|
|
76
|
+
expiresAt: keyInfo.expiresAt,
|
|
77
|
+
permissions: keyInfo.permissions,
|
|
78
|
+
keyId: keyInfo.keyId,
|
|
79
|
+
usageTracking: this.createUsageTracker(keyInfo.keyId),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Rotate API keys according to schedule
|
|
84
|
+
*/
|
|
85
|
+
async rotateAPIKeys(schedule) {
|
|
86
|
+
const results = [];
|
|
87
|
+
for (const service of schedule.services) {
|
|
88
|
+
try {
|
|
89
|
+
const oldKey = await this.keyVault.retrieveKey(service);
|
|
90
|
+
const newKey = await this.generateNewKey(service, oldKey.permissions);
|
|
91
|
+
// Gradual rotation with fallback period
|
|
92
|
+
await this.initiateGradualRotation(oldKey, newKey);
|
|
93
|
+
results.push({
|
|
94
|
+
service,
|
|
95
|
+
success: true,
|
|
96
|
+
newKeyId: newKey.keyId,
|
|
97
|
+
rotationTimestamp: Date.now(),
|
|
98
|
+
fallbackPeriodMs: 300000, // 5 minutes fallback
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
103
|
+
results.push({
|
|
104
|
+
service,
|
|
105
|
+
success: false,
|
|
106
|
+
error: errorMessage,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
rotations: results,
|
|
112
|
+
overallSuccess: results.every((r) => r.success),
|
|
113
|
+
timestamp: Date.now(),
|
|
114
|
+
errors: results
|
|
115
|
+
.filter((r) => !r.success)
|
|
116
|
+
.map((r) => r.error)
|
|
117
|
+
.filter(Boolean),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Validate key authorization for operation
|
|
122
|
+
*/
|
|
123
|
+
async validateKeyAuthorization(service, operation) {
|
|
124
|
+
try {
|
|
125
|
+
const keyInfo = await this.keyVault.retrieveKey(service);
|
|
126
|
+
// Check if operation is allowed for this key
|
|
127
|
+
if (!keyInfo.permissions.includes(operation) && !keyInfo.permissions.includes('*')) {
|
|
128
|
+
return {
|
|
129
|
+
allowed: false,
|
|
130
|
+
reason: `Operation '${operation}' not permitted for service '${service}'`,
|
|
131
|
+
permissions: keyInfo.permissions,
|
|
132
|
+
restrictions: [],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
allowed: true,
|
|
137
|
+
permissions: keyInfo.permissions,
|
|
138
|
+
restrictions: [],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
return {
|
|
143
|
+
allowed: false,
|
|
144
|
+
reason: `Key not found for service '${service}'`,
|
|
145
|
+
permissions: [],
|
|
146
|
+
restrictions: [],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Generate new key for service
|
|
152
|
+
*/
|
|
153
|
+
async generateNewKey(service, permissions) {
|
|
154
|
+
// In a real implementation, this would generate a secure key
|
|
155
|
+
const newKey = this.generateSecureKey();
|
|
156
|
+
const keyId = this.generateKeyId();
|
|
157
|
+
const expiresAt = Date.now() + 90 * 24 * 60 * 60 * 1000; // 90 days
|
|
158
|
+
await this.keyVault.storeKey(service, newKey, permissions, expiresAt);
|
|
159
|
+
return {
|
|
160
|
+
keyId,
|
|
161
|
+
key: newKey,
|
|
162
|
+
permissions,
|
|
163
|
+
createdAt: Date.now(),
|
|
164
|
+
expiresAt,
|
|
165
|
+
usageCount: 0,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Initiate gradual rotation with fallback period
|
|
170
|
+
*/
|
|
171
|
+
async initiateGradualRotation(oldKey, newKey) {
|
|
172
|
+
// Implementation would handle gradual transition
|
|
173
|
+
// For now, just log the rotation
|
|
174
|
+
console.log(`Rotating key ${oldKey.keyId} to ${newKey.keyId}`);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Create usage tracker for key
|
|
178
|
+
*/
|
|
179
|
+
createUsageTracker(keyId) {
|
|
180
|
+
return {
|
|
181
|
+
trackUsage: (operation, _metadata) => {
|
|
182
|
+
// Implementation would track usage statistics
|
|
183
|
+
console.log(`Tracking usage for key ${keyId}, operation: ${operation}`);
|
|
184
|
+
},
|
|
185
|
+
getUsageStats: (_timeRange) => ({
|
|
186
|
+
totalRequests: 0,
|
|
187
|
+
successfulRequests: 0,
|
|
188
|
+
failedRequests: 0,
|
|
189
|
+
averageResponseTime: 0,
|
|
190
|
+
rateLimitHits: 0,
|
|
191
|
+
costEstimate: 0,
|
|
192
|
+
}),
|
|
193
|
+
resetStats: () => {
|
|
194
|
+
console.log(`Reset stats for key ${keyId}`);
|
|
195
|
+
},
|
|
196
|
+
isRateLimited: () => false,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Generate secure random key
|
|
201
|
+
*/
|
|
202
|
+
generateSecureKey() {
|
|
203
|
+
// In production, use cryptographically secure random generation
|
|
204
|
+
return Array.from({ length: 32 }, () => Math.random().toString(36).charAt(2)).join('');
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Generate unique key identifier
|
|
208
|
+
*/
|
|
209
|
+
generateKeyId() {
|
|
210
|
+
return `key_${Date.now()}_${Math.random().toString(36).slice(2)}`;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Get key rotation status
|
|
214
|
+
*/
|
|
215
|
+
async getRotationStatus(service) {
|
|
216
|
+
const schedule = await this.rotationScheduler.getRotationSchedule(service);
|
|
217
|
+
return {
|
|
218
|
+
scheduled: schedule !== null,
|
|
219
|
+
...(schedule?.nextRotationAt && { nextRotation: schedule.nextRotationAt }),
|
|
220
|
+
// lastRotation would be tracked in real implementation
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Security audit of key usage
|
|
225
|
+
*/
|
|
226
|
+
async auditKeyUsage(service, timeRange) {
|
|
227
|
+
const keyInfo = await this.keyVault.retrieveKey(service);
|
|
228
|
+
const accessHistory = await this.accessLogger.getAccessHistory(keyInfo.keyId, timeRange);
|
|
229
|
+
const suspiciousActivity = await this.accessLogger.detectSuspiciousActivity(keyInfo.keyId);
|
|
230
|
+
return {
|
|
231
|
+
totalAccess: accessHistory.length,
|
|
232
|
+
suspiciousActivity,
|
|
233
|
+
accessHistory,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Emergency key revocation
|
|
238
|
+
*/
|
|
239
|
+
async emergencyRevocation(service, reason) {
|
|
240
|
+
await this.keyVault.removeKey(service);
|
|
241
|
+
await this.rotationScheduler.cancelRotation(service);
|
|
242
|
+
// Log security event
|
|
243
|
+
await this.accessLogger.logKeyAccess({
|
|
244
|
+
service,
|
|
245
|
+
operation: 'EMERGENCY_REVOCATION',
|
|
246
|
+
timestamp: Date.now(),
|
|
247
|
+
keyId: `revoked_${Date.now()}`,
|
|
248
|
+
success: true,
|
|
249
|
+
});
|
|
250
|
+
console.log(`Emergency revocation completed for service ${service}: ${reason}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
exports.APIKeyManager = APIKeyManager;
|
|
254
|
+
//# sourceMappingURL=apiKeyManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiKey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cAAc,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC,cAAc,EAAE,CAAC;YAC1E,uDAAuD;SACxD,CAAA;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,OAAe,EACf,SAAoB;QAMpB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QACxD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;QACxF,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAE1F,OAAO;YACL,WAAW,EAAE,aAAa,CAAC,MAAM;YACjC,kBAAkB;YAClB,aAAa;SACd,CAAA;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CAAC,OAAe,EAAE,MAAc;QACvD,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACtC,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QAEpD,qBAAqB;QACrB,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;YACnC,OAAO;YACP,SAAS,EAAE,sBAAsB;YACjC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,WAAW,IAAI,CAAC,GAAG,EAAE,EAAE;YAC9B,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;QAEF,OAAO,CAAC,GAAG,CAAC,8CAA8C,OAAO,KAAK,MAAM,EAAE,CAAC,CAAA;IACjF,CAAC;CACF;AAjQD,sCAiQC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data Sanitizer - Comprehensive threat detection and prompt sanitization
|
|
3
|
+
* Detects and mitigates security threats in user prompts and data
|
|
4
|
+
* Addresses SECURITY2 test case requirements
|
|
5
|
+
*/
|
|
6
|
+
import { type SanitizedPrompt, SecurityAction, SecuritySeverity, ThreatType } from './OrchestrationSecurityMiddleware';
|
|
7
|
+
/**
|
|
8
|
+
* Threat detection result
|
|
9
|
+
*/
|
|
10
|
+
export interface ThreatDetectionResult {
|
|
11
|
+
threatType: ThreatType;
|
|
12
|
+
threatsFound: ThreatMatch[];
|
|
13
|
+
confidence: number;
|
|
14
|
+
severity: SecuritySeverity;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Individual threat match
|
|
18
|
+
*/
|
|
19
|
+
export interface ThreatMatch {
|
|
20
|
+
pattern: string;
|
|
21
|
+
severity: SecuritySeverity;
|
|
22
|
+
location: ThreatLocation;
|
|
23
|
+
matchedText: string;
|
|
24
|
+
context: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Location of threat in content
|
|
28
|
+
*/
|
|
29
|
+
export interface ThreatLocation {
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
line?: number;
|
|
33
|
+
column?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Threat detector interface
|
|
37
|
+
*/
|
|
38
|
+
export interface ThreatDetector {
|
|
39
|
+
detect(content: string): Promise<ThreatDetectionResult>;
|
|
40
|
+
getPatterns(): SecurityPattern[];
|
|
41
|
+
updatePatterns(patterns: SecurityPattern[]): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Security pattern for threat detection
|
|
45
|
+
*/
|
|
46
|
+
export interface SecurityPattern {
|
|
47
|
+
id: string;
|
|
48
|
+
pattern: RegExp;
|
|
49
|
+
threatType: ThreatType;
|
|
50
|
+
severity: SecuritySeverity;
|
|
51
|
+
description: string;
|
|
52
|
+
action: SecurityAction;
|
|
53
|
+
confidence: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sanitization rule for content cleaning
|
|
57
|
+
*/
|
|
58
|
+
export interface SanitizationRule {
|
|
59
|
+
id: string;
|
|
60
|
+
threatType: ThreatType;
|
|
61
|
+
pattern: RegExp;
|
|
62
|
+
replacement: string | ((match: string) => string);
|
|
63
|
+
preserveContext: boolean;
|
|
64
|
+
logModification: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Content policy validator
|
|
68
|
+
*/
|
|
69
|
+
export interface ContentPolicyValidator {
|
|
70
|
+
validate(content: string): Promise<ContentPolicyResult>;
|
|
71
|
+
getViolations(content: string): Promise<PolicyViolation[]>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Content policy validation result
|
|
75
|
+
*/
|
|
76
|
+
export interface ContentPolicyResult {
|
|
77
|
+
allowed: boolean;
|
|
78
|
+
violations: PolicyViolation[];
|
|
79
|
+
score: number;
|
|
80
|
+
recommendations: string[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Individual policy violation
|
|
84
|
+
*/
|
|
85
|
+
export interface PolicyViolation {
|
|
86
|
+
type: string;
|
|
87
|
+
severity: SecuritySeverity;
|
|
88
|
+
description: string;
|
|
89
|
+
location: ThreatLocation;
|
|
90
|
+
suggestedFix: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Data Sanitizer - Main implementation
|
|
94
|
+
*/
|
|
95
|
+
export declare class DataSanitizer {
|
|
96
|
+
private threatDetectors;
|
|
97
|
+
private sanitizationRules;
|
|
98
|
+
private contentPolicyValidator;
|
|
99
|
+
constructor();
|
|
100
|
+
/**
|
|
101
|
+
* Sanitize prompt data with comprehensive threat detection
|
|
102
|
+
*/
|
|
103
|
+
sanitizePromptData(prompt: string): Promise<SanitizedPrompt>;
|
|
104
|
+
/**
|
|
105
|
+
* Detect prompt injection attempts
|
|
106
|
+
*/
|
|
107
|
+
private detectPromptInjection;
|
|
108
|
+
/**
|
|
109
|
+
* Detect sensitive data exposure
|
|
110
|
+
*/
|
|
111
|
+
private detectSensitiveData;
|
|
112
|
+
/**
|
|
113
|
+
* Detect malicious patterns
|
|
114
|
+
*/
|
|
115
|
+
private detectMaliciousPatterns;
|
|
116
|
+
/**
|
|
117
|
+
* Validate content policy
|
|
118
|
+
*/
|
|
119
|
+
private validateContentPolicy;
|
|
120
|
+
/**
|
|
121
|
+
* Apply sanitization for specific threat type
|
|
122
|
+
*/
|
|
123
|
+
private applySanitizationForThreatType;
|
|
124
|
+
/**
|
|
125
|
+
* Create sanitization rules
|
|
126
|
+
*/
|
|
127
|
+
private createSanitizationRules;
|
|
128
|
+
/**
|
|
129
|
+
* Create content policy validator
|
|
130
|
+
*/
|
|
131
|
+
private createContentPolicyValidator;
|
|
132
|
+
/**
|
|
133
|
+
* Get policy violations
|
|
134
|
+
*/
|
|
135
|
+
private getViolations;
|
|
136
|
+
/**
|
|
137
|
+
* Compare security severities
|
|
138
|
+
*/
|
|
139
|
+
private compareSeverity;
|
|
140
|
+
/**
|
|
141
|
+
* Quick threat check after sanitization
|
|
142
|
+
*/
|
|
143
|
+
private quickThreatCheck;
|
|
144
|
+
/**
|
|
145
|
+
* Get sanitization statistics
|
|
146
|
+
*/
|
|
147
|
+
getSanitizationStats(): {
|
|
148
|
+
totalRules: number;
|
|
149
|
+
detectors: string[];
|
|
150
|
+
supportedThreatTypes: ThreatType[];
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Update threat detection patterns
|
|
154
|
+
*/
|
|
155
|
+
updateThreatPatterns(threatType: ThreatType, patterns: SecurityPattern[]): void;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=dataSanitizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataSanitizer.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/security/dataSanitizer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,cAAc,EAEd,gBAAgB,EAEhB,UAAU,EACX,MAAM,mCAAmC,CAAA;AAE1C;;GAE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