feat: Phase 1 - 安全中间件 + 运维工具箱
新增 oss/core/security/ 模块(852行): - jwt_auth.py: JWT签发/验证(HMAC-SHA256,零外部依赖) - csrf.py: CSRF Token生成与校验 - input_validator.py: JSON Schema校验+类型强制 - tls.py: 自签名证书生成+SSL上下文 新增 oss/core/ops/ 模块: - health.py: 增强版/health端点(CPU/内存/磁盘/运行时间) - metrics.py: Prometheus兼容/metrics端点 对接改造: - engine.py: 导出新模块 - manager.py: 注册/api/login /health /metrics路由 - middleware.py: CSRF+InputValidation中间件 - config.py: JWT_SECRET/CSRF_SECRET等配置项 - security.py→security/__init__.py: 合并插件沙箱与HTTP安全
This commit is contained in:
8
oss/core/ops/__init__.py
Normal file
8
oss/core/ops/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
||||
"""运维工具箱"""
|
||||
from .health import HealthChecker
|
||||
from .metrics import MetricsCollector, get_metrics
|
||||
|
||||
__all__ = [
|
||||
"HealthChecker",
|
||||
"MetricsCollector", "get_metrics",
|
||||
]
|
||||
Reference in New Issue
Block a user