docs(rfc): propose auditing what the broker refuses before the gate
Problem
A Broker audits each request it passes to its gate. It refuses some things before the gate sees them, and those leave no event:
- a peer whose uid isn't admitted, or can't be read
- a connection past
max_connections - a protocol error on an admitted connection: a frame over 1 MiB, bytes past the declared length, an attached descriptor, or a request that doesn't parse
These are the intrusion-detection signals RFC 0002 audits for: another user probing the socket, or a compromised worker sending a descriptor.
Change
RFC 0011 proposes:
- Two operations.
connect, with reasonsok,peer_refused,connection_limit, andno_thread.request, with reasonsframe_too_large,malformed_frame, andmalformed_request. Each refusal is exactly one event. - One new key.
peer_uidis added within format version 1, and in Rust it'sAuditEvent::peer_uid.
Events go through the sink already on the broker's gate, so there's no new API to receive them. AuditOp, AuditReason, and AuditEvent are #[non_exhaustive], so this isn't a breaking change.
This reverses RFC 0007's decision 3, that a refused peer produces no event, and the RFC says so. That follows the maintainer's choice from the internal review to audit protocol refusals. The RFC asks three questions:
- Should an admitted connection also produce an
allowevent? - A refused peer can flood a synchronous sink. Is relying on the sink's backpressure enough?
- Should
openand the other operations carry the peer's uid, as a later RFC?
It also adds the roadmap item under M9.
Verification
Docs only. Checked against the code:
broker.rs::serve_withrefuses peers and the limit withcontinue, and emits no event.serve_connandread_framereturn the four protocol errors listed.- The peer uid comes from
SO_PEERCREDon Linux andgetpeereidon macOS (broker_sys.rs). fsgate-brokerhas no audit option outside--experimental-intercept, so this applies to library embedders.
Nothing was implemented or run.
Documentation and release
No behavior change and no changelog entry. If accepted, the implementation updates RFC 0002's field list, RFC 0007's decision 3, the threat model's audit section, and the changelog under Added.
Decisions
The maintainer accepted the RFC as written, and the second commit records it:
- Admitted connections produce an
allowevent. - There's no rate limit.
- A peer's uid on
openand other operations waits for a later RFC.
The roadmap marks the RFC item done and adds "Implement RFC 0011".