Agent Gateway multi-agent security
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Critical Enforcement Rules & Rationale
- Gcloud Release Tracks: Always use the exact release tracks specified in
the commands (e.g.,
gcloud beta network-services agent-gateways). Omitting
these prefixes causes commands to fail because Agent Gateway features are
located in specialized, non-default namespaces.
- API Enablement: Include
modelarmor.googleapis.com in the API
enablement list when setting up guardrails. Excluding it prevents Model
Armor policies and filters from successfully attaching to the Gateway.
- Egress Verification: Egress policy verification requires using the
Python script
(scripts/verify_egress_policies.py),
not
curl. Egress gateways rely on runtime SDK lifecycle handling and JWT
context that a standard curl command cannot simulate correctly.
- Model Armor Keys: In
model-armor-config.yaml, always include both
piAndJailbreakFilterSettings and sdpFilterSettings (filterEnforcement: ENFORCE). Invalid or missing filters cause deployment validation failures
or lead to silent bypasses of the guardrails.
- Subnet Private Access: Any subnet hosting a Private Service Connect
network attachment for Egress Gateways must have
private_ip_google_access = true enabled in Terraform. Disabling this blocks connectivity to
Google-managed endpoints, causing total routing failures for agents.
- Direct Delivery: Immediately provide the requested architecture,
configuration files, CLI commands, scripts, and diagrams in full. Do not
stop at a planning phase, do not generate a plan artifact, and do not ask
for user confirmation before delivering outputs.
- No Infrastructure Execution: Do not attempt to run deployment or
verification commands (such as
gcloud, kubectl, terraform, or curl)
against real cloud resources during design. You are generating plan
configurations, not executing them.
[!IMPORTANT] Just-In-Time (JIT) Resource Loading Protocol: Inspect
template files in assets/ and executable scripts in
scripts/ using view_file as needed for extended configurations,
deployment scripts, and test suites.
Quick Reference: Required Filenames
Always generate files with these exact names when requested:
agw-ingress-config.yaml
(assets/agw-ingress-config.yaml)
agw-egress-config.yaml
(assets/agw-egress-config.yaml)
agw-authz-extension.yaml
(assets/agw-authz-extension.yaml)
agw-authz-policy.yaml
(assets/agw-authz-policy.yaml)
model-armor-config.yaml
(assets/model-armor-config.yaml)
sgp-policy.yaml (assets/sgp-policy.yaml)
iap-policy.json (assets/iap-policy.json)
model-armor-payload.json
(assets/model-armor-payload.json)
1. Dual Ingress & Egress Architecture Design (dual_ingress_egress_architecture_design)
Ingress Pattern: CLIENT_TO_AGENT fronted by Ingress Control Plane
(Agent Gateway, Model Armor).
Egress Pattern: AGENT_TO_ANYWHERE utilizing Egress Control Plane
(Agent Gateway, roles/iap.egressor CEL policies, Cloud DNS) and Egress
Data Plane (PSC Interface, Cloud Run, PSC Google APIs Global Endpoint),
coordinated via Agent Registry & Agent Engine runtime.
Mermaid Diagram:
graph TD
Client["External Clients"] -->|HTTPS / MCP| GLB["Global Load Balancer"]
GLB --> Ingress["Ingress Agent Gateway (CLIENT_TO_AGENT)"]
Ingress --> MA["Model Armor (CONTENT_AUTHZ)"]
MA --> Agent["Agent Engine Agents (BillingAgent, SupportAgent, FraudAgent)"]
Agent --> Egress["Egress Agent Gateway (AGENT_TO_ANYWHERE)"]
Egress --> PSC["Private Service Connect Network Attachment"]
PSC --> Tools["Private MCP Tool Backends"]
2. Ingress & Egress Guardrail Policy Config (ingress_and_egress_guardrail_policy_config)
When requested for Ingress & Egress guardrail policy configs, you MUST generate
and create all required files in the workspace:
agw-ingress-config.yaml
(assets/agw-ingress-config.yaml): Declares
governedAccessPath: CLIENT_TO_AGENT with protocols HTTP and MCP.
agw-egress-config.yaml
(assets/agw-egress-config.yaml): Declares
governedAccessPath: AGENT_TO_ANYWHERE with protocol MCP.
agw-authz-extension.yaml
(assets/agw-authz-extension.yaml):
Configures AuthzExtension service for IAP authorization.
agw-authz-policy.yaml
(assets/agw-authz-policy.yaml): Configures
AuthzPolicy action ALLOW targeting both Ingress and Egress gateways.
iap-policy.json (assets/iap-policy.json): Binds
roles/iap.egressor with CEL condition checking
iap.googleapis.com/mcp.toolName == 'get_account_balance' && iap.googleapis.com/mcp.tool.isReadOnly == true.
model-armor-config.yaml
(assets/model-armor-config.yaml): Enables
piAndJailbreakFilterSettings and sdpFilterSettings with
filterEnforcement: ENFORCE.
sgp-policy.yaml (assets/sgp-policy.yaml):
Implements Natural Language Constraints blocking transactions > $1000 and
sanitizing PII.
3. Ingress & Egress Infrastructure Deployment (ingress_and_egress_infrastructure_deployment)
Inspect and provide the step-by-step gcloud CLI commands from
scripts/deploy_infrastructure.sh:
- Enable Required APIs:
compute, networkservices, networksecurity,
modelarmor, iap, agentregistry, serviceextensions, and aiplatform.
- Import Agent Gateways: Ingress (
agw-ingress-config.yaml) and Egress
(agw-egress-config.yaml) via gcloud alpha network-services agent-gateways import.
- Import Authz Extension:
agw-authz-extension.yaml via gcloud beta service-extensions authz-extensions import.
- Import Authz Policy:
agw-authz-policy.yaml via gcloud beta network-security authz-policies import.
4. Ingress & Egress Security Validation (ingress_and_egress_security_validation)
When validating security for Ingress and Egress:
- Ingress 403 Unauthenticated Test: Provide the copy-pasteable
verification curl command from
scripts/validate_ingress_unauth.sh
sending an unauthenticated POST request to the Reasoning Engine endpoint
expecting HTTP 403 Forbidden.
- Python Egress Verification Script (MUST use Python script snippet, NOT
curl): Provide the Python verification script snippet from
scripts/verify_egress_policies.py
sending JSON-RPC
tools/call requests (get_account_balance) through the
Egress Gateway to verify HTTP 200 for allowed tools.
- Model Armor Test Payload: Generate
model-armor-payload.json
(assets/model-armor-payload.json)
containing prompt injection/jailbreak instructions.
5. Troubleshooting Ingress & Egress Failures (troubleshooting_ingress_and_egress_failures)
6. Hybrid VPN Connectivity & Egress Routing (hybrid_vpn_connectivity_egress_routing)
- Terraform HCL: Refer to baseline Terraform config in
assets/main.tf for VPC, subnets
(
private_ip_google_access = true), PSC network attachment, Cloud DNS
private forwarding for aws.internal., and HA VPN gateway/router.
- Egress Gateway Config (
agw-egress-config.yaml): Generate configuration
declaring governedAccessPath: AGENT_TO_ANYWHERE, pointing to the PSC
network attachment, and referencing aws.internal. in dnsPeeringConfig
(see assets/agw-egress-config.yaml).
- Python SDK Deployment Script: Refer to
scripts/hybrid_vpn_agent.py for the complete
script initializing Vertex AI with
agent_to_anywhere_config referencing
the Egress Gateway, enabling telemetry, and deploying HybridAgent using
types.IdentityType.AGENT_IDENTITY.
7. Private Egress GKE Internal Load Balancer (private_egress_gke_internal_load_balancer)
- Expose GKE internal MCP tool server via an Internal Load Balancer (ILB) at
literal IP
10.0.1.50, connecting via Agent Gateway PSC Interface + Cloud
DNS Private zone.
- Cloud DNS Record Mapping: Provide the command from
scripts/create_gke_dns_record.sh mapping
the private domain to GKE's private ILB IP
10.0.1.50.
- Explicit TLS Warning: Agent Gateway egress does not natively trust
self-signed certificates or private enterprise CAs. You must use
publicly trusted TLS certificates signed by a trusted Certificate Authority
(e.g., Let's Encrypt).
8. Governance Controls Model Armor SGP (governance_controls_model_armor_sgp)
When configuring dual safety layers with Model Armor on Ingress and SGP on
Egress:
- Model Armor Config: Generate
model-armor-config.yaml
(assets/model-armor-config.yaml) with
piAndJailbreakFilterSettings and sdpFilterSettings (filterEnforcement: ENFORCE).
- Semantic Governance Policy: Generate
sgp-policy.yaml
(assets/sgp-policy.yaml) with Natural Language
Constraints blocking transactions > $1000 and sanitizing PII.
- Curl PATCH Command: Provide the curl command from
scripts/enforce_sgp_patch.sh to update
authzExtensions with sgpEnforcementMode set to ENFORCE.
9. Multi-Agent Cloud Run Egress Routing (multi_agent_cloud_run_egress_routing)
Do NOT produce a plan artifact or stop at planning. When configuring multi-agent
Cloud Run egress routing, you MUST directly provide and generate ALL required
components:
- Egress Gateway Config (
agw-egress-config-run.yaml): Generate
configuration declaring governedAccessPath: AGENT_TO_ANYWHERE, PSC network
attachment, and DNS peering for *.run.app (see
assets/agw-egress-config-run.yaml).
- Register Cloud Run Services in Agent Registry: Provide the registration
commands from
scripts/register_cloud_run_services.sh
registering all 3 Cloud Run services (
marketing-tool-service,
sales-tool-service, support-tool-service) in the us-east4 Agent
Registry.
iap-policy.json (Multi-Agent): Generate iap-policy.json
(assets/iap-policy-multi-agent.json)
containing all 3 principal:// bindings in the members list under
roles/iap.egressor.
- Python SDK Deployment Script: Refer to
scripts/multi_agent_cloud_run.py for the
complete GenAI SDK deployment script.
10. Advanced Model Armor Filtering (advanced_model_armor_filtering)
For custom keyword matching, configure userDefinedFilterSettings (see
assets/model-armor-advanced.yaml).
11. Known Traps & Gotchas (known_traps_and_gotchas)
network_attachment is ForceNew: Enabling Semantic Governance
Policies (SGP) or modifying network attachments after the initial Terraform
apply will force-recreate the gateway resource. If not managed carefully,
this can cause dependency deadlocks during destroy operations. Plan
infrastructure sequencing accordingly.
- Authz Policy Limit: An Agent Gateway allows at most 4 custom
authorization policies attached concurrently. Ensure your security posture
consolidates rules within this limit.
1---2description: Designs, deploys, and secures Google Cloud Agent Gateway solutions. Use when the user needs to configure multi-agent security, ingress (CLIENT_TO_AGENT), or egress (AGENT_TO_ANYWHERE) patterns involving Model Armor, IAP, and Agent Registry. Don't use for general Cloud Load Balancing or basic VPC setup not related to Agent Gateways.3metadata:4 source: https://skillmd.com/skills/h3y6e/google-cloud-solution-multi-agent-security5 category: MultiProductSolutions6 github-path: skills/cloud/google-cloud-solution-multi-agent-security7 github-ref: refs/heads/main8 github-repo: https://github.com/google/skills9 github-tree-sha: 378ec0f39c6508a2cce42e15c04333e617d5645b10 version: 1.0.111name: google-cloud-solution-multi-agent-security12---1314# Agent Gateway multi-agent security1516## Attribution1718**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you19MUST read and follow the instructions in20[Usage Attribution](references/attribution.md).2122## Critical Enforcement Rules & Rationale2324* **Gcloud Release Tracks**: Always use the exact release tracks specified in25 the commands (e.g., `gcloud beta network-services agent-gateways`). Omitting26 these prefixes causes commands to fail because Agent Gateway features are27 located in specialized, non-default namespaces.28* **API Enablement**: Include `modelarmor.googleapis.com` in the API29 enablement list when setting up guardrails. Excluding it prevents Model30 Armor policies and filters from successfully attaching to the Gateway.31* **Egress Verification**: Egress policy verification requires using the32 Python script33 ([scripts/verify_egress_policies.py](scripts/verify_egress_policies.py)),34 not `curl`. Egress gateways rely on runtime SDK lifecycle handling and JWT35 context that a standard curl command cannot simulate correctly.36* **Model Armor Keys**: In `model-armor-config.yaml`, always include both37 `piAndJailbreakFilterSettings` and `sdpFilterSettings` (`filterEnforcement:38 ENFORCE`). Invalid or missing filters cause deployment validation failures39 or lead to silent bypasses of the guardrails.40* **Subnet Private Access**: Any subnet hosting a Private Service Connect41 network attachment for Egress Gateways must have `private_ip_google_access =42 true` enabled in Terraform. Disabling this blocks connectivity to43 Google-managed endpoints, causing total routing failures for agents.44* **Direct Delivery**: Immediately provide the requested architecture,45 configuration files, CLI commands, scripts, and diagrams in full. Do not46 stop at a planning phase, do not generate a plan artifact, and do not ask47 for user confirmation before delivering outputs.48* **No Infrastructure Execution**: Do not attempt to run deployment or49 verification commands (such as `gcloud`, `kubectl`, `terraform`, or `curl`)50 against real cloud resources during design. You are generating plan51 configurations, not executing them.5253> [!IMPORTANT] **Just-In-Time (JIT) Resource Loading Protocol:** Inspect54> template files in [assets/](assets/) and executable scripts in55> [scripts/](scripts/) using `view_file` as needed for extended configurations,56> deployment scripts, and test suites.5758--------------------------------------------------------------------------------5960## Quick Reference: Required Filenames6162Always generate files with these exact names when requested:63641. `agw-ingress-config.yaml`65 ([assets/agw-ingress-config.yaml](assets/agw-ingress-config.yaml))662. `agw-egress-config.yaml`67 ([assets/agw-egress-config.yaml](assets/agw-egress-config.yaml))683. `agw-authz-extension.yaml`69 ([assets/agw-authz-extension.yaml](assets/agw-authz-extension.yaml))704. `agw-authz-policy.yaml`71 ([assets/agw-authz-policy.yaml](assets/agw-authz-policy.yaml))725. `model-armor-config.yaml`73 ([assets/model-armor-config.yaml](assets/model-armor-config.yaml))746. `sgp-policy.yaml` ([assets/sgp-policy.yaml](assets/sgp-policy.yaml))757. `iap-policy.json` ([assets/iap-policy.json](assets/iap-policy.json))768. `model-armor-payload.json`77 ([assets/model-armor-payload.json](assets/model-armor-payload.json))7879--------------------------------------------------------------------------------8081## 1. Dual Ingress & Egress Architecture Design (`dual_ingress_egress_architecture_design`)8283- **Ingress Pattern**: `CLIENT_TO_AGENT` fronted by Ingress Control Plane84 (Agent Gateway, Model Armor).85- **Egress Pattern**: `AGENT_TO_ANYWHERE` utilizing Egress Control Plane86 (Agent Gateway, `roles/iap.egressor` CEL policies, Cloud DNS) and Egress87 Data Plane (PSC Interface, Cloud Run, PSC Google APIs Global Endpoint),88 coordinated via Agent Registry & Agent Engine runtime.89- **Mermaid Diagram**:9091 ```mermaid92 graph TD93 Client["External Clients"] -->|HTTPS / MCP| GLB["Global Load Balancer"]94 GLB --> Ingress["Ingress Agent Gateway (CLIENT_TO_AGENT)"]95 Ingress --> MA["Model Armor (CONTENT_AUTHZ)"]96 MA --> Agent["Agent Engine Agents (BillingAgent, SupportAgent, FraudAgent)"]97 Agent --> Egress["Egress Agent Gateway (AGENT_TO_ANYWHERE)"]98 Egress --> PSC["Private Service Connect Network Attachment"]99 PSC --> Tools["Private MCP Tool Backends"]100 ```101102--------------------------------------------------------------------------------103104## 2. Ingress & Egress Guardrail Policy Config (`ingress_and_egress_guardrail_policy_config`)105106When requested for Ingress & Egress guardrail policy configs, you MUST generate107and create all required files in the workspace:108109- `agw-ingress-config.yaml`110 ([assets/agw-ingress-config.yaml](assets/agw-ingress-config.yaml)): Declares111 `governedAccessPath: CLIENT_TO_AGENT` with protocols `HTTP` and `MCP`.112- `agw-egress-config.yaml`113 ([assets/agw-egress-config.yaml](assets/agw-egress-config.yaml)): Declares114 `governedAccessPath: AGENT_TO_ANYWHERE` with protocol `MCP`.115- `agw-authz-extension.yaml`116 ([assets/agw-authz-extension.yaml](assets/agw-authz-extension.yaml)):117 Configures AuthzExtension service for IAP authorization.118- `agw-authz-policy.yaml`119 ([assets/agw-authz-policy.yaml](assets/agw-authz-policy.yaml)): Configures120 `AuthzPolicy` action `ALLOW` targeting both Ingress and Egress gateways.121- `iap-policy.json` ([assets/iap-policy.json](assets/iap-policy.json)): Binds122 `roles/iap.egressor` with CEL condition checking123 `iap.googleapis.com/mcp.toolName == 'get_account_balance' &&124 iap.googleapis.com/mcp.tool.isReadOnly == true`.125- `model-armor-config.yaml`126 ([assets/model-armor-config.yaml](assets/model-armor-config.yaml)): Enables127 `piAndJailbreakFilterSettings` and `sdpFilterSettings` with128 `filterEnforcement: ENFORCE`.129- `sgp-policy.yaml` ([assets/sgp-policy.yaml](assets/sgp-policy.yaml)):130 Implements Natural Language Constraints blocking transactions > $1000 and131 sanitizing PII.132133--------------------------------------------------------------------------------134135## 3. Ingress & Egress Infrastructure Deployment (`ingress_and_egress_infrastructure_deployment`)136137Inspect and provide the step-by-step `gcloud` CLI commands from138[scripts/deploy_infrastructure.sh](scripts/deploy_infrastructure.sh):1391401. **Enable Required APIs**: `compute`, `networkservices`, `networksecurity`,141 `modelarmor`, `iap`, `agentregistry`, `serviceextensions`, and `aiplatform`.1422. **Import Agent Gateways**: Ingress (`agw-ingress-config.yaml`) and Egress143 (`agw-egress-config.yaml`) via `gcloud alpha network-services agent-gateways144 import`.1453. **Import Authz Extension**: `agw-authz-extension.yaml` via `gcloud beta146 service-extensions authz-extensions import`.1474. **Import Authz Policy**: `agw-authz-policy.yaml` via `gcloud beta148 network-security authz-policies import`.149150--------------------------------------------------------------------------------151152## 4. Ingress & Egress Security Validation (`ingress_and_egress_security_validation`)153154When validating security for Ingress and Egress:1551561. **Ingress 403 Unauthenticated Test**: Provide the copy-pasteable157 verification curl command from158 [scripts/validate_ingress_unauth.sh](scripts/validate_ingress_unauth.sh)159 sending an unauthenticated POST request to the Reasoning Engine endpoint160 expecting HTTP 403 Forbidden.1612. **Python Egress Verification Script (MUST use Python script snippet, NOT162 curl)**: Provide the Python verification script snippet from163 [scripts/verify_egress_policies.py](scripts/verify_egress_policies.py)164 sending JSON-RPC `tools/call` requests (`get_account_balance`) through the165 Egress Gateway to verify HTTP 200 for allowed tools.1663. **Model Armor Test Payload**: Generate `model-armor-payload.json`167 ([assets/model-armor-payload.json](assets/model-armor-payload.json))168 containing prompt injection/jailbreak instructions.169170--------------------------------------------------------------------------------171172## 5. Troubleshooting Ingress & Egress Failures (`troubleshooting_ingress_and_egress_failures`)173174- **Ingress 403 (Client-to-Agent)**:175176 - **Root Cause**: Unauthenticated client requests or missing/invalid OAuth177 2.0 / IAP identity tokens.178 - **OAuth Configuration Steps**:179 1. Configure OAuth 2.0 Client ID credentials in Google Cloud Console.180 2. Grant the client identity / service account181 `roles/iap.httpsResourceAccessor` permission.182 3. Exchange credentials with Google OAuth to acquire an OIDC / OAuth ID183 token.184 4. Pass the token in the `Authorization: Bearer <TOKEN>` header.185 - **Verification Command**: Provide the curl command from186 [scripts/verify_ingress_auth.sh](scripts/verify_ingress_auth.sh).187188- **Egress 403 (Agent-to-Anywhere)**:189190 - **Root Cause**: Missing `roles/iap.egressor` IAM bindings on the Agent191 Identity, malformed principal ID, or mismatched CEL condition on tool192 metadata.193 - **Fix Command**: Provide the exact `gcloud` command from194 [scripts/fix_egress_iap.sh](scripts/fix_egress_iap.sh).195196--------------------------------------------------------------------------------197198## 6. Hybrid VPN Connectivity & Egress Routing (`hybrid_vpn_connectivity_egress_routing`)199200- **Terraform HCL**: Refer to baseline Terraform config in201 [assets/main.tf](assets/main.tf) for VPC, subnets202 (`private_ip_google_access = true`), PSC network attachment, Cloud DNS203 private forwarding for `aws.internal.`, and HA VPN gateway/router.204- **Egress Gateway Config (`agw-egress-config.yaml`)**: Generate configuration205 declaring `governedAccessPath: AGENT_TO_ANYWHERE`, pointing to the PSC206 network attachment, and referencing `aws.internal.` in `dnsPeeringConfig`207 (see [assets/agw-egress-config.yaml](assets/agw-egress-config.yaml)).208- **Python SDK Deployment Script**: Refer to209 [scripts/hybrid_vpn_agent.py](scripts/hybrid_vpn_agent.py) for the complete210 script initializing Vertex AI with `agent_to_anywhere_config` referencing211 the Egress Gateway, enabling telemetry, and deploying `HybridAgent` using212 `types.IdentityType.AGENT_IDENTITY`.213214--------------------------------------------------------------------------------215216## 7. Private Egress GKE Internal Load Balancer (`private_egress_gke_internal_load_balancer`)217218- Expose GKE internal MCP tool server via an Internal Load Balancer (ILB) at219 literal IP `10.0.1.50`, connecting via Agent Gateway PSC Interface + Cloud220 DNS Private zone.221- **Cloud DNS Record Mapping**: Provide the command from222 [scripts/create_gke_dns_record.sh](scripts/create_gke_dns_record.sh) mapping223 the private domain to GKE's private ILB IP `10.0.1.50`.224- **Explicit TLS Warning**: Agent Gateway egress **does not natively trust225 self-signed certificates or private enterprise CAs**. You **must** use226 publicly trusted TLS certificates signed by a trusted Certificate Authority227 (e.g., Let's Encrypt).228229--------------------------------------------------------------------------------230231## 8. Governance Controls Model Armor SGP (`governance_controls_model_armor_sgp`)232233When configuring dual safety layers with Model Armor on Ingress and SGP on234Egress:2352361. **Model Armor Config**: Generate `model-armor-config.yaml`237 ([assets/model-armor-config.yaml](assets/model-armor-config.yaml)) with238 `piAndJailbreakFilterSettings` and `sdpFilterSettings` (`filterEnforcement:239 ENFORCE`).2402. **Semantic Governance Policy**: Generate `sgp-policy.yaml`241 ([assets/sgp-policy.yaml](assets/sgp-policy.yaml)) with Natural Language242 Constraints blocking transactions > $1000 and sanitizing PII.2433. **Curl PATCH Command**: Provide the curl command from244 [scripts/enforce_sgp_patch.sh](scripts/enforce_sgp_patch.sh) to update245 `authzExtensions` with `sgpEnforcementMode` set to `ENFORCE`.246247--------------------------------------------------------------------------------248249## 9. Multi-Agent Cloud Run Egress Routing (`multi_agent_cloud_run_egress_routing`)250251Do NOT produce a plan artifact or stop at planning. When configuring multi-agent252Cloud Run egress routing, you MUST directly provide and generate ALL required253components:2542551. **Egress Gateway Config (`agw-egress-config-run.yaml`)**: Generate256 configuration declaring `governedAccessPath: AGENT_TO_ANYWHERE`, PSC network257 attachment, and DNS peering for `*.run.app` (see258 [assets/agw-egress-config-run.yaml](assets/agw-egress-config-run.yaml)).2592. **Register Cloud Run Services in Agent Registry**: Provide the registration260 commands from261 [scripts/register_cloud_run_services.sh](scripts/register_cloud_run_services.sh)262 registering all 3 Cloud Run services (`marketing-tool-service`,263 `sales-tool-service`, `support-tool-service`) in the `us-east4` Agent264 Registry.2653. **`iap-policy.json` (Multi-Agent)**: Generate `iap-policy.json`266 ([assets/iap-policy-multi-agent.json](assets/iap-policy-multi-agent.json))267 containing all 3 `principal://` bindings in the `members` list under268 `roles/iap.egressor`.2694. **Python SDK Deployment Script**: Refer to270 [scripts/multi_agent_cloud_run.py](scripts/multi_agent_cloud_run.py) for the271 complete GenAI SDK deployment script.272273--------------------------------------------------------------------------------274275## 10. Advanced Model Armor Filtering (`advanced_model_armor_filtering`)276277For custom keyword matching, configure `userDefinedFilterSettings` (see278[assets/model-armor-advanced.yaml](assets/model-armor-advanced.yaml)).279280--------------------------------------------------------------------------------281282## 11. Known Traps & Gotchas (`known_traps_and_gotchas`)283284* **`network_attachment` is `ForceNew`**: Enabling Semantic Governance285 Policies (SGP) or modifying network attachments after the initial Terraform286 apply will force-recreate the gateway resource. If not managed carefully,287 this can cause dependency deadlocks during destroy operations. Plan288 infrastructure sequencing accordingly.289* **Authz Policy Limit**: An Agent Gateway allows at most **4 custom290 authorization policies** attached concurrently. Ensure your security posture291 consolidates rules within this limit.