Skip to content

docs: DID-based agent identity verification extension via AIP#1511

Open
The-Nexus-Guard wants to merge 2 commits intoa2aproject:mainfrom
The-Nexus-Guard:aip-identity-extension
Open

docs: DID-based agent identity verification extension via AIP#1511
The-Nexus-Guard wants to merge 2 commits intoa2aproject:mainfrom
The-Nexus-Guard:aip-identity-extension

Conversation

@The-Nexus-Guard
Copy link

Summary

This PR adds a specification document for DID-based agent identity verification as an A2A extension, using the Agent Identity Protocol (AIP) as the underlying infrastructure.

Relationship to PR #1496

This is a companion to @abdelsfane's Agent Identity and Trust Framework. That PR's design rationale identifies three options:

  • Option 1: Extension-based self-assertion (chosen)
  • Option 2: DID-based identity (set aside because "DID infrastructure does not yet exist for agents")
  • Option 3: Hybrid

This PR provides Option 2 — the DID infrastructure now exists via AIP:

  • Live service: aip-service.fly.dev (39 endpoints)
  • Python client: pip install aip-identity (288 tests)
  • MCP integration: pip install aip-mcp-server (8 identity tools)

What's in the spec

  1. AgentCard extension — agents advertise their DID via the standard extensions field
  2. Identity verification flow — discover → verify → check trust → set threshold
  3. Message signing — Ed25519 signatures on A2A messages with replay protection
  4. Vouch chains for delegation — transitive trust with scope narrowing
  5. Real-time revocation — no CRL distribution delay
  6. Compatibility mapping — how AIP maps to docs: add agent identity verification and trust framework #1496's Level 0/1/2 model

Why this matters

The A2A protocol enables agent discovery and communication but has no built-in mechanism for cryptographic identity verification. As discussed in #1501, #1454, and #1463, trust and identity are recurring themes. This spec provides a concrete, working implementation path.

Happy to iterate on the spec based on feedback. The goal is to complement existing proposals, not compete with them.

Proposes an A2A extension for cryptographic agent identity using
Decentralized Identifiers (DIDs) and vouch chains via AIP.

Companion to PR a2aproject#1496 (Agent Identity and Trust Framework) - provides
the DID infrastructure layer that a2aproject#1496's design rationale identified
as Option 2 but set aside due to missing infrastructure.

Key features:
- AgentCard extension for DID advertisement
- Identity verification flow with trust scoring
- Message signing with replay protection
- Transitive vouch chains for delegation
- Real-time revocation
- Compatibility mapping with PR a2aproject#1496 levels
@The-Nexus-Guard The-Nexus-Guard requested a review from a team as a code owner February 24, 2026 23:58
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @The-Nexus-Guard, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new specification document outlining a DID-based identity verification extension for A2A agents, leveraging the Agent Identity Protocol (AIP). This extension provides a robust cryptographic identity layer, addressing the need for secure agent identification and trust within the A2A ecosystem, and offers a concrete implementation path for advanced verification levels.

Highlights

  • AgentCard Extension: Agents can now advertise their Decentralized Identifiers (DIDs) via a standard 'extensions' field in their AgentCard, using the Agent Identity Protocol (AIP).
  • Identity Verification Flow: A defined process for agents to discover, verify, and establish trust with other agents using AIP's verification and trust-score endpoints.
  • Message Signing: Specifies that A2A messages between AIP-enabled agents should be signed using Ed25519 signatures, including timestamp and nonce for replay protection.
  • Vouch Chains for Delegation: Introduces cryptographic vouch chains for transitive trust and delegation, allowing scope narrowing for delegated capabilities.
  • Real-time Revocation: AIP provides immediate revocation of vouches via its service API, eliminating delays associated with traditional Certificate Revocation Lists (CRLs).
  • Compatibility with Existing Framework: Details how this DID-based extension maps to and complements the Level 0/1/2 identity verification model proposed in PR docs: add agent identity verification and trust framework #1496.
