---
title: "Secure A2A Gateway: Agent Card Signing, Auth and Policy · Highflame"
description: "How the Highflame AI Gateway secures A2A traffic: agent cards verified against pinned keys, resource-bound tokens, brokered credentials and message inspection."
doc_version: "0.1.0"
last_updated: "2026-11-22T00:00:00.000Z"
canonical: "https://www.highflame.com/blog/secure-a2a-gateway"
---

[← All articles](/blog.md)

# How Highflame Secures A2A Agent-to-Agent Communication

Nov 22, 2026 7 min read

Sharath Rajasekar CEO & Co-founder

![How Highflame Secures A2A Agent-to-Agent Communication](/blog/secure-a2a-gateway/hero.webp)

In [part one of this series](/blog/a2a-protocol-security-agent-cards.md), we looked at the trust problem hidden in A2A agent cards. Before two agents exchange a message, your client acts on a card the other agent wrote, which tells it where to send requests and how to sign in. The fix is a control point you own, sitting between your clients and the agents they call.

A2A gateways can route traffic, authenticate callers, and enforce access policies. That establishes a controlled path to an agent. But a controlled path doesn’t establish whether the agent’s claims are trustworthy, or whether your own agents should be allowed to act on what they receive. Securing the interaction means verifying what can be trusted, and authorizing what happens, at each step:

-   **Before the first message:** is the agent card verified against a key you trust independently?
-   **On the way in:** what message content is inspected before the agent acts on it?
-   **After the reply:** how does authorization apply when your agents act on what another agent told them?

This post shows how the Highflame AI Gateway answers each of them.

## **The security controls at a glance**

You register an A2A agent once in Highflame Studio, and your clients call it through the gateway instead of at its own address. From there the gateway:

-   serves a rewritten version of the agent card, verified first when you’ve pinned the agent’s signing key
-   requires a Highflame credential from every caller, and can limit a token to a single agent
-   attaches the agent’s credential itself, so your clients never hold it
-   inspects supported inbound message content before it reaches the agent, using Highflame’s Policy Decision Point (PDP), the service that evaluates each request against your guardrails and policies

When enabled, Highflame’s `a2a-security` Cedar policies add another layer, enforcing identity-aware controls on the downstream tool calls your own agents make, evaluated by the same PDP.

Figure 1

Calls to a partner's agent pass through the Highflame AI Gateway, which checks the agent card against your pinned key, authenticates the caller, inspects supported inbound content with Highflame's Policy Decision Point (PDP), and attaches the agent's credential. When enabled, identity-aware policies can restrict the tool calls your agents make with what comes back.

## **Establishing trust in the A2A agent card**

When a client asks the gateway for an agent’s card, the gateway fetches the original card, verifies its signature when a signing key is pinned, and rewrites its routing and authentication information. The card’s client-facing A2A interface URLs now point to the gateway, and its authentication section describes the gateway’s own sign-in: PKCE for people, client credentials for agents. A client that follows the card reaches the agent through the gateway.

The gateway also ignores the address inside the card when it relays a call, and sends each request to the endpoint you registered. That choice is deliberate. The gateway attaches the agent’s credential to every call, so letting the card pick the destination would let whoever edits the card pick where that credential goes.

### **Agent card signing: only a key you pinned counts**

