Skip to content

Serve tag enumeration and identity lookup from immutable authorization snapshots - #30

Closed
ekarulf wants to merge 1 commit into
mainfrom
codex/issue-22
Closed

ekarulf wants to merge 1 commit into
mainfrom
codex/issue-22

Conversation

@ekarulf

@ekarulf ekarulf commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Publish one immutable map snapshot for each authorization generation. ClientHello tag resolution enumerates that index; finish and installed-session checks look up known PeerIDs directly. Keys are copied at construction and return, and the CLI atomically replaces the snapshot under its existing lock. Existing test enumerations use an explicit adapter; production publishes prebuilt snapshots for expected O(1) lookup.

Validation: full root Go race suite and vet passed. Tests cover snapshot immutability, key replacement, and revocation through both access paths. Protocol docs preserve candidate-testing and metadata limitations and distinguish map complexity from constant-time cryptography.

Priority 7 of 7: authorization performance. Fixes #22. This changes the test/server authorization API; adapt #21's new outage test when combining them.

Independent subagent code review completed before publication; blocking findings were corrected and the final deltas re-reviewed. Left as a draft for owner review; no merge or deployment requested or performed.

ekarulf commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Rework requested before merge.

Please remove the per-candidate public-key copy from the blinded-tag scan. AuthorizationSnapshot.All() clones each full ML-DSA public key before resolve tests that candidate's ID. An unknown tag therefore copies every key in the paired set. Keep the snapshot immutable and resolve inside the snapshot, or enumerate IDs and copy only the matched key. The periodic validity check can also compare the pinned public key inside the snapshot without returning a copy. Please add an allocation check for scanning misses and update the existing complexity descriptions in PROTOCOL.md and DESIGN.md §14, which still say finishes and session checks scan all peers. On rebase, also adapt the authorization callbacks added by #26 and #29.

@ekarulf ekarulf closed this Dec 3, 2026
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.

Expose identity lookup and tag enumeration from one authorization snapshot

1 participant