Files
rag/auth/__init__.py
lacerate551 100d1a06eb init: RAG 知识库服务初始提交
- 后端 API(Flask + Gunicorn)
- RAG 引擎(混合检索 + 云端 Reranker + 引用溯源)
- 文档解析(MinerU + 多格式支持)
- Docker 生产部署配置
- 排除前端项目、敏感配置、模型文件
2026-06-04 17:35:27 +08:00

49 lines
1.0 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
认证与安全模块
包含:
- gateway: 网关认证Header 读取)
- security: Prompt 注入防护、输入验证、输出过滤
"""
from auth.gateway import (
require_gateway_auth,
require_role,
get_user_permissions,
get_current_user,
get_auth_manager,
get_accessible_collections,
check_collection_permission,
can_create_collection,
can_delete_collection,
require_collection_permission,
)
from auth.security import (
validate_query,
sanitize_user_input,
filter_response,
is_safe_response,
AgentConstraints,
)
__all__ = [
# gateway
'require_gateway_auth',
'require_role',
'get_user_permissions',
'get_current_user',
'get_auth_manager',
'get_accessible_collections',
'check_collection_permission',
'can_create_collection',
'can_delete_collection',
'require_collection_permission',
# security
'validate_query',
'sanitize_user_input',
'filter_response',
'is_safe_response',
'AgentConstraints',
]