Skip to content

docs(operations): add issuer key authorization guide (§5.3.3) - #493

Merged
imran-siddique merged 3 commits into
agentrust-io:mainfrom
litzki-systems:docs/issuer-key-authorization
Oct 12, 2026
Merged

imran-siddique merged 3 commits into
agentrust-io:mainfrom
litzki-systems:docs/issuer-key-authorization

Conversation

@litzki-systems

@litzki-systems litzki-systems commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds an operations guide for spec §5.3.3 (issuer key authorization) and links it from the nav, the operations index, the key rotation runbook and the server-side verification tutorial.

Why

Implementers who configured trusted_keys before §5.3.3 existed have no page that explains the second check. The guide covers:

  • why key identification (trusted_keys) and issuer authorization (trusted_key_issuers) are separate checks
  • the meaning of None, {} and an explicit mapping
  • gating on result.result, not signature_verified: an unauthorized key yields MISMATCH with signature_verified: false on v0.1 and true on v0.2 (AM-VEC-COSE-009)
  • v0.2: verify_cose_manifest() alone does not run issuer authorization; the COSE bytes go to verify_manifest()
  • the three signature.issuer mismatch details and the separate key resolution failure
  • for custom verifiers: the reference check and its position in each envelope, in collapsible SDK reference blocks

Follow-up to #325, #367 and #417. Page structure follows #488.

Spec impact

None. Documentation only: no normative delta, no schema change, no source change, no new conformance test IDs.

While checking the page against the spec I noticed two places where the SDK differs from the literal text of §5.3.3. This PR does not change either; the page describes the SDK as it behaves today.

  1. §5.3.3 says the verifier MUST complete key resolution and issuer authorization before signature verification. On the v0.2 COSE path the envelope signature is verified during appraisal, and issuer authorization runs afterwards. When trusted_key_issuers is configured, the outcome is still MISMATCH, so no unauthorized key reaches VALID, but the order differs from the spec text.
  2. §5.3.3 says a verifier that cannot complete authorization MUST NOT return VALID. With trusted_key_issuers=None the SDK skips the check, which keeps pre-§5.3.3 deployments working. The page states that None does not perform the §5.3.3 check.

Should the spec wording follow the implementation, or the implementation the spec? I can open an issue for either.

Test plan

Documentation-only change; no Python source or tests changed.

  • Statements checked against _verify.py and _cose.py on main at bd37750 (SDK 0.15.0), the §5.3.3 text, the vectors AM-VEC-022/023/024 and AM-VEC-COSE-009, and CHANGELOG.md
  • pytest tests/test_verify.py tests/test_am_verify.py -k issuer: 5 passed
  • mkdocs build -d site and python scripts/check_built_links.py site: build succeeds, all local asset references resolve
  • pytest -v, mypy src/agent_manifest, ruff check src/ tests/: not applicable, no source change
  • New or updated tests: not applicable
  • CHANGELOG.md: not applicable, no spec change

DCO

All commits in this PR are signed off (git commit -s). By submitting this PR I certify the Developer Certificate of Origin.

Adds an operations page for implementers who configured trusted_keys
before §5.3.3 existed. It covers the trusted_key_issuers settings (None,
{} and an explicit mapping), gating on result rather than
signature_verified, the signature.issuer mismatch details, and the
reference behavior for custom verifiers.

Wires the page into the nav, the operations index, the key rotation
runbook and the server-side verification tutorial.

Follow-up to agentrust-io#325, agentrust-io#367 and agentrust-io#417. Documentation only. No normative
delta, no schema change, no source change, no conformance test IDs.

Signed-off-by: Thorsten Litzki <268185082+litzki-systems@users.noreply.github.com>

@rajnisht7 rajnisht7 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.

Reviewed the head 14a5642, overall the changes looks good, a few sentences can be tightened:

  • it would be good to soften the “configures a mapping” sentence so it does not claim that the SDK structure is required for conformance
  • change “Reproduce the following behavior” language that clearly separates “current SDK implementation” from “what §5.3.3 requires of any conformant verifier”
  • qualify the “always produces MISMATCH” claim
  • either open (and link) a concrete issue for the ordering discrepancy, or add an explicit “known divergence pending resolution” call-out
  • clarify that trusted_key_issuers on the request body is an SDK-level input, not a normative public-protocol field.

