Edisi yang didukung untuk fitur ini: Gemini Enterprise.
Anda dapat mengonfigurasi project Google Cloud untuk terhubung ke server MCP Google Workspace melalui konektor data dan mengaktifkan Gateway Agen yang bersifat opsional dengan Titik Keputusan Kebijakan (PDP) Workspace agar memiliki tata kelola Workspace.
Menyiapkan Gateway Agen dengan PDP Workspace memungkinkan agen AI (seperti agen Gemini Enterprise) mengakses data aplikasi Workspace (seperti Google Drive) sekaligus menerapkan kebijakan kontrol akses yang dikonfigurasi langsung di konsol Admin Google.
Prasyarat
Sebelum menyiapkan Agent Gateway, Anda memerlukan:
- Project Google Cloud dengan Gemini Enterprise.
- CLI
gcloudyang diautentikasi dengan izin untuk mengaktifkan API dan mengelola resource Network Services, Network Security, dan Service Extensions di project Google Cloud Anda. - Hak istimewa administrator Google Workspace (Hak istimewa administrator keamanan).
- Meninjau cara menyiapkan Agent Gateway di Google Cloud.
Langkah 1: Buat atau pilih project Google Cloud
- Di Konsol Google Cloud, buat project Google Cloud baru atau pilih project yang sudah ada untuk penyiapan ini, dan catat project ID Anda (misalnya,
my-project-id).
Langkah 2: Aktifkan Network & Security API yang diperlukan
Aktifkan Network Services API dan Network Security API di project Google Cloud Anda menggunakan gcloud atau Konsol Cloud:
gcloud services enable networkservices.googleapis.com \
networksecurity.googleapis.com \
--project=PROJECT_ID
Ganti PROJECT_ID dengan project ID Google Cloud Anda.
Langkah 3: Aktifkan Agent Registry API dan MCP
- Di Konsol Google Cloud, buka APIs & Services
Library.
- Telusuri dan aktifkan Agent Registry API (
agentregistry.googleapis.com). - Aktifkan MCP Google Drive atau server MCP lain yang diperlukan untuk alur kerja Anda. Untuk mengetahui detailnya, buka Mendaftarkan server MCP.
Penting: Saat mengaktifkan server MCP dengan Agent Gateway keikutsertaan, Gemini Enterprise hanya merutekan traffic ke gateway untuk konektor data pihak pertama (1P) dan pihak ketiga (3P) standar. Mengonfigurasi konektor data kustom tidak didukung dengan tata kelola data Workspace.
Langkah 4: Buat dan impor resource otorisasi dan Agent Gateway
Konfigurasi resource Agent Gateway, Ekstensi Otorisasi (Workspace Policy Decision Point), dan Kebijakan Otorisasi. Anda dapat menentukan resource ini secara deklaratif menggunakan file konfigurasi YAML dan mengimpornya menggunakan gcloud:
Buat file konfigurasi Agent Gateway (agent-gateway.yaml):
name: AGENT_GATEWAY_NAME protocols: - MCP googleManaged: governedAccessPath: AGENT_TO_ANYWHERE registries: - //agentregistry.googleapis.com/projects/PROJECT_ID/locations/globalGanti
AGENT_GATEWAY_NAMEdengan nama untuk resource Agent Gateway Anda (sepertige-agent-gateway) danPROJECT_IDdengan project ID Google Cloud Anda.Buat file konfigurasi Ekstensi Otorisasi yang mengarah ke Titik Keputusan Kebijakan Workspace (ws-pdp-authz-extension.yaml):
name: AUTHZ_EXT_NAME service: workspacepolicyengine.pa.googleapis.com failOpen: true timeout: 5sGanti
AUTHZ_EXT_NAMEdengan nama untuk ekstensi otorisasi (sepertiws-pdp-authz-ext).Buat file konfigurasi Kebijakan Otorisasi (ws-pdp-authz-policy.yaml) untuk mengaitkan ekstensi dengan gateway Anda:
name: AUTHZ_POLICY_NAME target: resources: - "projects/PROJECT_ID/locations/LOCATION/agentGateways/AGENT_GATEWAY_NAME" policyProfile: CONTENT_AUTHZ action: CUSTOM customProvider: authzExtension: resources: - "projects/PROJECT_ID/locations/LOCATION/authzExtensions/AUTHZ_EXT_NAME"Ganti kode berikut:
AUTHZ_POLICY_NAME: Nama untuk kebijakan otorisasi (sepertiws-pdp-authz-policy).PROJECT_ID: Project ID Google Cloud Anda.LOCATION: Region untuk deployment Anda (misalnya,us-central1).AGENT_GATEWAY_NAME: Nama Agent Gateway dari langkah 1.AUTHZ_EXT_NAME: Nama ekstensi otorisasi dari langkah 2.
Impor file konfigurasi YAML menggunakan
gcloud:# Import the Agent Gateway gcloud beta network-services agent-gateways import AGENT_GATEWAY_NAME \ --source=agent-gateway.yaml \ --location=LOCATION \ --project=PROJECT_ID # Import the Authorization Extension gcloud beta service-extensions authz-extensions import AUTHZ_EXT_NAME \ --source=ws-pdp-authz-extension.yaml \ --location=LOCATION \ --project=PROJECT_ID # Import the Authorization Policy gcloud beta network-security authz-policies import AUTHZ_POLICY_NAME \ --source=ws-pdp-authz-policy.yaml \ --location=LOCATION \ --project=PROJECT_ID
Langkah 5: Verifikasi penyiapan Agent Gateway & dapatkan nama resource
Buat daftar Gateway Agen yang di-deploy untuk memverifikasi keberhasilan impor:
gcloud beta network-services agent-gateways list --location=LOCATION --project=PROJECT_IDMendeskripsikan resource Agent Gateway:
gcloud beta network-services agent-gateways describe AGENT_GATEWAY_NAME --location=LOCATION --project=PROJECT_IDSalin nama resource Agent Gateway lengkap (diformat sebagai
projects/PROJECT_ID/locations/LOCATION/agentGateways/AGENT_GATEWAY_NAME, misalnya,projects/my-project/locations/us-central1/agentGateways/ge-agent-gateway).
Langkah 6: Hubungkan ke Penyedia Identitas Google
- Di Konsol Mesin Gen App Builder, buka Setelan
Autentikasi.
- Hubungkan mesin Anda ke Penyedia Identitas Google.
- Untuk dokumentasi tambahan, buka Kontrol Akses Sumber Data Google Cloud.
Langkah 7: Konfigurasi Agent Gateway di instance Gemini Enterprise
- Di Instance Gemini Enterprise (GE), buka Connected data stores.
- Di bagian MCP servers, pilih Configure Agent Gateway.
- Masukkan nama resource Agent Gateway lengkap yang diperoleh di Langkah 5 (misalnya,
projects/PROJECT_ID/locations/us-central1/agentGateways/ge-agent-gateway).
Langkah 8: Konfigurasi Kontrol Akses Agen Workspace di konsol Google Admin
Setelah menyiapkan Agent Gateway dan Workspace Policy Decision Point, Anda dapat mengelola kebijakan akses agen langsung dari konsol Google Admin:
- Di konsol Google Admin, buka Menu
Agen.
- Di tab Setelan, konfigurasi kebijakan akses default untuk semua agen Gemini Enterprise. Untuk mengetahui detailnya, buka Mengontrol akses ke agen Gemini Enterprise.
- Di tab Pengelolaan agen, tambahkan agen tertentu ke daftar pengelolaan Anda untuk mengonfigurasi izin akses individual (Tepercaya atau Diblokir). Untuk mengetahui detailnya, buka Mengelola agen Gemini Enterprise untuk pengguna Workspace.