Repository navigation
feat(api): say which machine a request came from, and which app it looks like - #90
Merged
Merged
Conversation
…oks like Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
fylorn
added a commit
that referenced
this pull request
Sep 22, 2026
Requests say which machine they came from and which app they look like (#90). Additive; CONTROL_API_VERSION unchanged. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Every request record, and every security log entry, now says which machine the request came from when it was not this one, and carries the app the headers point to.
Why
The desktop app showed the gateway key's name where it said "client". With keys named after apps, that read as "Codex sent this", which it does not mean: a key can be called anything, several apps can share one, and once the gateway is opened to the local network, several machines can share one too. The security log in particular has to answer "who sent this credential out", and the key alone cannot.
What changes
peer: the address on the other end of the connection. It cannot be forged. Loopback is not recorded, because nearly every request comes from this machine. The gateway already read it forallow_from; it now travels onRequestStartedandLocallyAnswered, intorequests.peer(schema 15), and out throughHistoryRowandSecurityEventView.client_hint: the app the request headers point to, which core already recorded but never handed out. It can be forged and is for display only, as before; the identity is still the key. It now also comes out throughHistoryRowandSecurityEventView, and locally answered probes record it too; they used to drop it.Additive;
CONTROL_API_VERSIONunchanged.Tests
peer_ofdrops loopback, including the IPv4-mapped form a dual-stack listener sees, and keeps a LAN address.peer, an old row reads as none rather than "this machine", and the migration test drops the new column in its simulated old database.cargo test --workspace(1511 passed),clippy -D warnings,fmt, andscripts/smoke.sh(51 passed).🤖 Generated with Claude Code