The [A2A 1.0 specification](https://a2a-protocol.org/v1.0.0/specification/) lets an agent sign its card. Rewriting the card breaks that signature, so the gateway verifies it first, as the last party that can.

The gateway trusts only a key you pin when you register the agent, by giving Studio the URL of the agent’s published key set (a JWKS). A key the card names for itself proves nothing, since anyone who can rewrite the card can point it at a key they control.

-   **With a pinned key,** the card must carry a valid signature from it. Otherwise the gateway refuses to serve the card, and clients can’t reach the agent through it until the card is fixed.
-   **Without one,** the gateway serves the card unverified. A check against a key the card names for itself would pass for an attacker too, so it would add confidence without adding protection.

Pin the key for any agent you don’t operate yourself. The gateway also supports signing-key rotation.

## **A2A authentication and credential protection**

Every call through the Highflame AI Gateway requires a Highflame API key or OAuth token. Two choices go further than authenticating the caller: how narrowly a token is scoped, and who holds the agent’s own credential.

OAuth tokens can be narrowed further. Request a token with an RFC 8707 `resource` of `https://gateway.highflame.ai/a2a/trip-planner` and it works at that agent only. Every other agent and every MCP server on the same gateway refuses it. With resource-bound tokens, compromising one agent’s token doesn’t grant access to the others. A token requested without a `resource` gets no such restriction and works anywhere its holder is allowed, so bind the tokens your orchestrators hand out.

The other half is the agent’s own credential, which your clients never hold. The gateway attaches it after authorizing the call, in one of four ways you choose at registration:

Mode

What the agent receives

No auth

No credential and no details about the caller.

Internal

The caller’s verified account, project and person, plus a Highflame token scoped to that caller. For first-party Highflame agents only.

Bearer token

One shared secret, stored in Highflame.

OAuth

The calling person’s own token for that agent.

OAuth mode supports per-user access to partner agents. The gateway sends each person’s own connected-account token, so the agent’s permissions and logs reflect the individual user and one person’s access can be removed without touching anyone else’s. In every mode, the caller’s own Highflame credential stays at the gateway.

## **Securing messages and actions**

### **Inspect messages for prompt injection before they reach the agent**

An A2A message is made of parts such as text, structured data and metadata. The gateway sends each supported part to the PDP separately (the [A2A Agents guide](https://docs.highflame.ai/docs/gateway/a2a-agents) lists them), so an injection hidden in a JSON field or a metadata blob gets the same scrutiny as the visible text. If any part is denied, the agent is never called. If the PDP redacts a secret, the agent receives the message with the redaction in place.

The gateway validates A2A 1.0 requests before processing them, rejecting unsupported methods and request formats to prevent messages from bypassing security checks.

### **Runtime authorization for what your agents do next**

The gateway covers the message on its way in. The other half of an A2A exchange is what your own agents do with content another agent sent them. A planning agent that reads a hotel agent’s answer and then calls your booking tool is acting on input it doesn’t control.

That is where Highflame’s `a2a-security` Cedar policies apply. They evaluate the agent whose tool call the PDP evaluates, using identity projected from that agent’s [ZeroID](/blog/introducing-zeroid-open-source-identity-for-autonomous-agents.md) token, including its type and a trust level of first-party, verified third-party or unverified. Those values come from the token, so an agent can’t raise its own trust level by claiming one in a message.

When enabled, the strictest rule blocks tool calls from agents classified as both autonomous and unverified, whatever the request contains. Additional policies adjust enforcement based on agent trust levels and risk: lower-trust agents face stricter thresholds, sensitive tools get stricter thresholds than ordinary ones, and repeated threats across a session can lock an agent out of tool access. The policies ship as five independent sets that you can enable individually or together, and the [A2A security policy docs](https://docs.highflame.ai/docs/shield/policy-templates/a2a) describe each one.

## **Getting started with the A2A gateway**

In Studio, open **AI Gateway → A2A → A2A Agents** and click **Register A2A Agent**. Give it a name, the agent’s endpoint, an authentication mode, and (for any agent you don’t operate) its signing keys URL. The agent’s page then shows its gateway URL. Point any A2A 1.0 client at it:

```
curl "https://gateway.highflame.ai/a2a/trip-planner" \
  -H "X-Highflame-APIKey: $HIGHFLAME_API_KEY" \
  -H "A2A-Version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "SendMessage",
    "params": {
      "message": {
        "messageId": "m-1",
        "role": "ROLE_USER",
        "parts": [{ "text": "Plan a weekend in Lisbon" }]
      }
    }
  }'
```

The [A2A Agents guide](https://docs.highflame.ai/docs/gateway/a2a-agents) covers registration, every endpoint, the Python SDK client, and current coverage and compatibility details. If your agents also call MCP servers, the same gateway and Highflame credentials cover those calls, and we’ve written about [the role agent identity plays at the gateway](/blog/why-an-ai-gateway-cant-secure-ai-agents.md).

## **The bigger picture**

A2A lets agents work together across organizational boundaries. A controlled path to each agent is part of that, and A2A gateways can provide one. The rest of the interaction, from the card an agent publishes to what your agents do with its replies, depends on verifying what can be trusted and authorizing what happens next. So the trust has to come from infrastructure you control.

With Highflame, that is the AI Gateway in front of every agent you register. It verifies cards against keys you pinned, keeps agent credentials out of your clients’ hands, limits where bound tokens work, and inspects supported inbound content with its PDP. For agents you control, Highflame’s identity-aware `a2a-security` policies can also restrict the tool actions that follow, when enabled.

Every new agent introduces another trust boundary. Highflame helps you enforce it: verify agent cards against keys you pin, then authorize the tool calls your agents make through its PDP.

## Frequently asked questions

How does Highflame secure A2A agent-to-agent traffic?

Register the agent in the Highflame AI Gateway and clients call it through the gateway. The gateway checks the agent card's signature against a key you pinned and rewrites the card so its client-facing A2A interface URLs point to the gateway. It requires a Highflame credential from every caller, attaches the agent's credential itself so callers never hold it, and inspects supported inbound message content with Highflame before it reaches the agent.

Does Highflame verify A2A agent card signatures?

Yes, when you pin the agent's signing keys URL (a JWKS) at registration. The card must then carry a valid signature from one of those keys or the gateway refuses to serve it. A card with no pinned key is served unverified, because a key the card names for itself proves nothing.

How do callers authenticate to the Highflame A2A gateway?

With a Highflame API key or a Highflame OAuth token, and OAuth tokens can be bound to a single agent with an RFC 8707 resource. The gateway then attaches the agent's own credential: nothing, the caller's identity for first-party agents, a shared bearer token, or the calling person's own OAuth token.

What does the Highflame A2A gateway support?

Highflame currently supports A2A 1.0 over JSON-RPC and inspects supported inbound message content. See the A2A Agents guide for complete coverage and compatibility details.

▸ On the Highflame platform

-   [Agent Gateway](/platform/agent-gateway.md) Model, MCP and agent-to-agent calls
-   [Agent Identity](/platform/agent-identity.md) Its own identity and an off switch

Sharath Rajasekar

CEO & Co-founder

Engineering and research on agent identity, runtime policy, and securing autonomous AI at Highflame.

▸ Continue reading

-   [
    
    ![The Trust Problem Hidden in A2A Agent Cards](/blog/a2a-protocol-security-agent-cards/hero.webp)
    
    Security Nov 22, 2026
    
    #### The Trust Problem Hidden in A2A Agent Cards
    
    ](/blog/a2a-protocol-security-agent-cards.md)
-   [
    
    ![Which Person Was Your AI Agent Working For?](/blog/agent-identity-accountable-human/hero.webp)
    
    Security Nov 02, 2026
    
    #### Which Person Was Your AI Agent Working For?
    
    ](/blog/agent-identity-accountable-human.md)
-   [
    
    ![AI Agent Containment Is an Authorization Problem](/blog/ai-agent-containment-is-an-authorization-problem/hero.webp)
    
    Security Sep 15, 2026
    
    #### AI Agent Containment Is an Authorization Problem
    
    ](/blog/ai-agent-containment-is-an-authorization-problem.md)

## Start securing your agents today.

[Book a demo](/contact.md)

## Sitemap

Full site map: [/sitemap.md](https://www.highflame.com/sitemap.md). Machine index: [/sitemap-index.xml](https://www.highflame.com/sitemap-index.xml).
