feat(#79): persist passport audit log per agent - #186
Open
Peolite001 wants to merge 1 commit into
Open
Conversation
- Add PassportAuditEvent schema (issued | authorized | revoked | expired | batch_verified) - Persist to .data/passport-audit.jsonl (append-only, capped at 1000) - Hook appendAuditEvent into issuePassport, authorizePassportSpend, revokePassport, verifyPassportBatch - Add GET /api/protocol/passport/audit?agentId=&limit=50 route - Add authorize and revoke API routes - Add unit tests: issue -> authorize -> revoke -> audit list shows 3 events in order
Contributor
Author
|
pls merge |
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
Implements per-agent passport audit logging. All
issue,authorize,revoke,expired, andbatch_verifiedevents are now persisted to.data/passport-audit.jsonl(JSONL, append-only, capped at 1000 events). A newGET /api/protocol/passport/audit?agentId=&limit=50endpoint returns the last N events for a given agent, newest-first.Checklist
npm testpasses).Related Issues
Closes #79
Files Changed
lib/passport/audit-log.tslib/passport/passport.tsauthorizePassportSpend, hookappendAuditEventapp/api/protocol/passport/audit/route.tsapp/api/protocol/passport/authorize/route.tsapp/api/protocol/passport/revoke/route.tsapp/api/protocol/passport/batch-verify/route.tslib/passport/audit-log.test.ts