Scenario
A card that said production
RolesAgent Systems EngineeringCustomer AI Deployment
- Engine
- A2A 1.0.1 with the manual's capture kit (the test-runner, code-reviewer and deployer agents)
- Model
- no model; the agents are deterministic fixtures
- Hardware
- one machine, localhost, no network
Situation
A planner builds its plan from the agent cards it fetches at startup. The cards pass through a caching proxy that another team runs, and the planner reads each card as a trusted description of what the agent will do. One morning the planner delegated the release step as Deploy build 2026.10.06-1 to production, because the copy of the deployer card it held described an agent that ships tagged builds to production. The deployer refused. The release stalled, and the on-call engineer found that the copy on the proxy differed from the card the agent serves in one word.
The deployer card carries a signature. Nobody on the planner team had looked at it. The card loader parsed the JSON, dropped the fields it did not know, and planned. You have the published card, the agent's own answer to an authenticated card request, the refusal, and the kit's record of canonicalizing, signing and verifying the card, with a check on a copy whose description names production.
Questions
- What does the published card say the deployer does, and what did the agent say when asked with a token?
- What does the signature cover, and what does it leave out?
- One check returned True and the other False. What changed between the two, and why does one word matter?
- Why does the kit sign with HS256, and why is that not acceptable for a real deployment?
- Where in the planner's startup does verification belong, and what happens when it fails?
- The deployer refused the production deploy. Why is that refusal not the defense?
Commit to a cause after each listing. Write it down before you read the next one.
Evidence
the skills and the signature of the published deployer card
Read where the skill says the build goes, then the two fields of the signature entry.
"skills": [
{
"id": "deploy",
"name": "Deploy a build",
"description": "Deploy one tagged build to staging, with operator approval.",
"tags": [
"deploy",
"staging"
],
"examples": [
"Deploy build 2026.10.06-1 to staging"
]
}
],
"signatures": [
{
"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJkZXBsb3llci1rZXktMSJ9",
"signature": "yPk834ji_dOVmxElhzV3yTYBT9NVp8Bx1j5K0LQmOww"
}
]Source: manuals/a2a-101/capture/out/01-agent-cards.http, lines 181-200
what the deployer itself says to an authenticated caller
Compare this description with the one the planner acted on.
HTTP/1.1 200 OK
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"name": "deployer",
"description": "Deploys a tagged build to staging after an operator approves it.",Source: manuals/a2a-101/capture/out/18-extended-card.http, lines 40-48
the canonical payload and the decoded protected header
Line 2 is the whole card without its signatures, keys sorted, no spaces. Read the description inside it and the alg in the header.
# 1. canonical payload (RFC 8785): the card without signatures, keys sorted, no spaces
{"capabilities":{"extendedAgentCard":true,"streaming":true},"defaultInputModes":["text/plain"],"defaultOutputModes":["text/plain","application/json"],"description":"Deploys a tagged build to staging after an operator approves it.","name":"deployer","provider":{"organization":"Platform Team","url":"https://deploy.example.com"},"securityRequirements":[{"schemes":{"bearer":{"list":[]}}}],"securitySchemes":{"bearer":{"httpAuthSecurityScheme":{"description":"A token issued by the platform team.","scheme":"Bearer"}}},"skills":[{"description":"Deploy one tagged build to staging, with operator approval.","examples":["Deploy build 2026.10.06-1 to staging"],"id":"deploy","name":"Deploy a build","tags":["deploy","staging"]}],"supportedInterfaces":[{"protocolBinding":"JSONRPC","protocolVersion":"1.0","url":"http://localhost:41243/a2a/jsonrpc"},{"protocolBinding":"HTTP+JSON","protocolVersion":"1.0","url":"http://localhost:41243/a2a/rest"}],"version":"1.4.1"}
# 2. protected header, decoded
{"alg": "HS256", "typ": "JOSE", "kid": "deployer-key-1"}Source: manuals/a2a-101/capture/out/17-signed-card.txt, lines 1-5
the three rules a verifier follows to rebuild the signed bytes
Rule 3 says what the signature cannot cover.
Each entry holds a base64url `protected` header and `signature` {{proto AgentCardSignature}}, and a verifier rebuilds the signed bytes from the received card under three rules {{spec §8.4.1}}:
1. **Field presence.** A field marked `REQUIRED` must always be present, even when its value is the default {{spec §8.4.1}}. A field with the `optional` keyword stays whenever it was set, and any other field at its default value is dropped.
2. **RFC 8785.** The JSON Canonicalization Scheme sorts object keys, fixes one form for each value, and removes whitespace {{spec §8.4.1}}.
3. **No signatures.** The `signatures` field must be left out of the signed content, because a signature cannot cover itself {{spec §8.4.1}}.Source: manuals/a2a-101/sections/2-3-extended-cards-and-signatures.md, lines 67-71
the published signature entry and two verification results
The last two lines are the checks: the card as published, and a copy with one word changed.
# 4. the signature entry published in the card
{
"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJkZXBsb3llci1rZXktMSJ9",
"signature": "yPk834ji_dOVmxElhzV3yTYBT9NVp8Bx1j5K0LQmOww"
}
# 5. verify the published card: True
# 6. verify after changing the description to name production: FalseSource: manuals/a2a-101/capture/out/17-signed-card.txt, lines 10-17
when a client verifies, and with which algorithms
One sentence on the order of operations, one on the key, one on the algorithm list.
A client should verify at least one signature before it trusts an Agent Card {{spec §8.4.3}}, and never with an expired or revoked key. Give your verifier an explicit list of allowed algorithms, as the reference SDK does, to prevent algorithm confusion attacks {{sdk src/a2a/utils/signing.py}}. [Security requirements](#s-security-requirements) covers card spoofing.Source: manuals/a2a-101/sections/2-3-extended-cards-and-signatures.md, lines 120-120
what the deployer answers to a production deploy
Read the state and the agent's message inside it.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"task": {
"id": "23cf3710-c193-457d-93d1-e93e1c860a53",
"contextId": "cf08459c-e7bd-4736-92d7-2fe3f6e7a1f6",
"status": {
"state": "TASK_STATE_REJECTED",
"message": {
"messageId": "12b263fc-78eb-4b49-997f-e495cca7813c",
"contextId": "cf08459c-e7bd-4736-92d7-2fe3f6e7a1f6",
"taskId": "23cf3710-c193-457d-93d1-e93e1c860a53",
"role": "ROLE_AGENT",
"parts": [
{
"text": "Production deploys are outside this agent's policy. Use the release train."
}
]
},
"timestamp": "2026-10-06T09:00:01.750Z"
},
"history": [
{
"messageId": "6018366c-f658-47a7-9ed3-4fe53a096533",
"contextId": "cf08459c-e7bd-4736-92d7-2fe3f6e7a1f6",
"taskId": "23cf3710-c193-457d-93d1-e93e1c860a53",Source: manuals/a2a-101/capture/out/08-rejected.http, lines 27-54
The answer
Show the walkthrough
- Read the published card. The skill is
Deploy a build, and its description says one tagged build to staging with operator approval. Its tags aredeployandstaging, and its example is a staging deploy. Below the skills sits asignatureslist with one entry: aprotectedheader and asignature. The extended card, returned only to a caller with a bearer token, describes the same agent: it deploys to staging after an operator approves. The proxy copy alone named production. - Read the canonical payload. It is the card without its signatures, with keys sorted and no spaces, as RFC 8785 defines. The description inside it says staging. The decoded header gives
algHS256,typJOSE andkiddeployer-key-1. The signing input joins the base64url header and the base64url payload with a period. - Read the three rules. A verifier rebuilds those bytes from the card it received. A REQUIRED field is always present, even at its default. The JSON Canonicalization Scheme fixes the order and the form of every value. The
signaturesfield stays out, because a signature cannot cover itself. So the signature binds every other field, the description among them. - Read the two checks. On the published card the check returns True. On the altered copy, where the word staging became production, the canonical bytes differ, and the check returns False. One changed word changes the signed bytes, and the signature no longer matches. This is the test that the planner never ran.
- Read the algorithm line. The kit signs with HS256 because its standard library has no ECDSA. HS256 is an HMAC, so a verifier holds the signing key and could sign a card itself. Real cards use ES256 or RS256, with the public key published in a JWKS and fetched by
kidandjkuor taken from a trusted store. Verification has six MUST steps, and a client verifies at least one signature before it trusts a card, never with an expired or revoked key, and with an explicit list of allowed algorithms. - Read the refusal. The deployer answered
TASK_STATE_REJECTEDand said that production deploys are outside its policy. That policy sits in the agent, and it caught this case. The card also names the interface URL the planner sends to. A copy that can change one word can change that field, and then the request goes to a server the attacker runs, where no policy refuses anything.
Show the resolution
The planner trusted an unverified copy of a signed document. The loader now verifies at least one signature before it reads any field for planning. It rebuilds the canonical bytes under the three rules, takes the key for the kid from a trusted store, and allows only the algorithms the team lists. A card that fails the check is rejected and raises an alert, and the planner does not fall back to its content. For an authenticated session, the planner also replaces the cached public card with the extended card that the agent itself returns. The kit's record is the proof of the mechanism: True on the published bytes, False on the same card with one word changed, and the agent's own description agrees with the published one.
Show the wrong turns
“Pin the proxy cache and move on.”
The card is still unverified. The next edit passes the same way.
“Compare the description with the version we saw last week.”
The
versionfield is inside the signed payload, and an edited copy keeps it. Only the signature binds the fields together.“Verify with whatever algorithm the header names.”
A header is part of the input. Give the verifier an explicit list, so that a changed
algcannot pick a weaker check.“The deployer refused, so the system is safe.”
The refusal came from the honest agent at the published URL. A changed card can also change the URL, and the honest agent never sees the request.
“Fetch the extended card instead, it needs a token.”
The extended card is a fuller card for an authenticated caller, and it comes back without signatures. It helps once the planner trusts the agent it talks to, and the public card's signature is what earns that trust.
Show the general rule
Anything an agent reads from the network is input, not truth, and the metadata that describes other agents is the input with the most leverage. Verify the integrity of such a document before you plan on it, with a key that did not travel with the document, and treat a policy check at the far end as a second layer, never the first.
Taught in
The extended cards and signatures page of A2A 101 walks through this signing and both checks, the security schemes page covers the credential and the authorization scope, and the indirect prompt injection lesson explains why content an agent reads without a user in the loop is the attack surface that filters on user input never see.