agents-cli deploy has no way to pass CMEK (encryption_spec) for Agent Runtime, blocking deploys under constraints/gcp.restrictNonCmekServices
还没有人认领这个 Issue。
评估
调研方向
从 google/agents/cli/deploy/cmd_deploy.py 和 agent_runtime.py 开始,然后检查 vertexai.agent_engines._agent_engines.create() 的 encryption_spec 参数。针对强制执行 constraints/gcp.restrictNonCmekServices 的项目运行复现命令,并检查 agents-cli deploy --help。当 agent_runtime deploy 能够接收 KMS 加密密钥并满足该政策时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
What is your feature suggestion?
Description
Deploying as ADK Agent to Agent Runtime(agents-cli deploy --deployment-target agent_runtime) fails in any GCP project that enforces the org policy constraints/gcp.restrictNonCmekServices, because the CLI never passes a KMS encryption key to the undersying create call.
Reproduce
agents-cli scaffold create test-a2a-agent --agent adk --deployment-target agent_runtime --region us-central1 --cicd-runner skip
cd test-a2a-agent && agents-cli install
agents-cli deploy --project --region us-central1 --no-confirm-project
Observed Error
Error: Agent Runtime create request failed — 400 FAILED_PRECONDITION: The request has violated one or more Org Policies: violations {
type: "constraints/gcp.restrictNonCmekServices"
subject: "orgpolicy:projects/"
description: "Constraint constraints/gcp.restrictNonCmekServices violated for projects/<project> attempting to create a resource without specifying a KMS CryptoKey."
}
Root cause
- agents-cli deploy --help exposes flags for --network-attachment, --service-account, --agent-gateway-*, etc., but has no --kms-key / --encryption-spec flag.
- The underlying SDK (vertexai.agent_engines._agent_engines.create(), in google_cloud_aiplatform==1.165.1 as vendored by the CLI) already accepts an encryption_spec: Optional[aip_types.EncryptionSpec] parameter — the capability exists in the SDK layer, it's just never threaded through google/agents/cli/deploy/cmd_deploy.py / agent_runtime.py.
Requested fix
Add a --kms-key (or --encryption-spec) flag to agents-cli deploy for the agent_runtime target
What will this enable you to do?
Any organization that mandates CMEK for Vertex AI resources (a common enterprise/regulated-industry policy) cannot deploy to Agent Runtime via agents-cli at all — there is no workaround short of bypassing the CLI and calling the
Additional context
No response
- 主要语言
- Python
- 星标
- 6k
- 派生
- 670
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/agents-cli 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 92/100
google/agents-cli#86 ·
-
google/agents-cli#91 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 68/100
google/agents-cli#85 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
google/agents-cli#84 · 1 条评论 ·
-
google/agents-cli#79 · 2 条评论 · 已指派 1 人 ·
查看 google/agents-cli 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·