Skip to content

feat(server): support A2A protocol#2656

Merged
spetz merged 14 commits intoapache:masterfrom
Tyooughtul:feat/server/a2a-jwt-jwks
Apr 10, 2026
Merged

feat(server): support A2A protocol#2656
spetz merged 14 commits intoapache:masterfrom
Tyooughtul:feat/server/a2a-jwt-jwks

Conversation

@Tyooughtul
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #1762

Rationale

A2A protocol requires JWKS support to enable secure agent authentication with multiple identity providers. This change allows agents from different tenants to authenticate using their own public keys, and supports key rotation without requiring server restarts.

What changed?

Added JWKS support for secure agent-to-agent authentication. The implementation includes a JwksClient that fetches and caches public keys from JWKS endpoints, integrated JWKS into JwtManager for multi-tenant agent authentication, and updated HTTP middleware to support asynchronous JWT decoding. Also added TrustedIssuerConfig to support configuring multiple trusted issuers.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Which tools? Grok fast
  2. Scope of usage?
  • I use ai for write test case and running scripts.
  • Some config code to test code:
# Trusted issuers for A2A (Application-to-Application) authentication
[[http.jwt.trusted_issuers]]
issuer = "test-issuer"
jwks_url = "http://127.0.0.1:8081/.well-known/jwks.json"
audience = "iggy.apache.org"
  • Some debug! to help me find bugs。
  1. How did you verify the generated code works correctly?
  • Compile successfully with cargo check --package server and cargo build --package server.
  • Test case passed.
  1. Can you explain every line of the code if asked? Yes

@Tyooughtul Tyooughtul closed this Jan 31, 2026
@Tyooughtul Tyooughtul reopened this Jan 31, 2026
@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Jan 31, 2026

hey! thanks for contribution - we'll check this after the weekend.

@spetz
Copy link
Copy Markdown
Contributor

spetz commented Feb 2, 2026

Thank you for the contribution, made a few comments here and there :)

Is that all required to fully support A2A, as you wrote that I'd close #1762 which is the full integration?

Also, is there a way to do the proper integration/e2e testing like e..g for existing MCP runtime to ensure it works well with A2A as the full transport?

@Tyooughtul
Copy link
Copy Markdown
Contributor Author

Thanks for the review! All comments are clear and I will address every point as suggested.
I think this PR covers the full A2A support as mentioned in #1762. I will also add the corresponding integration/e2e tests for the MCP runtime & A2A.

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Feb 3, 2026

when testing, see how iggy_harness macro is used for connectors in #2667 or mcp (already merged). we're in the middle of refactor to use it everywhere, so it'd be great if you could use it in your tests (assuming you'll write some tests for this A2A).

@hubcio hubcio changed the title feat(server): Support A2A protocol (apache#1762) feat(server): support A2A protocol Feb 3, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 77.01149% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.51%. Comparing base (70b8d36) to head (037e49d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/server/src/http/jwt/jwks.rs 78.52% 25 Missing and 10 partials ⚠️
core/server/src/http/jwt/jwt_manager.rs 79.24% 21 Missing and 1 partial ⚠️
core/server/src/http/jwt/json_web_token.rs 63.63% 19 Missing and 1 partial ⚠️
core/configs/src/server_config/defaults.rs 0.00% 1 Missing ⚠️
core/sdk/src/client_provider.rs 0.00% 1 Missing ⚠️
core/server/src/http/jwt/middleware.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             master    #2656    +/-   ##
==========================================
  Coverage     70.50%   70.51%            
  Complexity      943      943            
==========================================
  Files          1115     1117     +2     
  Lines         95388    95717   +329     
  Branches      72589    72935   +346     
==========================================
+ Hits          67256    67496   +240     
- Misses        25657    25709    +52     
- Partials       2475     2512    +37     
Components Coverage Δ
Rust Core 70.56% <77.01%> (+0.03%) ⬆️
Java SDK 62.30% <ø> (ø)
C# SDK 69.10% <ø> (-0.31%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (ø)
Go SDK 38.97% <ø> (ø)
Files with missing lines Coverage Δ
core/common/src/error/iggy_error.rs 100.00% <ø> (ø)
...es/configuration/http_config/http_client_config.rs 100.00% <100.00%> (ø)
...guration/http_config/http_client_config_builder.rs 61.11% <100.00%> (+61.11%) ⬆️
core/configs/src/server_config/http.rs 66.66% <ø> (ø)
core/sdk/src/clients/client_builder.rs 59.88% <100.00%> (+5.02%) ⬆️
core/sdk/src/clients/consumer.rs 67.21% <100.00%> (+0.13%) ⬆️
core/sdk/src/http/http_client.rs 91.91% <100.00%> (+0.46%) ⬆️
core/configs/src/server_config/defaults.rs 0.00% <0.00%> (ø)
core/sdk/src/client_provider.rs 48.02% <0.00%> (-0.32%) ⬇️
core/server/src/http/jwt/middleware.rs 74.54% <85.71%> (+7.23%) ⬆️
... and 3 more

... and 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Feb 6, 2026

It looks like something went wrong with your rebase:
image

@Tyooughtul Tyooughtul force-pushed the feat/server/a2a-jwt-jwks branch 2 times, most recently from bd98498 to b85afac Compare February 6, 2026 16:11
@Tyooughtul
Copy link
Copy Markdown
Contributor Author

It looks like something went wrong with your rebase: image

😱 sorry, I fetched the wrong branch. I have corrected it.

@Tyooughtul Tyooughtul force-pushed the feat/server/a2a-jwt-jwks branch 2 times, most recently from 28f9cb5 to dff37e2 Compare February 13, 2026 14:11
@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Feb 19, 2026

Hello @Tyooughtul
did you resolve all comments from @spetz ?
Do you plan to continue?

@Tyooughtul
Copy link
Copy Markdown
Contributor Author

Hello @Tyooughtul did you resolve all comments from @spetz ? Do you plan to continue?

Hi @hubcio , I think I’ve addressed all comments from @spetz, and the PR is ready for review. I’ll keep following up and fix any issues promptly. 😊

@Tyooughtul
Copy link
Copy Markdown
Contributor Author

Hi @spetz @hubcio,
I've addressed all the previous review comments. Could you please take another look when you have a moment? Thanks!
Also, could you let me know if a second review from another maintainer is needed to meet the merge requirements?
Additionally, it seems the workflow is awaiting approval from a maintainer to run the CI checks. Would you mind approving that as well?
Thanks for your time!

@spetz
Copy link
Copy Markdown
Contributor

spetz commented Feb 21, 2026

@Tyooughtul sure, the CI has started again, however I can see that there are still some pending comments waiting to be resolved.

@Tyooughtul Tyooughtul force-pushed the feat/server/a2a-jwt-jwks branch from 24f9624 to 0b3ec9f Compare February 22, 2026 02:12
@Tyooughtul
Copy link
Copy Markdown
Contributor Author

Tyooughtul commented Feb 22, 2026

Hi @spetz,
All review comments have been addressed and pushed, All newly added tests pass. PTAL when you have time, thanks! 😊

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR.

Thank you for your contribution!

@github-actions github-actions bot added the stale Inactive issue or pull request label Mar 5, 2026
@Tyooughtul Tyooughtul requested a review from spetz March 27, 2026 01:47
- Support JWKS for A2A compliant secure agent authentication
- Enable key rotation without restarting the server
- Allow agents from different tenants to publish to the same Iggy bus

rebase to the newest master
…ness macro

Extend `#[iggy_harness]` with `jwks_server(...)` attribute to support
declarative JWKS mock server setup, as suggested in review to follow
the harness macro convention used for MCP and connectors.
- Fix the problem as suggested
- Add `jwks_server(store_path = "...")` attribute to #[iggy_harness]
- Add `config_path` to server(...) for custom TOML via IGGY_CONFIG_PATH
- Start WireMock MockServer and inject trusted issuer env vars before
  server startup
- Add ServerHandle::add_env() for pre-start env var injection
- Add 4 e2e tests: valid_token, expired_token, unknown_issuer,
  missing_token with RSA key pair and JWKS fixtures
…hardening

- Add Audience enum supporting both string and array formats
- Add JWKS key cache cleanup for revoked/rotated keys
- Add issuer URL normalization for case-insensitive matching
- Reject A2A token refresh (they have their own lifecycle)
- Map A2A tokens to configured user_id instead of JWT sub claim
- Prevent A2A tokens from mapping to root user
- Use IggyClient SDK instead of raw HTTP requests
- Add seed function to create A2A user with permissions
- Add test for array audience support
- Update test fixtures and configuration
- solve conflict in Cargo.lock and DEPENDENCIES.md
- re-enable standalone consumer polling on connect
…with_jwt to make naming more concise, following review feedback.
- move normalize_issuer_url to bottom of file, add unit tests
- replace HTTP client with compio official implementation
- bump iggy SDK version to 0.10.1
@Tyooughtul Tyooughtul force-pushed the feat/server/a2a-jwt-jwks branch from bea5b33 to 104ed82 Compare April 9, 2026 23:55
@Tyooughtul Tyooughtul requested a review from spetz April 9, 2026 23:56
spetz
spetz previously approved these changes Apr 10, 2026
@spetz
Copy link
Copy Markdown
Contributor

spetz commented Apr 10, 2026

LGTM, thanks for all the changes, it's been a while :D

hubcio
hubcio previously approved these changes Apr 10, 2026
mmodzelewski
mmodzelewski previously approved these changes Apr 10, 2026
@spetz
Copy link
Copy Markdown
Contributor

spetz commented Apr 10, 2026

Looks like a typo in tests to fix

assertion `left == right` failed
  left: "https://example.com/"
 right: "https://example.com"

@Tyooughtul Tyooughtul dismissed stale reviews from mmodzelewski, hubcio, and spetz via 037e49d April 10, 2026 08:24
@spetz spetz merged commit e7be6dd into apache:master Apr 10, 2026
80 checks passed
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.

Integration with Google Agent2Agent Protocol

4 participants