Skip to content
Clone

refactor(sagent): drop unused token issuer config

ZhenYi committed
parent 1b983aa commit db1be6a Browse files

5 files changed

+5 −23

File tree 5
Modified chart/values.yaml View chart/values.yaml
@@ -242,7 +242,7 @@
242242
243243# ---------------------------------------------------------------------------
244244# 沙箱智能体(agent gateway):任务在远端沙箱里跑,本仓只做建模、审计与落库。
245# 密钥走 secret.env(APP_SAGENT__ADMIN_KEY / APP_SAGENT__ISSUER_SECRET)。
245# 密钥走 secret.env(APP_SAGENT__ADMIN_KEY)。
246246# ---------------------------------------------------------------------------
247247sagent:
248248 enabled: false
Modified config/default.toml View config/default.toml
@@ -424,14 +424,11 @@
424424recording_enabled = false
425425
426426[sagent]
427# 沙箱智能体(lib/sagent)。admin_key / issuer_secret 只走 env:
428# APP_SAGENT__ADMIN_KEY / APP_SAGENT__ISSUER_SECRET。
427# 沙箱智能体(lib/sagent)。admin_key 只走 env:APP_SAGENT__ADMIN_KEY;
428# 会话令牌由 agent gateway 用 admin key 签发,本仓不持有签名密钥。
429429enabled = false
430430base_url = "https://agent.gitdata.ai"
431431admin_key = ""
432issuer_secret = ""
433issuer = "auth.session"
434audience = "agent-gateway"
435432session_ttl_secs = 600
436433tenant_id = "3f9a2c1e-77d4-4b18-9c0e-64b2f5a1d001"
437434max_pagination = 100
Modified deploy/values/prod.yaml View deploy/values/prod.yaml
@@ -215,7 +215,7 @@
215215
216216# ---------------------------------------------------------------------------
217217# 沙箱智能体(agent gateway):任务在远端沙箱里跑,本仓只做建模、审计与落库。
218# admin_key / issuer_secret 走 secret.env -> APP_SAGENT__ADMIN_KEY / APP_SAGENT__ISSUER_SECRET
218# admin_key 走 secret.env -> APP_SAGENT__ADMIN_KEY
219219# ---------------------------------------------------------------------------
220220sagent:
221221 enabled: true
Modified deploy/README.md View deploy/README.md
@@ -23,7 +23,7 @@
2323| `deploy/values/prod.yaml` | 域名、副本数、资源配置、AI 模型等**非敏感**项 | ✅ |
2424| Gitea Secret `PROD_SECRET_VALUES` | 数据库 URL、SMTP 口令、各签名/加密密钥、Redis 口令、AI API key | ❌ |
2525
26`PROD_SECRET_VALUES` 的完整内容(**21 项**,直接复制粘贴到 Gitea 即可):
26`PROD_SECRET_VALUES` 的完整内容(**20 项**,直接复制粘贴到 Gitea 即可):
2727
2828```yaml
2929secret:
@@ -45,7 +45,6 @@
4545 APP_CI__SECRET_ENCRYPTION_KEY: "..."
4646 APP_IMPORT__TOKEN_SECRET: "..."
4747 APP_SAGENT__ADMIN_KEY: "..."
48 APP_SAGENT__ISSUER_SECRET: "..."
4948 APP_AI__API_KEY: "..."
5049 APP_EMAIL__SMTP_PASSWORD: "..."
5150 APP_ADMIN__SEED_USERNAME: "..."
Modified lib/config/src/sagent.rs View lib/config/src/sagent.rs
@@ -6,9 +6,6 @@
66 pub enabled: bool,
77 pub base_url: String,
88 pub admin_key: String,
9 pub issuer_secret: String,
10 pub issuer: String,
11 pub audience: String,
129 pub session_ttl_secs: u64,
1310 pub tenant_id: String,
1411 pub max_pagination: u64,
@@ -29,9 +26,6 @@
2926 enabled: false,
3027 base_url: "https://agent.gitdata.ai".to_string(),
3128 admin_key: String::new(),
32 issuer_secret: String::new(),
33 issuer: "auth.session".to_string(),
34 audience: "agent-gateway".to_string(),
3529 session_ttl_secs: 600,
3630 tenant_id: "3f9a2c1e-77d4-4b18-9c0e-64b2f5a1d001".to_string(),
3731 max_pagination: 100,
@@ -70,14 +64,6 @@
7064 }
7165 if self.admin_key.trim().is_empty() {
7266 return Err("sagent.admin_key must not be empty when sagent is enabled".to_string());
73 }
74 if self.issuer_secret.trim().is_empty() {
75 return Err(
76 "sagent.issuer_secret must not be empty when sagent is enabled".to_string(),
77 );
78 }
79 if self.issuer.trim().is_empty() || self.audience.trim().is_empty() {
80 return Err("sagent issuer and audience must not be empty".to_string());
8167 }
8268 if is_blank(&self.tenant_id) {
8369 return Err("sagent.tenant_id must not be empty when sagent is enabled".to_string());