Skip to content

test(sdk): adversarial coverage for multi-surface crown-jewel capabilities (matrix R1)#357

Draft
bordumb wants to merge 1 commit into
mainfrom
test/sdk-multisurface-r1
Draft

test(sdk): adversarial coverage for multi-surface crown-jewel capabilities (matrix R1)#357
bordumb wants to merge 1 commit into
mainfrom
test/sdk-multisurface-r1

Conversation

@bordumb

@bordumb bordumb commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Matrix R1 — adversarial SDK coverage for the multi-surface crown-jewel capabilities

The capability matrix (recurse/matrix) flagged five capabilities as reached from 2+ front doors or as the highest-risk remote cells: authenticate_presentation, add_scoped, revoke_batch, verify_chain, verify_with_keys. Per the architecture (thin front doors, logic in the SDK, tested once / used everywhere), their adversarial coverage belongs at the SDK/verifier layer — one test there covers CLI + API + MCP + FFI at once — never per-surface.

Honest scoping (no padding)

An audit found three of the five already well covered: verify_chain (9 tests), verify_with_keys (14), authenticate_presentation (8). The thin ones were add_scoped (1 direct) and revoke_batch (2). This PR fills only the genuine gaps:

capability new adversarial cases
revoke_batch empty-list clean no-op · mixed live/already-revoked seals only the live member but reports the whole set · unparseable did fails closed (AgentNotFound)
add_scoped a strict narrowing of the delegator scope is allowed · an empty scope is a valid capability-less delegation
authenticate_presentation a mis-sized (31-byte) nonce is a 400 at the wire boundary — before any challenge/signature is trusted
verify_chain a revoked + expired attestation is rejected with a terminal status (the two signals don't cancel)
verify_with_keys a valid signature verified under the wrong key is rejected (distinct from a tampered signature)

8 new tests, all green (cargo nextest run -p auths-sdk -p auths-verifier).

Redundancy audit (the "no redundant tests floating around" ask)

Nothing to remove. auths-api/tests/cases/rp_auth.rs explicitly fakes the crypto (FakeVerifier) and tests only the real ChallengeStore + middleware translation — a correct thin boundary test, not a logic duplicate. No CLI/MCP test calls these SDK functions directly. The layering is already respected.

Part of matrix ROADMAP_2 R1.

…abilities (matrix R1)

The capability matrix flagged five capabilities as reached from multiple front
doors (or, for the agent-issuance ones, the highest-risk remote API cells).
Per the architecture (thin front doors, logic in the SDK, tested once), their
adversarial coverage belongs at the SDK/verifier layer, not per-surface. The
audit found verify_chain (9), verify_with_keys (14), and authenticate_presentation
(8) already well covered; the thin ones were add_scoped (1) and revoke_batch (2).

Fills the genuine gaps (no padding of already-covered paths):
- revoke_batch: empty-list no-op; mixed live/already-revoked seals only the live
  member but reports the whole set; an unparseable did fails closed (AgentNotFound).
- add_scoped: a strict narrowing of the delegator scope is allowed; an empty
  scope is a valid capability-less delegation.
- authenticate_presentation: a mis-sized (31-byte) nonce is a 400 client error,
  rejected at the wire boundary before any challenge/signature is trusted.
- verify_chain: a revoked+expired attestation is rejected with a terminal status.
- verify_with_keys: a valid signature verified under the wrong key is rejected
  (distinct from a tampered signature).

Redundancy audit: no per-surface logic tests to remove — auths-api/rp_auth.rs
fakes the crypto and tests only the real ChallengeStore + middleware translation,
and no CLI/MCP test calls these SDK functions directly.

Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd
Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd
Auths-Anchor-Seq: 1
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Jun 24, 2026 10:49pm

@github-actions

Copy link
Copy Markdown

Auths Commit Verification

Commit Status Details
b2f5a1d8 ❌ Failed No signature found

Result: ❌ 0/1 commits verified


How to fix

Commit b2f5a1d8 has no Auths signature (no Auths-Id/Auths-Device trailer).

1. Install auths

macOS: brew install auths
Linux: Download from releases

2. One-time setup (creates your identity and configures Git)

auths init

3. Sign this branch and push

auths sign origin/main..HEAD
git push --force-with-lease

For CI to verify the signer, commit an identity bundle:

auths id export-bundle --alias main --output .auths/ci-bundle.json --max-age-secs 31536000

Quickstart →

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