Separate §5.3.3 requirements from the SDK reference implementation, qualify the MISMATCH statement, add a known divergence note for v0.2 ordering and None, and mark trusted_key_issuers on POST /verify as an SDK-level input outside §5.1.

Signed-off-by: Thorsten Litzki <268185082+litzki-systems@users.noreply.github.com>
@litzki-systems

Copy link
Copy Markdown
Contributor Author

@rajnisht7 thanks for the review. All five points are addressed in fd1988a:

  1. The mapping sentence now says §5.3.3 requires the check, not the SDK data structure. The authorization path is deployment policy.
  2. The custom verifier section first lists what §5.3.3 requires of any conformant verifier. The collapsible blocks are now labelled "SDK reference" and show the current implementation as reference only.
  3. The MISMATCH statement is qualified: earlier checks (schema, revocation, validity window, v0.2 envelope appraisal) can end verification first with a different non-VALID result.
  4. A "Known divergence pending resolution" note covers the v0.2 ordering and the None case. Happy to open a separate issue as well if maintainers prefer that.
  5. trusted_key_issuers is described as an SDK-level input that the normative POST /verify body in §5.1 does not define.

rajnisht7
rajnisht7 previously approved these changes Oct 11, 2026

@rajnisht7 rajnisht7 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.

overall changes looks good against SDK 0.15.0 and §5.3.3

one non-blocking point: under the divergence note / custom-verifier section, it would be nice to state explicitly that (1) new conformant verifiers should follow §5.3.3’s auth-before-signature order rather than the SDK v0.2 COSE order, and (2) trusted_key_issuers=None is backward-compatible SDK behaviour, not a conformant §5.3.3 configuration.

Address non-blocking review from rajnisht7: new conformant verifiers follow the §5.3.3 auth-before-signature order, and trusted_key_issuers=None is backward-compatible SDK behavior, not a conformant §5.3.3 configuration.

Signed-off-by: Thorsten Litzki <268185082+litzki-systems@users.noreply.github.com>
@litzki-systems

Copy link
Copy Markdown
Contributor Author

@rajnisht7 thanks for the approval and the follow-up point. Both are now explicit in d54be03:

  1. The divergence note ends with guidance for new conformant verifiers: follow the §5.3.3 order (issuer authorization before signature verification, in both envelopes); the SDK's v0.2 COSE order is not a model to copy.
  2. trusted_key_issuers=None is described as backward-compatible SDK behavior, not a conformant §5.3.3 configuration. "Choose a setting" and the custom-verifier list say the same.

The new commit dismissed your approval automatically. Could you take another look when you have a moment?

@rajnisht7 rajnisht7 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.

Reviewed head d54be03, the guide matches SDK 0.15.0 and §5.3.3: order and None semantics are explicit, mismatch strings line up with the code

@imran-siddique imran-siddique 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.

@litzki-systems all five of rajnisht7's points are in at fd1988a, and the guide describes the SDK as it ships today.

On your question: the SDK follows the spec. Both divergences hold at bd37750. With trusted_key_issuers=None a manifest reached VALID with no issuer authorization, and on v0.2 the signature was checked before the key was authorized. #494 fixes both (UNVERIFIABLE when there is no policy, authorization before the signature), and agentrust-io/cmcp#743 makes the gateway pass an issuer policy, which it never did. When those land, the known-divergence note here comes out.

@imran-siddique
imran-siddique merged commit cb6c031 into agentrust-io:main Oct 12, 2026
17 of 19 checks passed
@litzki-systems

Copy link
Copy Markdown
Contributor Author

@imran-siddique @rajnisht7 thanks for the reviews and the merge, and for turning the two divergences into #494 and agentrust-io/cmcp#743. Once #494 lands I'm happy to send the follow-up that removes the divergence note and updates the None row in "Choose a setting".

imran-siddique added a commit that referenced this pull request Oct 12, 2026
trusted_key_issuers=None now yields UNVERIFIABLE and v0.2 authorizes
before the signature, so the known-divergence note from #493 comes out,
the result tables and vector rows change, and the guide targets 0.16.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>
imran-siddique added a commit that referenced this pull request Oct 13, 2026
…ALID without a policy