Changelog
  • docs/topics/did-identity-verification.md
    • Added a new specification document detailing DID-based agent identity verification via AIP.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a well-structured and valuable specification for DID-based agent identity verification via an A2A extension. It provides a clear path for implementing cryptographic identity, which is a great complement to the existing trust framework. My review focuses on enhancing consistency and clarity within the specification. I've suggested aligning enum-like values with the established SCREAMING_SNAKE_CASE convention of the A2A protocol and clarifying the data serialization process for message signing to ensure interoperability. These minor adjustments will help strengthen the specification.

}
```

The signature covers `method + params.message.parts + timestamp + nonce` to prevent replay attacks.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The description of the data covered by the signature is ambiguous. To ensure interoperability and prevent signature verification failures between different agent implementations, the specification should precisely define how the components are serialized and concatenated. For structured data like params.message.parts, it's crucial to specify a canonical serialization format.

Suggested change
The signature covers `method + params.message.parts + timestamp + nonce` to prevent replay attacks.
The signature covers a deterministically serialized representation of `method`, `params.message.parts`, `timestamp`, and `nonce` to prevent replay attacks. It is RECOMMENDED to use a canonical JSON format (such as RFC 8785) for structured data before signing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — updated to specify canonical JSON serialization (RFC 8785) for the signature computation. This ensures interoperability across implementations. Fixed in e6b30f1.

"did": "did:aip:abc123...",
"verification_endpoint": "https://aip-service.fly.dev/verify",
"trust_score_endpoint": "https://aip-service.fly.dev/trust-score",
"capabilities": ["sign", "verify", "vouch", "message"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

For consistency with A2A protocol conventions for enum-like values, consider using SCREAMING_SNAKE_CASE for the capabilities values. This aligns with the ProtoJSON specification mentioned in the project's general rules.

Suggested change
"capabilities": ["sign", "verify", "vouch", "message"]
"capabilities": ["SIGN", "VERIFY", "VOUCH", "MESSAGE"]
References
  1. Enum values in the A2A protocol should be in SCREAMING_SNAKE_CASE to comply with the ProtoJSON specification. While capabilities is an array of strings, its values are enum-like and should follow this convention for consistency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — updated both capabilities and scope values to SCREAMING_SNAKE_CASE for consistency with A2A ProtoJSON conventions. Fixed in e6b30f1.

client.vouch(
voucher_did=agent_a_did,
subject_did=agent_b_did,
scope=["data-analysis", "read-only"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

Similar to the capabilities field, for consistency with A2A protocol conventions, consider using SCREAMING_SNAKE_CASE for the scope values. This makes the extension's vocabulary more consistent with the base protocol.

Suggested change
scope=["data-analysis", "read-only"],
scope=["DATA_ANALYSIS", "READ_ONLY"],
References
  1. Enum values in the A2A protocol should be in SCREAMING_SNAKE_CASE to comply with the ProtoJSON specification. While scope is an array of strings, its values are enum-like and should follow this convention for consistency.

@thebenignhacker
Copy link

Summary

This PR adds a specification document for DID-based agent identity verification as an A2A extension, using the Agent Identity Protocol (AIP) as the underlying infrastructure.

Relationship to PR #1496

This is a companion to @abdelsfane's Agent Identity and Trust Framework. That PR's design rationale identifies three options:

  • Option 1: Extension-based self-assertion (chosen)
  • Option 2: DID-based identity (set aside because "DID infrastructure does not yet exist for agents")
  • Option 3: Hybrid

This PR provides Option 2 — the DID infrastructure now exists via AIP:

  • Live service: aip-service.fly.dev (39 endpoints)
  • Python client: pip install aip-identity (288 tests)
  • MCP integration: pip install aip-mcp-server (8 identity tools)

What's in the spec

  1. AgentCard extension — agents advertise their DID via the standard extensions field
  2. Identity verification flow — discover → verify → check trust → set threshold
  3. Message signing — Ed25519 signatures on A2A messages with replay protection
  4. Vouch chains for delegation — transitive trust with scope narrowing
  5. Real-time revocation — no CRL distribution delay
  6. Compatibility mapping — how AIP maps to docs: add agent identity verification and trust framework #1496's Level 0/1/2 model

Why this matters

The A2A protocol enables agent discovery and communication but has no built-in mechanism for cryptographic identity verification. As discussed in #1501, #1454, and #1463, trust and identity are recurring themes. This spec provides a concrete, working implementation path.

Happy to iterate on the spec based on feedback. The goal is to complement existing proposals, not compete with them.


Thanks for the thoughtful work here, @The-Nexus-Guard , and for referencing #1496's design rationale. It's encouraging to see more people thinking about cryptographic identity for agents. A few technical and architectural concerns I'd want to address before this moves forward:

1. Protocol specs should be implementation-agnostic

The spec as written hardcodes a specific hosted service (aip-service.fly.dev) into the extension definition — the verification_endpoint and trust_score_endpoint both point to a single provider's infrastructure. A protocol-level extension should define interfaces and behaviors, not route traffic to a particular service. If this extension were adopted, every A2A agent advertising DID identity would depend on one third-party endpoint for verification and trust scoring. That's a centralization risk that contradicts the goals of decentralized identity.

For comparison, #1496 defines an extensible trust framework with levels (0/1/2) that any implementation can satisfy — it doesn't mandate a specific verification service.

2. Single point of failure / trust anchor concerns

Related to the above: the spec doesn't mention self-hosting, federation, or what happens when aip-service.fly.dev is unavailable. If this becomes the reference implementation for DID-based identity in A2A, we're creating a single point of failure for agent identity verification across the ecosystem. The spec should at minimum define how alternative AIP service providers could operate, or better yet, define the verification protocol abstractly so it's not coupled to one deployment.

3. Signature serialization is underspecified

The Gemini review already flagged this, but I want to reinforce it — "the signature covers method + params.message.parts + timestamp + nonce" is not precise enough for interoperability. Without a canonical serialization format (RFC 8785 or equivalent), two compliant implementations could produce different byte sequences for the same message, causing verification failures. This needs to be fully specified before it's viable as a protocol extension.

4. Substantial overlap with existing work in #1496

The capabilities covered here — Ed25519 signatures, trust scoring, vouch/delegation chains, capability scoping, real-time revocation — are already addressed or planned within the Agent Identity and Trust Framework in #1496. Specifically:

Rather than a parallel spec, it might be more productive to contribute DID-specific extensions within the framework #1496 already establishes — particularly at Level 2 (cryptographic verification), where DID methods are a natural fit.

5. The "DID infrastructure doesn't exist" framing needs context

The design rationale in #1496 noted that DID infrastructure doesn't yet exist for agents specifically — meaning a purpose-built system with agent lifecycle management, NHI governance, capability enforcement, and supply chain verification integrated into the identity layer. A generic DID service with vouch chains is a useful primitive, but it doesn't solve the full problem that #1496's framework was designed to address.


To be clear, I think DID-based identity is valuable and should be part of the A2A identity story — that's why it's on the roadmap. My concern is with merging a spec that's tightly coupled to a single hosted service when we should be defining protocol-level interfaces that any implementation (AIP, AIM, or others) can satisfy.

Happy to discuss how we can incorporate DID verification into the existing framework in #1496 in a way that's implementation-agnostic and benefits the whole ecosystem.

@The-Nexus-Guard
Copy link
Author

Added a working interop demo that shows all four integration points in action:

  • AgentCard extension with DID + Ed25519 public key
  • Challenge-response verification before task delegation
  • Ed25519 message signing for task message integrity
  • Vouch chain trust for transitive delegation

Runnable demo: examples/a2a_identity_demo.py

pip install aip-identity
python examples/a2a_identity_demo.py

This demonstrates the concrete developer experience of using AIP as A2A's identity layer.

…ON for signatures

- Use SCREAMING_SNAKE_CASE for capabilities and scope values per A2A ProtoJSON conventions
- Specify canonical JSON serialization (RFC 8785) for signature computation
@The-Nexus-Guard
Copy link
Author

Thanks for the detailed and thoughtful review, @abdelsfane. These are exactly the right concerns to raise — I want to address each one directly.

1. Implementation-agnostic spec

You're right. The spec as written couples too tightly to a specific deployment. I'll refactor to define abstract interfaces:

  • A VerificationService interface (resolve DID → public key, verify signature, query trust)
  • The verification_endpoint in AgentCard becomes a generic service URL that any conforming implementation can serve
  • AIP becomes one reference implementation, not the implementation

2. Federation and self-hosting

AIP's service is already open-source (github.com/The-Nexus-Guard/aip-identity) and self-hostable, but the spec doesn't mention this — it should. I'll add a section on:

  • Service discovery (how agents find alternative providers)
  • Multi-provider trust (cross-provider vouch verification)
  • Offline verification using cached public keys

3. Signature serialization

Agreed — this needs to be fully specified. I'll adopt RFC 8785 (JCS) for canonical JSON serialization and spell out the exact byte sequence that gets signed. No ambiguity.

4. Relationship to #1496

I see two productive paths forward, and I'm genuinely open to either:

Option A: Refactor this PR into a DID method specification that plugs into #1496's Level 2 (cryptographic verification). The vouch chains, trust scoring, and capability scoping would map onto #1496's existing framework rather than defining a parallel system.

Option B: Keep this as a standalone extension but with explicit compatibility mappings showing how DID-based verification satisfies each of #1496's trust levels.

My preference is Option A — contributing DID verification as a concrete method within your framework seems more useful to the ecosystem than maintaining parallel specs. What's your take?

5. DID infrastructure context

Fair point. The original framing in #1496 was about purpose-built agent identity infrastructure, not generic DIDs. AIP does cover some of the agent-specific pieces (key rotation with compromise recovery, agent-to-agent vouching, capability-scoped delegation), but I acknowledge it doesn't cover the full NHI governance and supply chain verification that #1496 envisions. DID-based identity is one piece of the puzzle, not the whole picture.


Next steps from my side:

  1. Refactor the spec to define abstract interfaces (decouple from any specific service)
  2. Add RFC 8785 canonical serialization for signatures
  3. Add federation/self-hosting section
  4. Depending on your preference re: Option A vs B, either restructure as a docs: add agent identity verification and trust framework #1496 Level 2 DID method or add explicit compatibility mappings

Happy to jump on a discussion thread if that's easier for working through the integration details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants