Repository navigation
docs(rfc): draft RFC 0002 -- Phase-1 UID model and non-goal §8.12 - #24
Merged
Merged
Conversation
Proposes two coupled refinements to docs/threat-model.md so the document describes what QuantumSSH actually enforces during Phase 1 rather than what it intends to enforce once privilege separation lands in Phase 3. 1. §2.5 (Command execution authority) gains a Phase-bounded paragraph noting that the strong form of the goal -- "authority on the host as the authenticated user" -- is the Phase 3 target, and pointing the reader at §8.12 for the Phase 1 reality. The asset definition itself is unchanged. 2. §8 (Out of scope) gains a new §8.12 "Per-user UID isolation until Phase 3", modelled on §5.5.4's disposition pattern. The non-goal has a named closure condition (a follow-up RFC that supersedes §8.12 when the Phase 3 privsep work lands), so the entry is auditable as temporary rather than as a permanent exemption. The RFC also proposes a small addition to §2.7 (Audit record): the log emitted on each command-execution boundary records executing_uid distinct from authenticated_identity, so the gap §8.12 names is visible to anyone who greps server logs. Motivation: implementing real per-user UID isolation in Phase 1 requires running quantumsshd as root (or with CAP_SETUID + CAP_SETGID on Linux), a privsep monitor, passwd/nsswitch/getpwnam resolution, the correct setgid/initgroups/setuid sequence, and a PAM integration boundary. Each of those is its own attack surface; OpenSSH's sshd-session.c is roughly 4000 lines of careful C precisely because this is hard. Phase 1's MANIFIESTO commitment to a "small attack surface, sharp edges" is incompatible with that expansion. The pragmatic path is to (a) run quantumsshd as a dedicated non-root service account, (b) execute the command as that service account's UID, and (c) document this honestly in the threat model so operators and auditors are not misled by a §2.5 sentence the implementation cannot back. RFC 0002 is the documentation half of that pragmatic path. Process: substantive change (non-goal addition) so it goes through the RFC process per docs/threat-model.md's maintenance clause, and will be open for >=14 days for comments per docs/rfcs/README.md.
Contributor
There was a problem hiding this comment.
Pull request overview
Drafts RFC 0002 to align docs/threat-model.md with the Phase 1 reality: commands execute under the QuantumSSH service account UID rather than the authenticated user's UID, with per-user UID isolation deferred to Phase 3. Adds a proposed Phase-bounded paragraph to §2.5, a new §8.12 non-goal with a named closure condition, and an executing_uid audit field in §2.7.
Changes:
- New draft RFC document
docs/rfcs/0002-threat-model-phase1-uid-model-and-non-goal.md. - CHANGELOG entry under
### Addeddescribing the new draft RFC.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/rfcs/0002-threat-model-phase1-uid-model-and-non-goal.md | New draft RFC proposing §2.5 phase-bounded note, new §8.12 non-goal, and §2.7 executing_uid audit field. |
| CHANGELOG.md | Adds an ### Added entry describing the new draft RFC. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4 tasks
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
gonzafg2
added a commit
that referenced
this pull request
May 27, 2026
#25) * docs: drop roadmap estimates; codify one-decision-per-file conventions Two coupled process changes that fell out of the Phase-0/Phase-1 boundary review. 1. README.md §"Roadmap" no longer commits to per-Phase calendar estimates. The previous wording ("Phase 1 takes weeks. Phase 2, months. Phase 3, a year or more.") was an implicit schedule promise that invited scope/quality compromises whenever a phase's real work outgrew the estimate. Phase 1's greenfield-vs-russh tension is the concrete example that surfaced this: the honest engineering answer (greenfield, several months) collided with the "weeks" promise, and the document was being asked to do two incompatible things at once. The replacement makes the project's actual posture explicit: phases ship when they are ready, the schedule is a function of correctness and scrutiny, not the reverse. The high-level ambitions in MANIFIESTO.es.md §"Cómo medimos el éxito" (year one / year two / year five outcomes) are deliberately kept; they are ambitions, not scope estimates. 2. docs/rfcs/README.md and docs/adr/README.md codify two conventions that were tacit until now: a. One decision per file. Each RFC addresses one shape-determining decision; subsidiary decisions split into separate ADRs that cite the RFC, never packaged inside it. Each ADR records one decision. The reason is reviewability: an RFC reader must be able to state the decision in one sentence and the alternatives as a list, and a substantive objection to one half of a packaged RFC should not block the other half. b. Tracking via Phase-level issues, not per-RFC issues. The project's roadmap plus the Phase-level GitHub issues (e.g. #9 for Phase 1) are the tracking surface. RFCs cite the Phase issue in their Roadmap issue field; discussion of a specific RFC happens on its PR. Creating a separate issue per RFC would duplicate the roadmap and fragment the discussion across two surfaces. The template (docs/rfcs/0000-template.md) is updated to rename the Tracking issue: field to Roadmap issue: accordingly. RFC-0001 predates this convention; its existing tracking-issue field is left as historical record rather than retroactively rewritten. RFC-0002 (PR #24) applies the new field name in the same PR. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…-phase1-uid-model
Copilot Autofix reverted the field name from `Roadmap issue:` back to `Tracking issue:` in commit 342c67f. Restore the field name so RFC-0002 is consistent with the convention codified in PR #25 (now merged at f9bb0cc), which renames `Tracking issue:` to `Roadmap issue:` in the RFC template and documents the rule in docs/rfcs/README.md. Only this field-name regression is restored; the other Autofix-era edits (closure-condition rewording, Summary restructure) are kept.
This was referenced May 27, 2026
…-phase1-uid-model
- Motivation: README §"Phase 1" lists six deliverables, not five; add the omitted "structured logging via tracing" entry. - Unresolved Q1: drop the fabricated "Phase 3 will take a year or more" roadmap quote (the README carries no per-phase estimates); cite the README's actual estimate-free stance instead. - §8.12: note the numbering deconflicts with RFC 0001's reserved §8.11, with renumber guidance if RFC 0001 does not land first. - §2.7: make the audit-record amendment paste-ready, matching the §2.5 and §8.12 blockquote style.
gonzafg2
added a commit
that referenced
this pull request
Jun 10, 2026
Records the operational counterpart to RFC-0002. The RFC documents the threat-model side (§2.5 Phase-bounded reality + §8.12 non-goal); this ADR documents the operational decision RFC-0002 §"Why not bundle this with a 'single-command execution' ADR" explicitly defers to a separate artefact: which OS identity executes the SSH-supplied command in Phase 1. The decision is to run quantumsshd as a dedicated non-root service account from PID 1 — no privileged window, no setuid machinery, no PAM, no passwd resolution. Three other options were on the table (root forever, root + post-spawn drop, CAP_SETUID); each is recorded in Alternatives considered with why it was rejected. Status: Proposed. Advances to Accepted when Phase 1 implementation begins. Depends on the merge of PR #24 (RFC-0002).
Merged
4 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft RFC proposing two coupled refinements to
docs/threat-model.mdso the document describes what QuantumSSH actually enforces during Phase 1 rather than what it intends to enforce once privilege separation lands in Phase 3.executing_uiddistinct fromauthenticated_identity, so the gap §8.12 names is visible to anyone who greps server logs.Why an RFC (not a documentation PR)
docs/threat-model.md's maintenance clause requires the RFC process for "additions to or removals from the asset list, threat-actor tiers, trust boundaries, in-scope attack vectors, or non-goals". Adding §8.12 is a non-goal addition; this PR opens the formal review path.The companion documentation-PR cleanup of two factual errata in the threat model and in README.md / MANIFIESTO.es.md (the GitHub PQ algorithm naming and the §5.2.4 test-vector source) lands separately as #23. Those changes did not require an RFC; this one does.
Motivation, in one paragraph
Implementing real per-user UID isolation in Phase 1 requires running
quantumsshdas root (or withCAP_SETUID+CAP_SETGIDon Linux), a privilege-separation monitor,passwd/nsswitch/getpwnamresolution, the correctsetgid/initgroups/setuidsequence, and a PAM integration boundary — each of which is its own attack surface, and OpenSSH'ssshd-session.cis roughly 4 000 lines of careful C precisely because this is hard. Phase 1's MANIFIESTO commitment to "superficie pequeña, bordes afilados" is incompatible with that expansion. The pragmatic path is to (a) runquantumsshdas a dedicated non-root service account, (b) execute the command as that service account's UID, and (c) say so honestly in the threat model so operators are not misled by a sentence the implementation cannot back. RFC 0002 is the documentation half of that pragmatic path; the corresponding code-side ADR will document the run-as-service-account choice separately when Phase 1 implementation begins.Test plan
docs/rfcs/README.md.docs/threat-model.md.