feat(freight-rpa): 系统连接只保留上传开关并增加 Crane 一次回查

上传页、按钮和成功判断改由连接器固定。Crane 分配中只排一次 10 分钟状态回查,手动刷新不改到期时间。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-23 12:20:29 +08:00
1 parent 95e7db0831
commit 3bb9938c05
33 files changed
+878 -374

No files matched your search

@@ -3,8 +3,9 @@ services/freight_rpa/common/credential_crypto.py
用途:加密和解密库存 RPA Profile 的登录凭据(委托通用 core 模块,仅固定本域密钥键与错误码)。
依赖:app.core.credential_crypto(Fernet 加解密);调用方仅保存密文,不将凭据写入日志或 API 响应。
逻辑:管理服务写入 Profile 前调用 encrypt_credential;RPA 配置读取服务在受控内存中调用
decrypt_credential。主密钥键 FREIGHT_RPA_CREDENTIAL_KEY(2026-09-18 RPA 命名空间)。
逻辑:管理服务写入 Profile 前调用 encrypt_credential;管理端读取 Profile 时只解密用户名用于展示;
密码仅在 RPA 执行内存中调用 decrypt_credential。密码与密文不得进入 API 响应或日志。
主密钥键 FREIGHT_RPA_CREDENTIAL_KEY(2026-09-18 RPA 命名空间)。
"""
from __future__ import annotations
@@ -48,7 +49,7 @@ def decrypt_credential(ciphertext: str) -> str:
ciphertext: 数据库中保存的 Fernet 密文。
Returns:
str: 仅供 RPA 执行内存使用的明文。
str: 明文。密码只留在 RPA 执行内存;用户名可由管理端 Profile 接口返回。禁止写入日志。
Raises:
ServiceUnavailableError: 未配置或配置了无效的主密钥。