VPC Service Controls 可帮助您降低 CX Agent Studio 中发生数据渗漏的风险。您可以使用 VPC Service Controls 创建服务边界来保护您指定的资源和数据。例如,当您使用 VPC Service Controls 保护 CX Agent Studio 时,以下工件无法离开服务边界:
- 代理应用数据
- runSession 请求和响应
CX Agent Studio 允许与其他Google Cloud 资源(例如 DLP 隐去模板、用于对话导出的 BigQuery 和数据存储区)进行交互。这些资源由您控制,并且必须与代理应用位于同一 VPC-SC 边界内。
限制
存在以下限制:
- 启用 VPC Service Controls 后,工具和回调无法向任意 HTTP 或 HTTPS 端点发送请求,因为这可能会导致数据渗漏到 VPC Service Controls 边界之外。如需允许出站请求,您必须为私有 VPC 目标配置 Service Directory 以实现私有网络访问,或在项目位置设置中将外部网域添加到允许的来源。
- 无法将录音写入边界外的 Cloud Storage 存储桶。
- 无法将对话写入边界之外的 BigQuery 数据集。
- 边界外的 Sensitive Data Protection 隐去模板会导致隐去对话内容失败。
- OpenAPI 工具无法使用边界外的 Secret 引用身份验证密钥。
- 指定边界外 Datastore 的 Datastore 工具无法执行。
- 如果基于流程的智能体指定了边界外的智能体资源,则在调用时会失败。
- 尝试从边界外的 Cloud Storage 存储桶导入智能体应用失败。
- 尝试将代理应用导出到边界外的 Cloud Storage 存储桶会失败。
服务边界创建
创建服务边界时,请将 CX Agent Studio (ces.googleapis.com) 和 CX Insights (contactcenterinsights.googleapis.com) 添加为受保护的服务。在受限的服务窗格下,添加您要限制的所有服务(例如 storage.googleapis.com、bigquery.googleapis.com)。
如需详细了解如何创建服务边界,请参阅 VPC Service Controls 文档中的创建服务边界。
有关可选依赖项的 VPC Service Controls 文档:
使用“允许的来源”允许外部端点
启用 VPC Service Controls 后,如果不使用 Service Directory,调用外部 HTTP 或 HTTPS 网址的工具和回调会被屏蔽,并显示 403 错误,除非您将每个外部来源(包括任何外部 OAuth 令牌端点)添加到项目和位置的允许的来源中。
如需查看和更新允许的来源,请授予 Gemini Enterprise for Customer Experience Security Settings Editor 预定义 Identity and Access Management 角色 (roles/ces.securitySettingsEditor),或具有 ces.securitySettings.get 和 ces.securitySettings.update(也包含在 roles/ces.admin 中)的自定义角色。输入确切的来源,包括架构、网域和可选端口(例如 https://api.example.com 或 https://api.example.com:8443),不含网址路径、尾部斜杠或通配符。
您可以在控制台中或使用 REST API 配置允许的来源:
- 控制台:打开 CX Agent Studio 控制台,选择您的项目和位置,点击设置 图标,在允许的来源下添加每个来源,然后点击保存(请参阅项目位置信息设置)。
- REST API:调用
projects.locations.updateSecuritySettings,以更新项目位置的SecuritySettings资源上的endpointControlPolicy.allowedOrigins。
使用 Service Directory 进行专用网络访问
CX Agent Studio 与 Service Directory 专用网络访问集成,因此可以连接到 VPC 网络内的 OpenAPI 工具目标。这样可以将流量保持在 Google Cloud 网络内,并强制执行 Identity and Access Management 和 VPC Service Controls。
如需设置以专用网络为目标的工具,请执行以下操作:
按照 Service Directory 专用网络配置中的说明来配置 VPC 网络和 Service Directory 端点。
您的智能体项目必须存在具有以下地址的 Customer Engagement Suite Service Agent 服务账号:
service-agent-project-number@gcp-sa-ces.
在 Service Directory 所在的项目中,向 Customer Engagement Suite Service Agent 服务账号授予以下角色:
servicedirectory.viewerservicedirectory.pscAuthorizedService
此外,如果您的 Service Directory 与代理应用位于不同的项目中,您还需要向托管代理应用的项目中的 Customer Engagement Suite Service Agent 账号授予
servicedirectory.viewer角色。创建工具时,请提供 Service Directory 服务以及网址和可选身份验证信息。 此字段位于该工具的高级设置中。
如需排查问题,您可以设置非公开拨测,以检查 Service Directory 是否已正确配置。