Repository navigation
Conversation
The real broker, nodkey run, nodkey ssh-agent with real ssh and git, and nodkey ssh-grant, with throwaway keys; a canary search over every output; a CI job. Closes #15
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.
What
The end-to-end test of version 1 (
test/e2e, build tage2e): the real binaries against real OpenSSH, with throwaway keys and a fake Telegram server.debian:bookworm-slimdigest) runs 4sshds with throwaway host keys:web-1(Ed25519),web-2(ECDSA),db-1(RSA) andweb-3, which is not in the broker'sknown_hosts. The realnodkey brokerruns withnodkey keygenkeys, a fakebwsand a fake Telegram server (reached throughHTTPS_PROXYand a test CA, so nothing reaches the real Telegram). Clients:nodkey run,nodkey ssh-agentwith the realsshandgit, andnodkey ssh-grant.nodkey runpasses the secret into a command (the command proves it by a hash);nodkey rundenied; an SSH login approved; an unknown host key refused with no message;ssh-grantcovers exactly the listed hosts and that user; git over SSH (clone and push); an SSH login denied, and the Deny ends the grants;nodkey audit verifypasses with every journal anchor (a changed copy fails).internal/client's root-only test runs as root in a container: a process of another user is refused at thessh-agentsocket (SO_PEERCRED).--cap-drop ALL(only whatsshdneeds),no-new-privileges, process and memory limits, ports on 127.0.0.1 only, no mounts; children get only the environment the test gives them; leftovers of a killed run are removed at the next start.e2ejob onubuntu-latest(pinned actions,contents: read, 20-minute timeout); lint also runs with--build-tags e2e. Dependabot keeps the base image digest current.A run takes about 6 to 8 seconds once the image is built.
Docs
DESIGN.md section 17 (how the test works, how to run it, cleanup commands); AGENTS.md commands.
Review
Three rounds with the security-reviewer agent. The reviewer broke the code on purpose in a copy (a value in a log, masking off, a Deny that does not end grants, an alert with claimed text); the test catches every one.
Closes #15