Skip to content

Align verification steps and error mapping with signature-key -08 - #63

Merged
dickhardt merged 1 commit into
mainfrom
sigkey08-verification-errors
Aug 6, 2026
Merged

dickhardt merged 1 commit into
mainfrom
sigkey08-verification-errors

Conversation

@dickhardt

Copy link
Copy Markdown
Owner

Stack 3 of 7. Base: sigkey08-algorithms (#62). Fixes #58.

The six-step verification procedure predated -08 in three ways: it read the algorithm before resolving the key, it had no defined path for an unrecognized Signature-Key scheme, and it performed the metadata issuer check without reporting a registered error code.

Changes

  • Reordered the steps so the algorithm is read from the key the scheme resolved to. Under scheme=jwt that key is the cnf.jwk of the presented token, which the server does not hold until the assertion has verified — the old ordering was not implementable as written.
  • Added the unsupported_scheme step that -08 makes mandatory and conformance-testable, with Accept-Signature-Scheme naming what the server accepts, plus a subsection for the AAuth case where jwt is the only accepted scheme. AAuth said agents MUST NOT use other schemes but never said what a server does on receipt.
  • Replaced the vague algorithm step with the specific checks: unsupported_algorithm (with Accept-Signature-Alg) for absent, polymorphic, or unimplemented; invalid_key where kty/crv disagrees with alg.
  • Mapped the metadata issuer check to issuer_missing / issuer_mismatch, and required issuer to be present rather than only to match.
  • Stated the 401 profile explicitly. -08 uses 400 for most signature failures and permits 401 for recoverable ones; AAuth pins 401. That divergence is now declared rather than implicit. Also states that a 403 carries none of the three signature headers, per -08 §Access Denied — this affects the AAuth errors returned with 403.
  • Forbade the alg signature parameter and discouraged keyid, per RFC 9421 §3.3.7 and §5.1.
  • Rewrote the requirement=agent-token comparison, which described the sigkey parameter of Accept-Signature — removed outright in -08.

On #58

The issue's central example (supported_algorithms=(...)) no longer exists; -08 removed that member in favour of Accept-Signature-Alg, which works on a challenge and an error alike. This PR closes #58 with the header path only and does not add the proposed request_signing_alg_values_supported metadata field: Ed25519 is a MUST-support floor on both sides, so a conformant agent never reaches the error, and the field would be surface without a failure case to justify it.

Accept-Signature-Scheme is likewise not added to AAuth challenges — AAuth-Requirement: requirement=agent-token is strictly more specific, saying "an aa-agent+jwt" rather than merely "the jwt scheme". It appears only on the error path, and mixed-mode resources may list more.

🤖 Generated with Claude Code

https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls

@dickhardt
dickhardt force-pushed the sigkey08-algorithms branch from 11cf423 to 0181182 Compare August 6, 2026 07:30
@dickhardt
dickhardt changed the base branch from sigkey08-algorithms to main August 6, 2026 07:31
The six-step verification procedure predated -08 in three ways: it read
the algorithm before resolving the key, it had no defined path for an
unrecognized Signature-Key scheme, and it performed the metadata issuer
check without reporting a registered error code.

- Reordered so the algorithm is read from the key the scheme resolved
  to. Under scheme=jwt that key is the cnf.jwk of the presented token,
  which the server does not hold until the assertion has verified.
- Added the unsupported_scheme step that -08 makes mandatory and
  conformance-testable, with Accept-Signature-Scheme naming what the
  server accepts, plus a subsection for the AAuth case where jwt is the
  only accepted scheme.
- Replaced the vague algorithm step with the specific checks, reporting
  unsupported_algorithm with Accept-Signature-Alg, and invalid_key where
  kty or crv disagrees with alg.
- Mapped the metadata issuer check to issuer_missing and issuer_mismatch,
  and required issuer to be present rather than only to match.
- Stated the 401 profile explicitly, since the base spec uses 400 for
  most signature failures, and that a 403 carries none of the three
  signature headers.
- Forbade the alg signature parameter and discouraged keyid per RFC 9421
  Sections 3.3.7 and 5.1.
- Rewrote the requirement=agent-token comparison, which described the
  sigkey Accept-Signature parameter that -08 removed.

Fixes #58

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls
@dickhardt
dickhardt force-pushed the sigkey08-verification-errors branch from ee4a4df to d34eba7 Compare August 6, 2026 07:33
@dickhardt
dickhardt merged commit 4cfedc4 into main Aug 6, 2026
@dickhardt
dickhardt deleted the sigkey08-verification-errors branch August 6, 2026 08:07
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.

Metadata should declare which signing algorithms a server accepts, not just what it signs with

1 participant