借助 Identity and Access Management (IAM) 角色和权限,您可以控制谁可以在 Agent Registry 中查看、注册和管理智能体、Model Context Protocol (MCP) 服务器、工具、独立技能、端点和绑定。
如需向治理项目 或管理项目 中的用户或群组授予 Agent Registry IAM 角色,请使用 Google Cloud 控制台中的 IAM 页面或 Google Cloud CLI。如需了解详情,请参阅使用 IAM 进行访问权限控制 和管理对项目、文件夹和组织的访问权限 。
Agent Registry 角色
下表介绍了 Agent Registry IAM 角色及其典型职责:
注意: 请仅向管理注册表的受信任管理员授予 Agent Registry API Admin (roles/agentregistry.admin) 或 Agent Registry API Editor (roles/agentregistry.editor) 角色。避免直接向代理授予这些角色。这些角色包含创建、删除和更新服务的权限,包括修改关键代理元数据和工具注解 (例如 readOnlyHint 或 destructiveHint)。当编排器代理使用修改后的工具时,对元数据和注解的恶意更改可能会导致意外和破坏性后果。此外,具有这些权限的代理可以明确地将恶意外部代理注册到注册表中。
角色
说明
用途
Agent Registry API Admin
(roles/agentregistry.admin)
拥有对所有 Agent Registry 资源的完整访问权限,包括智能体、MCP 服务器、工具、端点、独立技能、技能修订版本、安全发现结果、绑定和技能 IAM 政策。
注册和管理智能体、MCP 服务器、工具和端点。
创建、更新和删除独立技能和技能修订版本。
查看和列出技能修订版本的安全发现结果。
创建和管理绑定以及技能 IAM 政策。
Agent Registry API Editor
(roles/agentregistry.editor)
拥有对 Agent Registry 资源的编辑权限,包括智能体、MCP 服务器、工具、端点、独立 skill 和 skill 修订版本。
注册和管理智能体及 MCP 服务器。
更新工具定义和端点。
创建、更新和删除独立技能和技能修订版本。
Agent Registry API Viewer
(roles/agentregistry.viewer)
拥有只读权限,可查看和搜索智能体、MCP 服务器、工具、独立技能、技能修订版本、发布商、端点和绑定。
发现可用的智能体、MCP 服务器和工具。
查看 A2A 技能、独立技能、技能修订版本、发布商、端点和集成绑定。
Agent Registry User
(roles/agentregistry.user)
拥有对 Agent Registry 资源的只读权限,以及创建、更新和删除独立技能、技能修订版本和扫描设置的权限。
创建、更新和删除独立技能和技能修订版本,而无需对智能体、MCP 服务器或端点拥有编辑权限。
对技能修订版本进行版本控制,配置自动安全扫描,并集中管理技能的活跃状态。
Agent Registry 权限
下表列出了每个 Agent Registry IAM 角色拥有的权限:
Agent Registry API Admin
(roles/ agentregistry.admin)
拥有对 Agent Registry API 资源的完整访问权限。
agentregistry.*
agentregistry.agents.get
agentregistry.agents.list
agentregistry.agents.search
agentregistry. aiApplications. createPolicyBinding
agentregistry. aiApplications. deletePolicyBinding
agentregistry. aiApplications. get
agentregistry. aiApplications. getIamPolicy
agentregistry. aiApplications. list
agentregistry. aiApplications. searchPolicyBindings
agentregistry. aiApplications. setIamPolicy
agentregistry. aiApplications. updatePolicyBinding
agentregistry.bindings.create
agentregistry.bindings.delete
agentregistry. bindings. fetchAvailable
agentregistry.bindings.get
agentregistry.bindings.list
agentregistry.bindings.update
agentregistry.endpoints.get
agentregistry.endpoints.list
agentregistry.locations.get
agentregistry.locations.list
agentregistry.mcpServers.get
agentregistry.mcpServers.list
agentregistry. mcpServers. search
agentregistry. operations. cancel
agentregistry. operations. delete
agentregistry.operations.get
agentregistry.operations.list
agentregistry.publishers.get
agentregistry.publishers.list
agentregistry.services.create
agentregistry.services.delete
agentregistry.services.get
agentregistry.services.list
agentregistry.services.update
agentregistry. skillRevisions. create
agentregistry. skillRevisions. delete
agentregistry. skillRevisions. get
agentregistry. skillRevisions. list
agentregistry.skills.create
agentregistry.skills.delete
agentregistry.skills.get
agentregistry. skills. getIamPolicy
agentregistry.skills.list
agentregistry.skills.search
agentregistry. skills. setIamPolicy
agentregistry.skills.update
Agent Registry API Editor
(roles/ agentregistry.editor)
拥有对 Agent Registry API 资源的编辑权限。
agentregistry.agents.*
agentregistry.agents.get
agentregistry.agents.list
agentregistry.agents.search
agentregistry. aiApplications. get
agentregistry. aiApplications. list
agentregistry. aiApplications. searchPolicyBindings
agentregistry. bindings. fetchAvailable
agentregistry.bindings.get
agentregistry.bindings.list
agentregistry.endpoints.*
agentregistry.endpoints.get
agentregistry.endpoints.list
agentregistry.locations.*
agentregistry.locations.get
agentregistry.locations.list
agentregistry.mcpServers.*
agentregistry.mcpServers.get
agentregistry.mcpServers.list
agentregistry. mcpServers. search
agentregistry.operations.*
agentregistry. operations. cancel
agentregistry. operations. delete
agentregistry.operations.get
agentregistry.operations.list
agentregistry.publishers.*
agentregistry.publishers.get
agentregistry.publishers.list
agentregistry.services.*
agentregistry.services.create
agentregistry.services.delete
agentregistry.services.get
agentregistry.services.list
agentregistry.services.update
agentregistry.skillRevisions.*
agentregistry. skillRevisions. create
agentregistry. skillRevisions. delete
agentregistry. skillRevisions. get
agentregistry. skillRevisions. list
agentregistry.skills.create
agentregistry.skills.delete
agentregistry.skills.get
agentregistry.skills.list
agentregistry.skills.search
agentregistry.skills.update
Agent Registry API Viewer
(roles/ agentregistry.viewer)
拥有对 Agent Registry API 资源的只读权限。
agentregistry.agents.*
agentregistry.agents.get
agentregistry.agents.list
agentregistry.agents.search
agentregistry. aiApplications. get
agentregistry. aiApplications. list
agentregistry. aiApplications. searchPolicyBindings
agentregistry. bindings. fetchAvailable
agentregistry.bindings.get
agentregistry.bindings.list
agentregistry.endpoints.*
agentregistry.endpoints.get
agentregistry.endpoints.list
agentregistry.locations.*
agentregistry.locations.get
agentregistry.locations.list
agentregistry.mcpServers.*
agentregistry.mcpServers.get
agentregistry.mcpServers.list
agentregistry. mcpServers. search
agentregistry.operations.get
agentregistry.operations.list
agentregistry.publishers.*
agentregistry.publishers.get
agentregistry.publishers.list
agentregistry.services.get
agentregistry.services.list
agentregistry. skillRevisions. get
agentregistry. skillRevisions. list
agentregistry.skills.get
agentregistry.skills.list
agentregistry.skills.search
Agent Registry User
(roles/ agentregistry.user)
创建、更新和删除技能和技能修订版本。
agentregistry.agents.*
agentregistry.agents.get
agentregistry.agents.list
agentregistry.agents.search
agentregistry. aiApplications. get
agentregistry. aiApplications. list
agentregistry. aiApplications. searchPolicyBindings
agentregistry. bindings. fetchAvailable
agentregistry.bindings.get
agentregistry.bindings.list
agentregistry.endpoints.*
agentregistry.endpoints.get
agentregistry.endpoints.list
agentregistry.locations.*
agentregistry.locations.get
agentregistry.locations.list
agentregistry.mcpServers.*
agentregistry.mcpServers.get
agentregistry.mcpServers.list
agentregistry. mcpServers. search
agentregistry.operations.get
agentregistry.operations.list
agentregistry.publishers.*
agentregistry.publishers.get
agentregistry.publishers.list
agentregistry.services.get
agentregistry.services.list
agentregistry.skillRevisions.*
agentregistry. skillRevisions. create
agentregistry. skillRevisions. delete
agentregistry. skillRevisions. get
agentregistry. skillRevisions. list
agentregistry.skills.create
agentregistry.skills.delete
agentregistry.skills.get
agentregistry.skills.list
agentregistry.skills.search
agentregistry.skills.update
如需详细了解 IAM 权限,请参阅查找合适的预定义角色 和 IAM 角色和权限索引 。
跨项目管理边界的角色
在 Agent Registry 中为智能体组件配置管理边界 时,您必须在以下级别向用户或服务授予 IAM 角色:
管理项目 :向在边界内发现和管理代理的用户或服务授予管理项目 的 Agent Registry 角色。对管理项目拥有查看者访问权限的用户可以发现和搜索该管理项目所连接的每个边界内所有成员项目中的智能体和 MCP 服务器,而无需在每个成员项目中明确授予查看者权限。如果某个团队不得查看其他边界中的资产,请将该边界分配给单独的 CapabilityConfig 资源和管理项目。
成员项目 :向在特定成员项目中构建、注册或维护代理和工具的开发者授予这些特定成员项目的 Agent Registry 角色。
边界配置 :创建和管理边界配置资源需要对封闭文件夹或组织拥有管理员角色。如需了解详情,请参阅 Resource Manager 文档中配置管理边界 中的所需角色。
限制成员项目中的本地注册
由于在成员项目中创建的手动注册 Service 和 Binding 资源不会汇总到管理项目,因此安全管理员可以通过以下任一方式在管理项目中强制执行集中注册:
已注册资源的访问权限控制
Agent Registry 角色用于控制谁可以管理和发现注册表本身中的资源。如需控制谁可以查看或更新独立技能,而无需授予项目级访问权限,请在 Skill 资源上配置资源级 IAM 政策,或在项目级绑定上使用 IAM 条件 。如需了解相关说明,请参阅管理对技能的访问权限 。
Agent Registry 角色不授予调用代理运行时端点的权限。当编排器智能体或客户端调用已发现的 Agent2Agent (A2A) 智能体、MCP 服务器或端点时,系统会在目标服务或网关上进行授权。
调用 A2A 智能体的权限
向调用用户、服务账号或智能体主体 (principal:// 或 principalSet://)授予调用目标 API、运行时或网关所需的角色:
由 Google Cloud API 公开的内置 Google 代理 :授予公开代理的目标 API 服务所需的 IAM 角色。如需查看按服务列出的预定义角色列表,请参阅 IAM 角色和权限索引 。
托管在 Google Cloud 运行时或网关上的自定义 A2A 智能体 :授予托管智能体的运行时或网关所需的角色,例如:
在Agent Gateway 的 UAP 通用表达式语言 (CEL) 条件中,使用已注册智能体的资源名称 而非其注册表标识符来定位该智能体。如需了解管理角色和政策配置步骤,请参阅创建 IAM UAP 。
拒绝政策和内容安全
将基于身份的拒绝政策与载荷检查控制措施相结合,以管理整个组织中的 A2A 通信: