Skip to content

feat(a2a): verify-and-warn mode for bus registry-auth (#138 Phase 2) - #181

Merged
jaylfc merged 1 commit into
masterfrom
feat/a2a-verify-and-warn
Jun 30, 2026
Merged

feat(a2a): verify-and-warn mode for bus registry-auth (#138 Phase 2)#181
jaylfc merged 1 commit into
masterfrom
feat/a2a-verify-and-warn

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Phase 2 of agent-identity auth (#138), bus side. Adds VERIFY-AND-WARN so the registry-JWT verifier can be activated on the live bus without breaking agents still on self-asserted handles. The enforce flip stays held behind a config flag for @taOS-dev's signal.

  • New config.get/set_a2a_auth_enforce (key a2a_auth_enforce, default False = warn; env TAOSMD_A2A_AUTH_ENFORCE), mirrors get_serve_dashboard.
  • _handle_a2a_send: when a verifier is configured, computes one warn_reason across the three checks (missing token / authorize+sub==from / a2a_send grant), reads enforce per request. Warn (default): log + accept (message still sent + stored). Enforce: reject with the original 401/403 statuses. No verifier configured: unchanged (bus trusts the handle).
  • 4 new warn-mode tests (no token / invalid / no grant / clean, with caplog); existing enforce tests updated to set the flag explicitly (assertions unchanged).

NON-BREAKING by default: warn mode, no registry_url set, no enforce enabled. The verifier stays dormant until registry_url is configured; activation + the eventual enforce flip are operational steps @taOS-dev coordinates. Whole-branch reviewed; full suite 1027 passed.

…eld behind a2a_auth_enforce)

- config.py: get/set_a2a_auth_enforce (key a2a_auth_enforce, env TAOSMD_A2A_AUTH_ENFORCE, default False)
- http_server.py: restructure _handle_a2a_send auth block to collect warn_reason before deciding
  enforce vs. log-and-accept; update Security note docstring to document both modes
- tests: add warn_server fixture + 4 warn-mode tests (caplog assertions); update enforced_server,
  authed_server, iss_pinned_server, and test_send_rejected_expired_grant to set a2a_auth_enforce=True
  so existing rejection assertions hold under new warn default
@jaylfc
jaylfc merged commit 213a676 into master Jun 30, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 237bf073-179b-4559-bdf3-77ef33790143

📥 Commits

Reviewing files that changed from the base of the PR and between 241176f and e3576a4.

📒 Files selected for processing (5)
  • .gitignore
  • taosmd/config.py
  • taosmd/http_server.py
  • tests/test_http_server_registry_auth.py
  • tests/test_http_server_trust_enforcement.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/a2a-verify-and-warn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Comment thread taosmd/config.py

Resolution order:

1. ``TAOSMD_A2A_AUTH_ENFORCE`` env var (``"1"`` or ``"true"`` = True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Docstring inconsistency — only "1" and "true" are documented as truthy here, but the implementation also accepts "yes". Either document "yes" in the docstring or tighten the env parser to match it.

Suggested change
1. ``TAOSMD_A2A_AUTH_ENFORCE`` env var (``"1"`` or ``"true"`` = True)
1. ``TAOSMD_A2A_AUTH_ENFORCE`` env var (``"1"``, ``"true"``, or ``"yes"`` = True)

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
taosmd/config.py 526 Docstring for get_a2a_auth_enforce documents only "1"/"true" as truthy, while the implementation also accepts "yes".
Files Reviewed (5 files)
  • .gitignore - 0 issues
  • taosmd/config.py - 1 issue
  • taosmd/http_server.py - 0 issues
  • tests/test_http_server_registry_auth.py - 0 issues
  • tests/test_http_server_trust_enforcement.py - 0 issues

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 36.8K · Output: 4.2K · Cached: 222.7K

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.

1 participant