feat: 装配 UniDesk SSH 工具凭证
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
| Codex stdio profile 凭据文件 | 真实 Code Agent backend 调上游模型 | runner 或 backend adapter | `codex`、`deepseek` 与 `minimax-m3` 均使用 `auth.json`/`config.toml` 文件形态,只通过 profile-scoped Kubernetes SecretRef 文件投影注入,不写入 run payload。 |
|
||||
| Git SSH deploy key | Tekton checkout source/GitOps promotion,Argo 读取 GitOps branch | Tekton、Argo CD | 只存在于 `agentrun-ci` 或 `argocd` Secret;不进入 runtime Pod。 |
|
||||
| Registry credential | push/pull private registry | Tekton、runtime imagePullSecret | 只作为 ServiceAccount/imagePullSecret 引用。 |
|
||||
| Tool credential | GitHub PR、issue、artifact registry 等 agent shell/tool 授权 | runner/backend adapter | 必须通过 `executionPolicy.secretScope.toolCredentials[]` 的 SecretRef 装配进入运行时;不是 Queue integration,也不能用 `transientEnv` 承载长期 credential。 |
|
||||
| Tool credential | GitHub PR、issue、UniDesk SSH passthrough、artifact registry 等 agent shell/tool 授权 | runner/backend adapter | 必须通过 `executionPolicy.secretScope.toolCredentials[]` 的 SecretRef 装配进入运行时;不是 Queue integration,也不能用 `transientEnv` 承载长期 credential。 |
|
||||
| Future tenant credential | tenant 专属工具或外部服务 | runner/backend adapter | 必须先扩展装配 SPEC 的 SecretRef 和 secret scope,再允许 run 引用。 |
|
||||
|
||||
## 固定命名建议
|
||||
@@ -35,6 +35,8 @@
|
||||
| Provider config | 非敏感 base URL/model 可以来自 `config.toml` 或 ConfigMap;credential value 不得放入 ConfigMap。 |
|
||||
| Tekton Git SSH Secret | `agentrun-ci/agentrun-git-ssh` |
|
||||
| Argo Git SSH Secret | `argocd/agentrun-git-ssh` |
|
||||
| GitHub Tool Secret | `agentrun-v01-tool-github-pr` key `GH_TOKEN` |
|
||||
| UniDesk SSH Tool Secret | `agentrun-v01-tool-unidesk-ssh` key `UNIDESK_SSH_CLIENT_TOKEN` |
|
||||
| Runtime ServiceAccount | `agentrun-v01-mgr`、`agentrun-v01-runner` |
|
||||
|
||||
命名可以在实现时因集群约束调整,但必须满足 lane 独立、用途单一、最小 RBAC 和不跨 `v0.1`/`v0.2` 复用的原则。
|
||||
@@ -66,7 +68,7 @@ Secret 创建和轮换必须通过 Kubernetes 密钥管理完成。`deploy/deplo
|
||||
|
||||
## Run secretScope 合同
|
||||
|
||||
Run 的 `executionPolicy.secretScope` 只能包含引用,不包含值。provider credential 使用 `providerCredentials[]`;GitHub PR 等 agent shell/tool 授权使用装配 SPEC 定义的 `toolCredentials[]`,不得混入 `transientEnv`。示例形态:
|
||||
Run 的 `executionPolicy.secretScope` 只能包含引用,不包含值。provider credential 使用 `providerCredentials[]`;GitHub PR、UniDesk SSH passthrough 等 agent shell/tool 授权使用装配 SPEC 定义的 `toolCredentials[]`,不得混入 `transientEnv`。示例形态:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -116,7 +118,7 @@ Run 的 `executionPolicy.secretScope` 只能包含引用,不包含值。provid
|
||||
|
||||
## runner-job transientEnv
|
||||
|
||||
`transientEnv` 用于承接调度方生成的短期、单次 runner Job 运行上下文,例如 HWLAB Code Agent 的 device-pod session token 和 API URL。它不是 provider credential、tool credential,也不是 run durable fact。
|
||||
`transientEnv` 用于承接调度方生成的短期、单次 runner Job 运行上下文,例如 HWLAB Code Agent 的 device-pod session token、API URL 和非敏感 UniDesk frontend 地址。它不是 provider credential、tool credential,也不是 run durable fact。
|
||||
|
||||
规则:
|
||||
|
||||
@@ -125,7 +127,7 @@ Run 的 `executionPolicy.secretScope` 只能包含引用,不包含值。provid
|
||||
- response、runner job status、event 和 dry-run manifest 只能展示 env name、count 和 `valuesPrinted=false`;dry-run manifest 中的 transient env value 必须显示为 `REDACTED`。
|
||||
- 正式 Kubernetes Job manifest 会把 value 注入到本次 runner container env;该 token 必须由调度方控制 TTL、权限和业务授权范围。
|
||||
- AgentRun 不解释 HWLAB device-pod 权限,也不把业务鉴权做成通用 policy;AgentRun 只负责不持久化、不回显、不扩散这类短期 env value。
|
||||
- GitHub token、SSH private key、provider API key、registry token 等可复用 credential 不得通过 `transientEnv` 注入;必须先进入装配 SPEC 的 SecretRef 路径。
|
||||
- GitHub token、UniDesk SSH client token、SSH private key、provider API key、registry token 等可复用 credential 不得通过 `transientEnv` 注入;必须先进入装配 SPEC 的 SecretRef 路径。
|
||||
|
||||
## 分发路径
|
||||
|
||||
@@ -198,6 +200,6 @@ Secret 创建和轮换不由 source branch 自动生成;source branch 只声
|
||||
| Codex auth/config file projection | 已实现主路径 | backend readiness 检查 `auth.json`/`config.toml` 可读性,缺失时返回 `secret-unavailable`;真实 runner Job 将只读 projection 复制到 writable `CODEX_HOME`。 |
|
||||
| DeepSeek profile SecretRef | 已实现/已通过主闭环 | 已新增 `agentrun-v01-provider-deepseek` render、GitOps/RBAC 引用、Job projection、profile 选择和负向 missing-secret 自测试;真实 Secret 创建与 Kubernetes Job projection 已通过主闭环,轮换仍由 Kubernetes 密钥管理流程完成。 |
|
||||
| MiniMax-M3 profile SecretRef | 已实现/待真实主闭环 | 已新增 `agentrun-v01-provider-minimax-m3` render、GitOps/RBAC 引用、Job projection、profile 选择和负向 missing-secret 自测试;真实 Secret 创建使用 HWLAB Code Queue 现有 MiniMax API key,轮换仍由 Kubernetes 密钥管理流程完成。 |
|
||||
| Tool credential SecretRef | 已实现最小 env projection | `executionPolicy.secretScope.toolCredentials[]` 已支持 `tool=github` 与 `projection.kind=env`,runner Job 通过 Kubernetes `secretKeyRef` 注入 env;CLI、event、runner job response 和 dry-run 只显示 SecretRef/projection 元数据,不输出值。 |
|
||||
| Tool credential SecretRef | 已实现最小 env projection | `executionPolicy.secretScope.toolCredentials[]` 已支持 `tool=github`、`tool=unidesk-ssh` 与 `projection.kind=env`,runner Job 通过 Kubernetes `secretKeyRef` 注入 env;CLI、event、runner job response 和 dry-run 只显示 SecretRef/projection 元数据,不输出值。 |
|
||||
| redaction 最小规则 | 已实现主路径 | Secret dry-run 工具、event、Job dry-run 输出、self-test 和真实主闭环均不打印 Secret value;复杂审计按 [spec-v01-validation.md](spec-v01-validation.md) 人工抽查。 |
|
||||
| 外部 secret manager | 未采用 | 如需 Vault/ExternalSecrets/SOPS,后续单独更新规格。 |
|
||||
|
||||
Reference in New Issue
Block a user