0xMiden / 0xMiden/note-transport-service

No rate limiting or per-client request quotas

オープン
#117 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement production-readiness
主要言語
Rust
スター
3
フォーク
10
平均マージ
2時間 23分
マージ済み PR(30日)
4

説明

Severity: critical (for an internet-facing deployment).

### Summary

There is no per-IP, per-client, or per-RPC rate limiting. The only throttle is a global 4096 in-flight-request limit (`GlobalConcurrencyLimitLayer::new`, `crates/node/src/node/grpc/mod.rs:121`). Remote peer address is never inspected. A single client can saturate the write, read, and stream paths at line rate.

This is the concrete mechanism behind placeholder #44 (spam protection).

### Recommendation

- Add per-IP rate limiting (tower middleware, or document a mandatory upstream proxy/WAF) with separate budgets for writes (`SendNote`) vs reads (`FetchNotes`/`StreamNotes`).
- Add a global write-rate cap.
- Reject with `RESOURCE_EXHAUSTED` rather than queueing (see the concurrency/timeout-ordering note in the papercuts issue).

Related: #44, and the auth-model issue (rate limits are only meaningful once "who is a client" is defined).

---
Part of #114.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。