Repository navigation
docs(id): comms abuse controls investigation — blocks, rate limits, per-counterparty budgets (#2032) - #2243
Conversation
…er-counterparty budgets (#2032)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 699e1f0cb4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - **No byte accounting at all.** There is no counter of bytes or frames per peer, per | ||
| connection or app-wide, so "max MB per window" cannot be evaluated today. This is the | ||
| single hardest prerequisite in the issue. |
There was a problem hiding this comment.
Include existing event-sync accounting in the control inventory
The production /id-sync/1 path already has byte accounting and an enforced session budget: commands/serve.rs:961-965 registers EventSyncProtocol, event_store/sync.rs:343-381 charges reconciliation reads before buffering or decoding, and Outcome records control/data bytes. The default reconciliation budget is 64 MiB (event_store/range.rs:47-52). These are not rolling per-peer budgets, but they contradict the claim that no per-connection accounting exists and materially change the proposed prerequisite work. Include this active transport and its existing protections in the inventory, distinguishing reusable session accounting from the missing cross-session aggregation.
Useful? React with 👍 / 👎.
| - **No `Retry-After`.** #2 and #5 refuse with prose. There is no structured retry value | ||
| and no `429` on any web route. A client cannot back off correctly, so it retries. |
There was a problem hiding this comment.
Distinguish missing retry metadata from existing HTTP 429 responses
The inspected baseline already returns HTTP 429: web/routes.rs:1202-1215 returns StatusCode::TOO_MANY_REQUESTS when the save cooldown fires, and web/world_ws.rs:209 maps Refusal::RateLimited to the same status. The missing Retry-After metadata is a valid gap, but describing HTTP 429 as entirely absent misstates the existing behavior and the HTTP work required by the proposed shipping plan. Correct this distinction here and in the summary table.
Useful? React with 👍 / 👎.
|
|
||
| | Key kind | Semantics | Enforced at | Notes | | ||
| |----------|-----------|-------------|-------| | ||
| | **Public key** (`Key`, the endpoint ID) | *Permanent*: refuse to open sessions, serve blobs, accept gossip or render their objects | `connectivity.rs` accept path + every frame entry + view filter | The reliable one. Rotation is possible but costs the abuser their reputation and petname | |
There was a problem hiding this comment.
Separate account-author blocks from transport-endpoint blocks
When an account's signed objects arrive through another node, blocking its transport endpoint cannot implement the promised account-level rendering block. groups/mod.rs defines Key as an account key, whereas artifact.rs:146-163 separately models the endpoints hosting an account's artifacts; envelope_net.rs:1-7 explicitly trusts the payload signature rather than the delivering node. Petnames also belong to accounts (petname.rs:34-37), so changing transport endpoints need not sacrifice them. Distinguish endpoint denies used for connection control from account/author blocks used for rendering and identity-scoped policy, rather than treating both identities as the same key.
Useful? React with 👍 / 👎.
…sites, allow-list, unwired gates, collab gap (#2032)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 006aaa68ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| live-document path and it has neither a size cap nor a rate limit**: the upgrade at | ||
| `web/collab.rs:632` sets no `max_message_size`, and nothing counts `STEPS`/`CURSOR`. |
There was a problem hiding this comment.
Account for the collaboration socket's inherited size limits
The collaboration handler uses Axum's default WebSocket configuration, which already limits inbound messages to 64 MiB and frames to 16 MiB; omitting an explicit max_message_size(...) call does not disable those limits. These defaults are documented in the Axum documentation. The proposed 1 MiB limit and missing rate limiter remain valid work, but describe this as tightening an existing framework cap rather than closing an unlimited-message path, including in L1 and the P0 shipping rationale.
Useful? React with 👍 / 👎.
| - **`PullPolicy` { Open (default), Members } / `PullGate`** — | ||
| ([`pull_policy.rs:30-80`](../../../pkgs/id/src/pull_policy.rs)); `id serve` does not read | ||
| it and no session builds a gate from it (`:17-19`). |
There was a problem hiding this comment.
Distinguish the active pull gate from missing configuration wiring
The production event-sync path already constructs and checks a PullGate: event_sync.rs:68-69,92-95 creates an open gate, its accepting handler passes that gate into sync_session, and event_store/sync.rs:439-441 checks it before sending events. This handler is registered by commands/serve.rs:961-965. The missing work is selecting an operator-configured policy instead of the hard-coded open policy, not wiring a designed-but-unused gate into sessions. Correct this distinction here and in the shipping plan so the synthesis can reuse the existing enforcement path.
Useful? React with 👍 / 👎.
Investigation deliverable for #2032 (LIST 8, ID platform expansion #2056), feeding the synthesis in #2033.
What this adds
One dated record:
doc/2026-10-29T10-55-00Z_investigation_comms_abuse_controls/.pkgs/idtoday, with defaults and file:line: frame cap 1 MiB, world chat 50/10 s,WorldLimits, web save 5 s, directory-auth resend/nonce limits.Retry-After/429on any path, no config keys for abuse controls (ServerConfigholds only users/groups/create/policy).Notes
Need help on this PR? Tag
@codesmith-botwith what you need.