0xMiden / 0xMiden/note-transport-service

No TLS on the gRPC server; missing HTTP/2 connection hardening

未關閉
#120 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement production-readiness
主要語言
Rust
星號
3
分支
10
平均合併
2 小時 23 分鐘
30 天內合併 PR
4

描述

Severity: high.

### Summary

The server is plaintext-only. `tonic` is built without any `tls-*` feature (`Cargo.toml:126`) and `serve()` sets no TLS config (`crates/node/src/node/grpc/mod.rs:117-126`). Note *contents* are encrypted, but tags, cursors, and note headers travel in cleartext and traffic can be MITM'd/tampered.

Separately, no HTTP/2 hardening is configured: no `max_concurrent_streams`, `http2_keepalive_interval`/`timeout`, `tcp_keepalive`, or header-read timeout. `accept_http1(true)` also enables grpc-web (HTTP/1.1), where slow-header/body trickle applies. The 4 s `TimeoutLayer` only covers a request *after* dispatch.

### Recommendation

- Either add tonic TLS config, or document a hard requirement for a TLS-terminating proxy and bind only to localhost/private interfaces by default.
- Set `max_concurrent_streams`, keepalive, and `tcp_keepalive` on the builder.

---
Part of #114.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。