Zero Labs
Industry News / AI

Gemini Enterprise A2A Policy Coverage: Test the Gap Before Your Agent Goes Live

Source · Towards AI By Anna Jey

From the publisher’s feed, collected in the ZeroLabs newsroom.

Gemini Enterprise A2A Policy CoverageA practical rollout guide for custom A2A agents: map the request path, put controls where the traffic actually goes, and prove your defenses work.For enterprise AI engineers, platform teams, and security leadersA policy diagram is only as useful as the traffic paths it truly covers.A universal enterprise agent can look governed in a diagram while one registration path quietly bypasses the policy layer. That is the kind of detail that creates a real production incident: not a spectacular model failure, but an assumption that a control is protecting traffic it never sees.Google Cloud’s new Gemini agent is positioned as a work agent with organizational context, tools, skills, memory, and governance. That makes it tempting to begin a rollout with one reassuring question: “Is Agent Gateway enabled?” The better question is sharper: which request paths can never reach Agent Gateway?Google’s Gemini Enterprise documentation answers part of that question directly. When a custom agent is added through the documented A2A registration path, its traffic does not go through Agent Gateway, and Agent Gateway policies do not apply. The same documentation says Model Armor must be configured in the agent application itself for that path. That is not a reason to avoid A2A. It is a reason to treat policy coverage as something you test, not something you infer from a console setting.The subtle gap: a control plane is not a data pathGemini Enterprise can connect people to custom agents, MCP servers, data sources, and business systems. Those pieces do not all have the same routing behavior. A console can show the same agent catalog, identity settings, and governance vocabulary while requests follow different network and authorization paths underneath.For supported agent-to-anywhere egress, Agent Gateway can apply identity checks, Agent Registry checks, authorization policy, Model Armor, semantic governance, and custom authorization. That is powerful. It is also conditional: the request must traverse that gateway path.“Enabled” is a configuration state. “Covered” is a property you demonstrate with a specific request, expected result, and retained evidence.An A2A agent registered into the Gemini Enterprise app may be discoverable and callable from the same employee interface as other capabilities, yet the inbound call from Gemini Enterprise to that agent follows the A2A registration path. Do not assume a policy meant for a custom MCP egress route will protect it. Google’s own registration documentation calls out the exception.This distinction matters most when an agent can read internal data, invoke a downstream API, obtain an OAuth token on a user’s behalf, or take a consequential action. A path that bypasses one control can still be safe, but only if the replacement controls are deliberately installed and tested in the agent and its hosting boundary.Start with a policy-coverage map, not a product checklistBefore registering a real agent, make a one-page coverage map. It should follow a request from the user through Gemini Enterprise to the custom A2A service, then through every downstream tool, API, and data store. The map is not architecture art. It is the input to your test plan.For every arrow, answer five plain-language questions:Who is the caller: an end user, the Gemini Enterprise service identity, the custom agent, or a delegated service?What credential travels with the call: signed service token, OAuth token, workload identity, or no user context at all?What enforcement point sees it: application middleware, IAP, Cloud Run IAM, a WAF, Agent Gateway, or a downstream API policy?What decision is expected: allow, deny, redact, require approval, or fail closed?What evidence proves that decision happened: an application audit event, a Model Armor verdict, a Cloud Audit Log entry, or an API denial?Write the answers next to the arrows. If a row says “Agent Gateway, probably,” the coverage map has already found a problem. A control owner should be able to name the exact component and log record.A useful minimum inventoryKeep the inventory small enough to maintain. Start with the Gemini Enterprise app, the A2A agent card, the hosting service, its runtime service account, each OAuth authorization resource, every downstream tool, and every sensitive data destination. Mark whether each component accepts requests, makes requests, or both.Also record the specific registration method. An A2A agent-card registration, a custom MCP data connector, and an agent running inside a managed runtime are not interchangeable. The deployment method is part of the security contract.Build controls into the custom A2A agentOnce the map reveals the A2A path, move the controls to the place where they can actually act. The design goal is not to recreate every gateway feature inside your application. It is to provide a clear, testable replacement for each control that does not cover this path.For a custom A2A path, make the controls visible at the application boundary.Verify the caller before you trust the requestDo not decide access from an agent name in a JSON card. Verify the credential presented at the hosting boundary. Google documents a signed ID token in the X-Serverless-Authorization header for Cloud Run-hosted agents. Validate issuer, audience, expiry, and the expected service identity. Keep that validation at the edge, before the agent turns input into a tool call.If the agent works on behalf of an employee, separate service identity from end-user authority. A valid request from Gemini Enterprise proves the platform called you; it does not automatically prove the user may read a particular record or approve a particular action. Pass only the necessary user claims, validate them, and have the downstream service enforce its own access checks.Screen both untrusted input and untrusted tool outputModel Armor is useful here, but avoid treating it as a magic shield. Create a prompt-focused template for hostile instructions, jailbreak attempts, and sensitive input. Create a separate response-focused template for data leakage, malicious URLs, and unsafe output. Google recommends separate input and output templates because their risk profiles differ.Then decide what your service does when screening is unavailable. “Keep working” and “stop safely” are product decisions, not defaults. A research helper may be allowed to return a temporary-unavailable message. A payroll, production-change, or data-export agent should usually fail closed. Put that choice in code and make it observable.Authorize the action, not just the conversationAuthentication answers “who sent this?” Authorization answers “may this exact operation happen now?” Your A2A agent should use an action policy close to the tool invocation. That policy can constrain verbs, resource scopes, amounts, environments, and time windows.For a procurement helper, “draft a purchase request” and “submit a purchase order” are different verbs. For a developer assistant, “read a repository” and “merge to production” are different verbs. Give the model a narrow tool surface, then require the tool layer to enforce the rule independently of the model’s explanation.function authorizeAction(request, principal) { const intent = request.action; const resource = request.resource; if (!allowedActions[principal.role]?.includes(intent)) { return deny("action_not_allowed"); } if (!principal.scopes.includes(resource.scope)) { return deny("resource_outside_scope"); } if (intent === "submit_order" && !request.approvalId) { return deny("approval_required"); } return allow();}This is intentionally ordinary code. The important property is that a prompt cannot talk its way around it. The policy lives beside the side effect, so the model, an accidental client change, and a later prompt rewrite all face the same enforcement decision.Turn the map into an executable policy-coverage testNow give every important route a small contract. A good test says who calls, what payload they send, what boundary should reject or allow it, and what evidence the reviewer should find. Run the tests against a non-production agent with representative identities and disposable data.Begin with the happy path. Register an A2A agent, call a read-only task from Gemini Enterprise, and show that the hosting service accepted the expected service identity. Verify that the response contains only data the selected employee may see. This proves the basic route works; it does not prove it is secure.Then add the negative paths that production teams often skip:Forged caller test: send a request without the expected platform credential or with the wrong audience. Expect rejection before agent reasoning starts.Cross-user test: ask for a record available to one test user but not another. Expect the downstream resource check to deny it even though both requests enter through the same agent.Prompt-injection test: place hostile text in a document or tool response. Expect screening and tool-selection rules to stop privileged instructions from being followed.Blocked action test: request a forbidden verb, such as export, delete, or production deploy. Expect a deterministic denial and no downstream side effect.Screening outage test: simulate an unavailable screening service. Expect the documented fail-open or fail-closed behavior, not an accidental one.Audit reconstruction test: hand an on-call engineer an event ID and ask them to reconstruct caller, user, action, decision, and downstream result without reading model prose.The last test is underrated. If your team cannot reconstruct why an action happened, it cannot confidently review or reverse it later. Make structured event fields part of the feature, not a diagnostic patch after a failure.Use a coverage contract without creating paperworkFor each test, store a compact record in version control: route name, threat or failure mode, expected decision, enforcement owner, and evidence location. Keep it as a short YAML or JSON file near the agent source. The point is not to create a compliance artifact. It is to stop future changes from silently moving traffic out from under a control.route: gemini-enterprise-to-expense-a2acase: submit_without_approvalexpected: denycontrol_owner: expense-agent.authorizeActionrequired_evidence: - cloud_run_request_log - application_audit_event - no_downstream_purchase_eventrelease_gate: requiredReview this file whenever the agent card, OAuth scopes, hosting target, tools, or gateway configuration changes. Those are routing changes, not “just configuration.” Let a code owner for the affected boundary approve the change.Keep custom MCP and A2A assumptions separateA common rollout mistake is to test one integration style and assume the result transfers to another. Google’s custom MCP egress guidance shows a route that can be configured through Agent Gateway with Agent Registry and tool-level allow/deny policy. That is valuable, especially when you need to prove a prohibited tool returns a denial.But that evidence belongs to that MCP route. It does not demonstrate that a separately registered A2A agent has the same coverage. Put the two paths in different test suites and label the evidence precisely. “Gateway denied the forbidden MCP tool call” is a strong claim. “All Gemini Enterprise agent traffic is protected by the gateway” is not.Practical rule: write control statements as routes, not product names. Say “MCP egress to the billing tool is checked by Agent Gateway policy X” or “A2A inbound requests to the expense agent are checked by application middleware Y.” Route-specific claims are easier to test and harder to misunderstand.A rollout sequence that avoids a false sense of safetyStart with one low-risk, read-only A2A task and a small employee group. Make the agent’s tool set boring: retrieve a narrow set of documents, summarize them, and cite sources. Do not begin with broad OAuth scopes or write access just because the agent is capable of multi-step work.Next, deploy the application-side boundary checks before registration. Verify platform caller identity at the host. Configure input and output screening. Enforce downstream user authorization. Add action-level approval gates. Emit a structured audit event for every decision. Only then register the agent card and expose it in Gemini Enterprise.Release evidence should show which route was tested, which control decided, and what happened next.During the pilot, measure operational signals rather than pretending one dashboard proves trust. Track denied action attempts, screening failures, authorization mismatches, unknown tool requests, user corrections, and time to reconstruct a run. A rising number of denials might be an attack signal, but it could also mean the agent description invites the wrong requests. Read the evidence before changing the policy.Finally, require a coverage review in every release that changes integration shape. A new tool, a new OAuth scope, a move from Cloud Run to GKE, or a change in A2A protocol compatibility can move a boundary. Re-run only the relevant contract tests, but never waive them because the model prompt is unchanged.What to take awayGemini Enterprise gives teams a powerful surface for bringing custom agents to employee workflows. The opportunity is real. The safety work begins when you stop treating “governed” as a label and start treating it as a path-by-path claim.Map the traffic. Name the enforcement owner for every route. Put missing controls inside the custom agent and its hosting boundary. Test both allowed and denied behavior. Retain proof that a specific control made a specific decision. That is how a platform launch becomes an enterprise system you can actually operate.Sources and implementation notesThis article uses Google Cloud’s current product and implementation documentation. Read the linked registration page before relying on a particular route; enterprise features and release stages change, and the documentation for the exact integration is the source of truth.Google Cloud: Introducing the Gemini agentGoogle Cloud: Register and manage A2A agents in Gemini EnterpriseGoogle Cloud: Agent Gateway overviewGoogle Cloud: Enable Model Armor in Gemini EnterpriseGoogle Cloud Codelab: Gemini Enterprise egress to a private custom MCP serverFrequently asked questionsDoes Agent Gateway protect every Gemini Enterprise A2A agent?No. Google’s A2A registration documentation says traffic to agents added through that method does not go through Agent Gateway and Agent Gateway policies do not apply. Test the exact registration and traffic path you use instead of assuming a global setting carries across every integration.Should we avoid A2A agents in Gemini Enterprise?No. A2A is useful for bringing custom capabilities to Gemini Enterprise. Treat it as an integration with its own security boundary: verify the caller, screen input and output, enforce authorization at the action layer, and retain audit evidence. A clearly owned boundary is better than an assumed boundary.Can Model Armor replace application authorization?No. Screening can help detect malicious input, sensitive data exposure, and unsafe output. It does not decide whether a particular user may export a particular record or submit a particular transaction. Keep authorization in the downstream service and tool layer, then test it with both permitted and prohibited users.What is the first negative test to run for a custom A2A agent?Try a request with a missing, expired, or wrong-audience platform credential. The service should reject it before the agent reasons about the content or reaches a tool. This simple test confirms that the hosting boundary, rather than an instruction in a prompt, owns caller verification.How do we prove that a blocked action had no side effect?Correlate a request ID across the agent audit event, the hosting log, and the downstream system. Your test should show a deny decision and the absence of a create, update, export, or delete event in the target system. Logging only the model response is not enough.Do custom MCP tools and custom A2A agents need the same test suite?They can share test ideas, such as forged identity and blocked-action checks, but they need route-specific suites. Their traffic can traverse different enforcement points, so one passing test cannot prove coverage for the other. Keep common test fixtures, but make the expected evidence path explicit.When should an A2A agent fail closed?Fail closed whenever continuing without a safety or authorization dependency could disclose protected data or create a side effect. For low-risk read-only features, a temporary degraded response may be acceptable. Document the choice per action and test that outage behavior before allowing real users to depend on it.Gemini Enterprise A2A Policy Coverage: Test the Gap Before Your Agent Goes Live was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.