0xMiden / 0xMiden/note-transport-service
Define and enforce a trust/auth model for all RPCs
- Lingua principale
- Rust
- Stelle
- 3
- Fork
- 10
- Merge medio
- 2h 23m
- PR unite (30g)
- 4
Descrizione
Severity: critical (product decision).
### Summary
None of the four RPCs (`SendNote`, `FetchNotes`, `StreamNotes`, `Stats`) have any authentication or authorization. The server is built with only CORS, grpc-web, a global concurrency limit, and a request timeout (`crates/node/src/node/grpc/mod.rs:117-126`); there is no interceptor, API key, or mTLS anywhere. gRPC reflection additionally advertises the full API surface (`mod.rs:103-109`).
This is not necessarily a bug — an open, privacy-by-tag relay may be the intended design — but it is currently implicit. It needs to be an explicit, documented decision, because every abuse-resistance control in the meta-issue depends on the answer.
### Options
- **Open relay by design:** then rate limiting (#117), storage quotas (#118), and note validation (#116) become mandatory compensating controls, and this should be stated in the operator docs and proto.
- **Gated:** add an auth interceptor (API key / mTLS) at least for `SendNote` and `Stats`.
### Acceptance
- The trust model is documented (README + operator docs + proto comments).
- If open-by-design, the compensating-control issues are linked as blockers to GA.
Related: #44, #47.
---
Part of #114.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziate leggendo la configurazione del server gRPC in crates/node/src/node/grpc/mod.rs, righe 103-126. Esaminate i quattro metodi RPC (SendNote, FetchNotes, StreamNotes, Stats) e gli intercettori esistenti. La decisione sul modello di fiducia (relay aperto vs. controllato) deve essere presa per prima. Se si implementa l'autenticazione, considerate l'aggiunta di un intercettore per chiavi API o mTLS, concentrandosi su SendNote e Stats. Documentate il modello nel README, nella documentazione per gli operatori e nei commenti del proto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- grpc, rust
- Ambito
- authentication, authorization, backend-api-design, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100