test(sdk): adversarial coverage for multi-surface crown-jewel capabilities (matrix R1)#357
Draft
bordumb wants to merge 1 commit into
Draft
test(sdk): adversarial coverage for multi-surface crown-jewel capabilities (matrix R1)#357bordumb wants to merge 1 commit into
bordumb wants to merge 1 commit into
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Auths Commit Verification
Result: ❌ 0/1 commits verified How to fixCommit 1. Install auths macOS: 2. One-time setup (creates your identity and configures Git) auths init3. Sign this branch and push auths sign origin/main..HEAD
git push --force-with-leaseFor CI to verify the signer, commit an identity bundle: auths id export-bundle --alias main --output .auths/ci-bundle.json --max-age-secs 31536000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 wereadd_scoped(1 direct) andrevoke_batch(2). This PR fills only the genuine gaps:revoke_batchAgentNotFound)add_scopedauthenticate_presentationverify_chainverify_with_keys8 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.rsexplicitly fakes the crypto (FakeVerifier) and tests only the realChallengeStore+ 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.