Skip to content

fix(manifest): require the issuers each trusted key may sign for - #317

Open
rajnisht7 wants to merge 5 commits into
agentrust-io:mainfrom
rajnisht7:fix-manifest-issuer-keys
Open

rajnisht7 wants to merge 5 commits into
agentrust-io:mainfrom
rajnisht7:fix-manifest-issuer-keys

Conversation

@rajnisht7

Copy link
Copy Markdown
Member

What

The Agent Manifest trust anchor now lists, per key, the issuers it may sign for (same format as cMCP), and startup refuses an anchor that lists none.

Why

Agent Manifest spec 5.3.3: a trusted key may only vouch for issuers it is authorized for. Before, any trusted key could vouch for any issuer, and with agent-manifest 0.16 every binding failed as UNVERIFIABLE.

Security impact

Closes a gap where a key trusted for one issuer could sign a manifest claiming another.

Test plan

  • pytest passes
  • ruff check passes
  • mypy passes
  • Manual test performed (describe steps below if applicable)

DCO sign-off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
@rajnisht7
rajnisht7 requested review from a team, carloshvp and zohebk8s as code owners November 16, 2026 04:44
rajnisht7 and others added 3 commits November 16, 2026 14:13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
… tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
@codecov-commenter

codecov-commenter commented Nov 18, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ca2a_runtime/agent_manifest.py 97.05% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@drk-ram drk-ram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed docs/configuration.md, CHANGELOG.md, and the Agent Manifest trust-anchor and binding modules:

  • Per-key issuer scoping (trusted_key_issuers, Agent Manifest §5.3.3): Requiring trusted_key_issuers as a mandatory keyword argument on verify_agent_manifest_binding, enforcing canonical unpadded base64url public keys and SPIFFE issuer URIs in load_agent_manifest_trust_policy, and rejecting duplicate JSON keys, NaN/Infinity, or private JWK members prevent any trusted key from vouching for an unauthorized issuer.

zohebk8s
zohebk8s previously approved these changes Nov 19, 2026

@zohebk8s zohebk8s left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for tightening Agent Manifest verification. Restricting each trusted key to its configured issuers looks correct, and the migration guidance clearly explains the required trust-anchor changes. The regression coverage looks good. Approved.

@carloshvp carloshvp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please hold this change for a compatibility correction in the public binding API. I submitted the details privately under the repository’s security policy. The 102 COSE and trust-policy tests passed on Python 3.12 with agent-manifest 0.15.0, and both ordinary signed-format controls passed with the declared minimum SDK. Please cover the direct-caller policy contract at the minimum supported version as part of the correction.

… SDK in CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
@rajnisht7

Copy link
Copy Markdown
Member Author

Thanks @carloshvp. The privately reported item is addressed in 83960bf:

  • verify_agent_manifest_binding now refuses a policy that grants no issuer to any key before calling the SDK, so the decision does not depend on the installed agent-manifest version.
  • New direct-caller tests build the policy themselves rather than loading it from a file: an empty map, a key with no issuers, and a signer that is not listed are all refused, and a policy granting the issuer binds. Each runs for v0.1 and v0.2 manifests.
  • A new min-sdk CI job, mirrored in release-validation.yml as test_release_validation_matches_ci requires, installs agent-manifest 0.11.1 from a hash-pinned requirements/min-sdk.txt and runs the Agent Manifest tests. test_ci_tests_the_agent_manifest_floor keeps that pin equal to the pyproject.toml floor.

Before the fix, the new tests failed on 0.11.1 and passed on 0.15.0. Now the full suite passes on 0.15.0 (959 passed), and the Agent Manifest tests pass on 0.11.1 (110 passed).

@rajnisht7
rajnisht7 requested a review from carloshvp November 23, 2026 07:22

@drk-ram drk-ram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed head commit 83960bf.

  • src/ca2a_runtime/agent_manifest.py:152 adds load_agent_manifest_trust_policy with strict JSON parsing (_no_duplicate_keys, _no_constant) and per-key SPIFFE issuer policy.
  • verify_agent_manifest_binding at src/ca2a_runtime/agent_manifest.py:217 requires trusted_key_issuers, validates shape, and rejects policies that authorize no issuer.
  • src/ca2a_runtime/bootstrap.py:178 wires the issuer policy into startup binding, and tests/unit/test_agent_manifest_cose.py:228/:273 add matrix coverage across issuers, versions, and malformed anchors.
  • requirements/min-sdk.txt:1 plus CI min-sdk job coverage keeps the agent-manifest floor behavior pinned and tested.

This branch has not been deployed

No deployments
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.

6 participants