Spec 5.3.3 requires key resolution and issuer authorization to complete
before the signature is verified, and forbids VALID when authorization
cannot be determined. The SDK diverged from both, as litzki-systems found
writing the issuer key authorization guide (#493):

- trusted_key_issuers=None skipped the check, so a manifest could reach
  VALID with no issuer authorization. It now leaves the signature
  unverified and returns UNVERIFIABLE with a warning naming 5.3.3,
  distinct from the MISMATCH of a failed check.
- On the v0.2 COSE path the envelope signature was verified before issuer
  authorization. Keys are now resolved and authorized from the decoded
  envelope first; an unauthorized key is refused unchecked
  (AM-VEC-COSE-009 now records signature_verified false).

manifest verify gains --authorized-issuer. Every vector context that
expects a verified signature carries trusted_key_issuers; AM-VEC-025 and
AM-VEC-COSE-016 pin the no-policy case. A v0.1 manifest without issuer can
no longer reach VALID. The issuer guide follows the 0.16.0 behaviour.
Version 0.16.0, not tagged.

BREAKING CHANGE: callers that pass trusted_keys without trusted_key_issuers
now get UNVERIFIABLE instead of VALID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>
imran-siddique added a commit to agentrust-io/cmcp that referenced this pull request Oct 13, 2026
Agent Manifest spec 5.3.3 forbids a VALID manifest whose signing key has
not been authorized for its declared issuer. cMCP never passed an issuer
policy to the SDK, and agent-manifest 0.15.0 skips the check without one,
so any trusted key could sign a manifest naming any issuer and the gateway
would bind it.

The trust anchor now carries an issuers list per key, read by
load_agent_manifest_issuer_policy and passed to the SDK as
trusted_key_issuers. verify_agent_manifest_binding refuses a binding with
no policy, startup stops with AGENT_MANIFEST_BINDING_FAILED, and an
unauthorized key gets its own message. cmcp verify and verify_trace_claim
take the same policy and report the binding unverified without it.

Works with agent-manifest 0.15.0 (pinned) and 0.16.0. Found by
litzki-systems on agentrust-io/agent-manifest#493.

BREAKING CHANGE: a trust anchor without issuers no longer binds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>
imran-siddique added a commit to agentrust-io/cmcp that referenced this pull request Oct 14, 2026
…er (#743)

* fix(agent-manifest)!: authorize the signing key for the manifest issuer

Agent Manifest spec 5.3.3 forbids a VALID manifest whose signing key has
not been authorized for its declared issuer. cMCP never passed an issuer
policy to the SDK, and agent-manifest 0.15.0 skips the check without one,
so any trusted key could sign a manifest naming any issuer and the gateway
would bind it.

The trust anchor now carries an issuers list per key, read by
load_agent_manifest_issuer_policy and passed to the SDK as
trusted_key_issuers. verify_agent_manifest_binding refuses a binding with
no policy, startup stops with AGENT_MANIFEST_BINDING_FAILED, and an
unauthorized key gets its own message. cmcp verify and verify_trace_claim
take the same policy and report the binding unverified without it.

Works with agent-manifest 0.15.0 (pinned) and 0.16.0. Found by
litzki-systems on agentrust-io/agent-manifest#493.

BREAKING CHANGE: a trust anchor without issuers no longer binds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>

* fix(agent-manifest): validate trust-anchor issuers and parse the anchor once

load_agent_manifest_trust_policy reads keys and issuer policy in one
parse; startup and cmcp verify use it, and the two existing loaders
delegate to it. An issuer must be a well-formed SPIFFE ID: a non-empty
trust domain with no userinfo, port, query or fragment, and path
segments that are not empty, "." or "..". A repeated key_id is refused
instead of silently replacing the earlier key.

Tests cover each malformed form carloshvp and rajnisht7 named with valid
controls, a repeated key_id, an empty issuers list, an empty policy, a
key authorized for several issuers, another key's authorization not
covering the signer, the loader's error branches, and that the policy
reaches the SDK context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>

* fix(agent-manifest): refuse a lone-surrogate issuer as malformed, not a traceback

_is_spiffe_id encoded the value to measure its length, and a lone surrogate, which json.loads accepts, raised UnicodeEncodeError instead of returning False. The loader now reports ConfigError. Raised by @rajnisht7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>

---------

Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants