Repository navigation
docs(rfc): RFC-0010 — TOML configuration file - #112
Conversation
Adds RFC-0009 (Draft), the keystone Phase-2 workstream: one shape-determining decision — adopt a TOML configuration file as QuantumSSH's configuration interface from Phase 2. Sets the shape (schema-versioned, fail-closed on unknown keys and insecure permissions, restart-time-loaded, operator-trusted, CLI>config>default precedence) and reserves the extensible home the deferred surfaces plug into: RFC-0008's trusted_user_ca_keys slot, ADR-0023's env policy, ADR-0022's per-source limits, and the Phase-3 privsep key->UID/PAM/rlimit sections. Grounds the permission check in the existing threat-model §5.5.3 world-readable refuse-to-start mandate (generalised to writability of every trusted file the config names) and §4.4 config integrity. Exact keys, retained CLI flags, and the TOML crate are left to implementing ADRs per the one-decision-per-RFC discipline. Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
Review: RFC-0009 — TOML configuration fileVerdict: Approve. One design observation, no blocking findings. Findings1. The RFC (line 133–136) anchors the writability-check-on-all-trusted-files rule on threat-model §5.5.3, which mandates refuse-to-start for world-readable host keys only. The RFC generalizes this to writability (the integrity threat) and extends it to every file the config references — CA trust files, This is correct engineering: an attacker-writable config is worse than an attacker-readable one (§4.4 config integrity). But the RFC should acknowledge that the generalization is new policy, not a mechanical restatement of §5.5.3. The implementing ADR should close this gap by citing RFC-0009 as the authority for the writability extension, not §5.5.3 alone. 2. All cross-references are valid and correctly anchored (positive) The RFC grounds every section in existing authoritative documents that demonstrably defer their configuration surface here:
3. Config is correctly sited outside the highest-trust surface (positive) The RFC (lines 99–101, 126–128) explicitly places config parsing in the synchronous startup path, not on the pre-auth wire path. This respects the §4.1/§4.4 boundary separation and means the bounded-allocation/fuzzable mandate of §4.1 does not bind the TOML parser with equal force. The implementing ADR must preserve this property: config parsing must never drift into the per-connection hot path. 4. Schema versioning mirrors ADR-0021/ADR-0024 freeze discipline (positive) The Classification summary
|
There was a problem hiding this comment.
Pull request overview
Adds RFC-0009 (Draft) to define the shape-determining decision that QuantumSSH will adopt a schema-versioned, fail-closed TOML configuration file as the primary configuration surface starting in Phase 2, with documented precedence (CLI > config > default) and strict permission validation for trusted files.
Changes:
- Introduces a new RFC describing the TOML config file interface, schema-versioning, and fail-closed parsing/permissions model.
- Documents intended config sections (
server,auth,limits,logging,session) and how they relate to existing ADR/RFC requirements. - Captures key operational/security failure modes (unknown keys, unsupported schema versions, insecure permissions).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR #96 (open since 2026-07-02) already claims RFC-0009 for the zero-legacy-moving-frontier amendment. Yield the number to the senior claimant and take 0010 for the configuration-file RFC; the process assigns numbers by merge order, but two live 0009 drafts are needlessly confusing. Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
Review: RFC-0010 — TOML configuration fileVerdict: Approve with comments. Three findings, one blocking. Findings1. Permission-check shape fails to satisfy §5.5.3 (blocking) The RFC (line 136) defines the fail-closed permission check as "owner-writable-only" and states it "generalises" §5.5.3. But §5.5.3 mandates refuse-to-start when the host-key file is world-readable — a confidentiality check, not an integrity check. A host private key with mode Anchored to: Threat model §5.5.3, CLAUDE.md "Key material is never exposed." 2. RFC number is inconsistent across title, filename, and body (non-blocking) PR title calls it RFC-0009. The file is 3. Line 87 shows a glob Positive confirmations
Classification summary
|
…dentiality Review (claude[bot] + Copilot): Property 3 collapsed two orthogonal controls into one and, by framing the check as writability 'rather than only readability', silently dropped the threat-model §5.5.3 world-readable-host-key mandate — a mode-0644 host key would have passed. Split them explicitly across the guide-level, reference-level, and failure-modes sections: - Integrity (writability): config + every trusted file it names must be owner-writable-only (§4.4). The RFC's contribution — generalise it to every referenced trust file. - Confidentiality (readability): the private host key must also be owner-readable-only. The existing §5.5.3 mandate, carried over unchanged, NOT replaced by the writability check. The host key is subject to both. Also qualify the two bare 'commitment #4' references as 'MANIFIESTO commitment #4' (Copilot), matching RFC-0007's style. Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
Review (claude[bot]): the Motivation claimed three documents 'defer their configuration to the Phase-2 config file', listing ADR-0022 as the third — but ADR-0022 never mentions a config file; it defers the per-source rate-limit FEATURE to Phase 2's concurrent accept loop, and that text is in its Decision section, not Consequences. Only RFC-0008 and ADR-0023 explicitly name the config file. Reword to separate the feature deferral from the config deferral (matching the RFC's own Summary phrasing) and fix the section anchor to §Decision, here and in the schema-shape table. Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
Review: RFC-0010 — TOML configuration fileVerdict: Approve with minor comments. The two previous blocking findings (permission-check shape conflating integrity with confidentiality, and unqualified "commitment #4" references) are resolved in the current revision. Two non-blocking observations remain. Findings1. ADR-0022 is mischaracterized as "explicitly deferring configuration" — and the section reference is wrong (non-blocking) Lines 36–41 claim three documents "explicitly defer their configuration to 'the Phase-2 config file'", listing ADR-0022 as the third with a
The RFC's own Summary (line 24) correctly distinguishes the ADR-0022 case — "lands with Phase 2" vs "defers to config" — creating an internal inconsistency. The same §Consequences citation reappears in the schema table at line 174. Anchored to: CLAUDE.md "one decision per RFC" — the implementing-ADR authors use these cross-references. Overstating them misleads about the source of authority. Suggested fix: Replace lines 36–41 with wording that separates the two cases:
And bump the table reference at line 174 from 2. RFC-0009 is skipped without in-file explanation (hygiene, non-blocking) The repo has RFCs 0001–0008 and now 0010. The reason for the skip is in the PR body only (PR #96 claims 0009 for a zero-legacy amendment). A brief footnote or a Addressed from previous reviews
Positive confirmations
|
|
Now I have a complete picture. Let me trace the resolution of prior review findings against the current file text. Review: RFC-0010 — TOML configuration fileVerdict: Approve. All three prior review findings are resolved in the current text. One minor observation on cross-reference formatting. Resolution of prior findingsFinding 1 (permission checks — was blocking). Resolved. The RFC now explicitly defines two orthogonal controls at lines 138–153: integrity (writability) on config/trust files + confidentiality (readability) on the host private key per §5.5.3. The Failure modes list (lines 199–201) enumerates both. A mode- Finding 2 (ADR-0022 mischaracterization). Resolved. Lines 39–43 now separate the claim into two categories: two documents (RFC-0008, ADR-0023) that explicitly defer configuration; a third (ADR-0022) that defers the feature to Phase 2 and "will need its configuration here." The §Decision citation is correct (the deferral text is at ADR-0022 line 41 in the Decision section). Finding 3 (RFC numbering inconsistency). Resolved. Title, filename, and body are all RFC-0010. The 0009→0010 renumbering is justified (PR #96 already claimed 0009) and documented in the PR body. Finding 4 (commitment #4 without qualified source). Resolved. Line 189 and line 262 both read "MANIFIESTO commitment #4." Remaining observationCross-reference Positive confirmations
|
Re-review (claude[bot] + Copilot) on the corrected draft: - StrictModes overstated (2 threads): the check specified only mode bits while claiming full StrictModes equivalence, leaving two real bypasses (attacker-owned 0600 file; correctly-moded file in a group-writable directory). Extend the shape to name all three predicates — mode, ownership (root or service UID), and the parent-directory chain — in guide- and reference-level. - authorized_keys citation: §4.2 (process boundary) is the section that names authorized_keys in the permission-trusted set, not §4.4 (config-file scope). Fixed; §4.4 kept for the integrity goal. - Confidentiality check described as 'carried over unchanged' but it tightens §5.5.3's world-readable to also reject group-readable (0640). Reframed as an explicit extension. - Crypto-migration future-possibility now bounded by MANIFIESTO #2: no non-hybrid/classical-only KEX may ever be expressible via config (no downgrade path). Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
|
Here's my review of the current RFC state (commit Review: RFC-0010 — TOML configuration fileVerdict: Approve. All prior review findings are resolved. One commit-history hygiene note remains. Resolution of prior findingsAll five final-round claude findings (02:52:57Z–02:55:15Z) are resolved in the current revision:
Remaining finding (non-blocking)Commit Positive confirmations
|
Re-review (claude[bot]): - The error codes used ADR-0024's dot-notation event-name convention (config.insecure_permissions), so an implementor could read them as new tracing events and silently extend the frozen schema. Add a lead-in stating they are message-field values of the existing server.config_error event, no new event names; strip the config. prefix from each so they no longer look like event targets. - The blanket 'All are startup errors' swept in the flag-precedence case, which is not an error (the server boots). Carve it out: the first five abort via server.config_error, the precedence override is an info note and startup continues. Part of #109. Claude-Session: https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud Signed-off-by: Gonzalo Fleming <[email protected]>
Review: RFC-0010 — TOML configuration fileVerdict: Approve. The RFC has been through five review rounds across three automated reviewers (Copilot, Resolution of prior findings
Remaining observations (non-blocking)1. Both the integrity failure ("group/world-writable trust file") and the confidentiality failure ("world/group-readable host key") map to the same Anchored to: CLAUDE.md "Audit log fields are mandated" — diagnostic clarity of 2. "never on the pre-auth path" (line 103) is ambiguous without the §4.1 qualifier that follows at lines 135–138. A reader who stops at line 103 could parse "pre-auth" as "before any authentication happens" — which startup is. The explicit §4.1 boundary clarification three paragraphs later resolves this, but the first occurrence could mislead. Consider adding "wire" or "network" qualifier: "never on the §4.1 wire pre-auth path." Anchored to: Threat model §4.1 — "pre-authentication path" has a specific definition (bytes before auth on the network boundary). 3. The config file's own path is not itself subject to the parent-directory-chain check. The integrity check (lines 146–151) applies to files the config references. The config file's own path is implied to be checked (line 107: "the config file and every trusted file it names"), but the chain-walk predicate is listed under "the config file and every trusted file it names" (line 146). Real Anchored to: Threat model §4.4 — "configuration file's filesystem permissions exclude unauthorised writers." Positive confirmations
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. Checked:
|
* docs(rfc): mark RFC-0010 as Accepted RFC-0010 merged in #112; per the RFC process, merge is acceptance. Flip the Status field to Accepted with the merge date, matching the convention of RFCs 0005-0008. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]> * docs(rfc): mark RFC-0004 as Accepted RFC-0004 merged as a draft in #61 while its subsidiary ADR-0022 was still in review. ADR-0022 was accepted in the #86 governance sweep and the Phase-1 implementation (Tokio runtime, M1-M6) has landed, so the adoption decision is settled. Flip the Status field to Accepted, matching the convention of RFCs 0005-0008. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]> --------- Signed-off-by: Gonzalo Fleming <[email protected]>
Agrega RFC-0010 (Draft) — el workstream keystone de Phase 2 (la nota de scoping lo identifica como lo que destraba todo lo demás).
La decisión (una sola, shape-determining)
Adoptar un archivo de configuración TOML como interfaz de configuración de QuantumSSH desde Phase 2 — la superficie que el README ya nombra ("TOML, not
sshd_config"). Define la forma:schema_versiondesde v1): hace sobrevivible el freeze de0.1.0, cuando el schema se vuelve contrato público (mismo freeze de ADR-0021/0024).StrictModes, extendido a los archivos de confianza referenciados.CLI > config > default, flags de Phase 1 retenidos como override.Qué destraba
Es el hogar extensible que tres documentos ya aceptados difieren acá: el slot
trusted_user_ca_keysde RFC-0008, la políticaenvde ADR-0023, los rate-limits per-source de ADR-0022, y las secciones key→UID/PAM/rlimit que Phase 3 necesita.Disciplina de gobernanza
Roadmap issue: #109. Per el proceso RFC, período de comentarios de ≥14 días antes de merge; se decide por lazy consensus.
Part of #109
https://claude.ai/code/session_017JuwgCHx6Uv5E13g1BHAud