richardcase / richardcase/clowder
M7d follow-ups — remote TLS/auth polish
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 16
Description
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 atclowder remote-token(which reads the state-dir file) instead, or writing it to a0600file 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 --rotatethat 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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/remote-tls.md and the M7d design spec, then inspect crates/clowder-daemon/src/main.rs and remote_tls.rs::load_or_generate. Focus on the two concrete follow-ups before the design-only items: prevent startup credentials from being exposed in logs and ensure token rotation does not invalidate the certificate or TOFU pin. No tests are named in the issue, so confirm the acceptance criteria with maintainers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- authentication, cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 54/100