M7d follow-ups — remote TLS/auth polish

Aperta
#57 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Inizia da docs/remote-tls.md e dalla specifica di progettazione M7d, quindi esamina crates/clowder-daemon/src/main.rs e remote_tls.rs::load_or_generate. Prima degli elementi esclusivamente di progettazione, concentrati sui due follow-up concreti: impedire che le credenziali di avvio vengano esposte nei log e assicurarti che la rotazione dei token non invalidi il certificato né il pin TOFU. Nell’issue non sono indicati test, quindi conferma i criteri di accettazione con i maintainer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement priority: high rust

Context

M7d (#53) shipped opt-in TLS + bearer-token auth + TOFU for the remote daemon. These are the deferred minors from its review and threat model (docs/remote-tls.md, docs/superpowers/specs/2026-08-03-clowder-m7d-remote-tls-auth-design.md). None block use; all are polish/hardening.

Note: the "exposure warning still says NO authentication under TLS" minor was already fixed in the cleanup batch (#54).

Follow-ups

  • Token logged in cleartext at info-level (crates/clowder-daemon/src/main.rs) — the bearer token is printed to the daemon log on startup so the operator can copy it, but it then lands in any log aggregation. Consider redacting from the log and pointing operators at clowder remote-token (which reads the state-dir file) instead, or writing it to a 0600 file only.
  • Credential rotation is all-or-nothing (crates/clowder-daemon/src/remote_tls.rs::load_or_generate) — it only takes the "load" path when all three files (remote-cert.pem, remote-key.pem, remote-token) exist; deleting any one regenerates all three, so "rotate the token" silently also rotates the cert and breaks every client's TOFU pin. Consider independent token rotation (e.g. clowder remote-token --rotate that regenerates only the token) and/or an explicit --rotate-cert.

Larger deferred items (design-only in the M7d spec)

  • mTLS / client certificates — channel-bound client auth instead of a bearer token.
  • QUIC transport (quinn) — if roaming/mux ever matters (M7 deliberately deferred this; TCP+TLS is adequate for a terminal).
  • Configured-fingerprint pin / pairing UX — an alternative to TOFU that closes the first-connect window (a single pasted "pairing string" of fingerprint + token).
  • macOS Keychain storage for the client token (currently config/env only; the Rust forwarder would need security-framework).
Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di richardcase/clowder

Tutte le issue di richardcase/clowder

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.