Repository navigation
test(interop): the OpenSSH conformance suite (ADR-0062) - #290
Conversation
…n enforces ADR-0062: the interop gate grows from 15 checks into 43 cases, one for every behaviour that a document states and a stock OpenSSH client can reach, refusals included. - tests/interop/CASES.md is the catalogue: one line per case, the document it checks, and what a client may lack for it to skip. - tests/interop/cases.sh holds the cases, one function each. - run_openssh_client.sh is the driver. Before the first case it fails if a case has no line, a line has no case, or a line is repeated. After the last it fails unless every case reported ok, or a skip that both its line and INTEROP_ALLOW_SKIP allow. A run that stops early with status 0 fails too. - negative_no_hybrid now asserts the client's "no matching key exchange method found", not only a non-zero exit. - The server-initiated re-key runs under AES-GCM and reads `initiator` from the audit log: under ChaCha20 the client's own 1 GiB limit fires first. - The client reads no ssh_config and no agent of the account that runs it. A developer's AddKeysToAgent otherwise left every run's throwaway keys in their agent, and the agent reordered the keys a client offers. - The macOS release leg allows four skips: its client has no OpenSSL and no zlib, so no AES-GCM, no RSA or ECDSA, and no compression. Its no-fallback check now covers ssh-keyscan and ssh-agent, which the suite uses. The PR gate and the Linux release legs allow none. Run locally: 43 of 43 in the gate image with OpenSSH_10.6p1 Debian-1 on aarch64, five times, 11 to 14 s; 43 of 43 on macOS with 10.6p2, under bash 5.3 and bash 3.2; 39 and 4 skipped with 10.6p1 built as the macOS leg builds it. Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
The probe behind ADR-0062 found three behaviours that no document stated, or stated differently from the server. ADR-0062 §2 puts the document right before the case rests on it. - docs/deployment.md §3: ssh-keyscan cannot fetch the host key. It does not negotiate strict-kex, so the server disconnects it with code 3 before it sends one. The section says how to trust the key from its .pub line instead, and the case known_hosts_from_pub checks that way. - Threat model §5.3.1: a connection has a budget of 12 authentication requests, and the twelfth ends it with code 11. It was in the code only. - ADR-0023 takes an erratum (ADR-0015). Its table gave every non-session channel type code 3. Since M5 (#84), before the ADR was accepted, the server checks for an open channel first, so a forwarding channel opened during a session gets code 1. Both refuse it, and the decision does not change. Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
- ADR-0062 is Accepted, dated with this PR. Its text records what the implementation found: the catalogue's place and form, the client run with no ssh_config and no agent, four skips on the macOS leg where the draft named two, the times measured, and that the pinned clients gave the probe's results. The interactive shell on a PTY, which the draft left open, has its case. - The rule of §8 goes into CLAUDE.md, next to ADR-0060 §9's rule for fuzz targets, and into AGENTS.md's Code Review Rules. - CLAUDE.md, AGENTS.md and docs/infrastructure.md describe the suite where they described the gate. - The README's Phase 3 item on conformance tests is done. - The changelog has the suite and the three documents it corrected. Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
§6 said the implementing PR reports the step's time on the PR runner. On x86_64 it took 17 seconds, up from 3, and passed all 43 cases with none skipped (run 44864009111). Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
PR Review: test(interop): the OpenSSH conformance suite (ADR-0062) (#290)Decision: 🟢 Approved Executive summaryThis PR graduates the OpenSSH interop gate from 15 ad-hoc checks to a 43-case conformance suite with a machine-enforced catalogue, while fixing three documentation/ADR bugs the suite discovered. The changes consistently strengthen the fail-closed and zero-legacy posture — negative cases now assert the specific error message or disconnect code rather than accepting any failure ( Nothing reached the confidence threshold (≥ 80). Decision: 🟢 Approved |
openssh_cert_refusals passed whenever ssh exited non-zero, so a server that was down, or any other failure, satisfied it. ADR-0062 §4 says a refusal case asserts the refusal, and every other refusal case already did. Each of the three runs now shows that the client offered that certificate (its ED25519-CERT offer in `ssh -v`) and was denied with "Permission denied (publickey).". Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Implements ADR-0062 and accepts it. The interop gate grows from 15 checks into 43 cases, one for every behaviour that a document states and a stock OpenSSH client can reach, refusals included. It runs where the gate ran: on every PR as
openssh-interop, and on every release artifact.What changes
The suite (
tests/interop/)CASES.md, the catalogue. One line per case: its name, the document it checks, and what a client may lack for the case to skip.cases.sh, the cases. One function each.run_openssh_client.sh, the driver. It enforces the catalogue:ok, or a skip that both its line andINTEROP_ALLOW_SKIPallow;negative_no_hybridasserts the refusal. It used to pass on any failure, a server that was down included.-F /dev/nullon every client run, and no agent (below).The workflows
interop.yml: no skips allowed; only its comment changes.release.yml, macOS leg: four skips allowed, because its client has no OpenSSL and no zlib, so no AES-GCM, no RSA or ECDSA, and no compression. Its no-fallback check also coversssh-keyscanandssh-agent, which the suite now uses.What the suite found, put right first (ADR-0062 §2)
docs/deployment.md§3:ssh-keyscancannot fetch the host key. It negotiates no strict-kex, so the server disconnects it with code 3. The section gives the.pub-line way to trust the key, andknown_hosts_from_pubchecks it.Governance and docs
CLAUDE.md(next to the fuzz-target rule) and inAGENTS.md's Code Review Rules.CLAUDE.md,AGENTS.md,docs/infrastructure.mdand the changelog describe the suite.Two things a reviewer may want to question
release.yml.ssh_confighasAddKeysToAgent yesfor every host, so each local run of the old gate left its throwaway client key in my agent. 17 had piled up, and the agent reordered the keys the client offered, which brokeauth_attempt_budget. I removed those 17 keys, and only those: keys with ssh-keygen's default comment and no file in~/.ssh. The suite now isolates the client. CI was never affected.How it was checked
OpenSSH_10.6p1 Debian-1(the pin)The enforcement was checked by breaking it, one way at a time:
INTEROP_ALLOW_SKIPnaming a non-case;nevercase that skips, and a skip the leg does not allow;exit 0.Each made the run fail with its own message.
Other checks:
shellcheck -xandactionlintare clean.openssh-interoprun. The draft probe took 21 s; today's gate step took 3 s.rehearsal-*tag on this branch would run all three before merge.Refs #248