Add external signature verification endpoint#90
Merged
Conversation
- POST /api/v1/verify checks pilot-req-v1 envelopes against registered node keys; uniform valid:false failures (no existence oracle); signed verdicts, negatives included - GET /api/v1/verify/keys publishes the verdict issuer key - verdict key auto-generated and persisted next to the snapshot (vfy-v1) - online = last_seen within 180s, decoupled from the reaper threshold - dashboard.verify breaker, 60/min per-IP limit, 8KB body cap - JSON lookup responses gain last_seen_unix and key_generation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
POST /api/v1/verify: verifiespilot-req-v1envelopes against registered node keys — proves a request comes from a registered Pilot node, not just any ed25519 keyvalid:falsefailures (no node-existence oracle); signed verdicts (negatives included) checkable offline viaGET /api/v1/verify/keysonline= last signature-verified heartbeat within 180s — deliberately decoupled from the 30-min reaper threshold (which would make the flag vacuous)vfy-v1, 0600)dashboard.verifybreaker, 60/min per-IP rate limit, 8KB body cap, POST-onlylast_seen_unix+key_generation(additive; binary path untouched)Depends on pilot-protocol/common#34 (
reqsig). Pin bump to the next common release follows on this branch. Spec: pilotprotocoldocs/SIGNATURE-VERIFICATION.md.Testing
16 new tests: verdict round-trip against the published key, uniform-failure shape across all failure kinds, online-window flip, key persistence/0600/corrupt-file, HTTP 200/400/405/503/429. Full suite green.
🤖 Generated with Claude Code