diff options
| author | dev <dev@example> | 2026-11-13 21:32:38 +0000 |
|---|---|---|
| committer | dev <dev@example> | 2026-11-13 21:32:38 +0000 |
| commit | 47c9b98ea3fb91833d6d0847fa4345fa23593a97 (patch) | |
| tree | 3b68994aa774e9b758f8cb2296770a49adef87d7 /container/sshd_config | |
| parent | 2b53cf54acd3d84bd6edfd0b98cf58794e30ec7d (diff) | |
| download | access-control-47c9b98ea3fb91833d6d0847fa4345fa23593a97.tar.gz access-control-47c9b98ea3fb91833d6d0847fa4345fa23593a97.zip | |
container: the host, built from the program's own install
The image is two stages: one compiles, runs the suite and installs into a
staging root, the other is the host and receives that staging root whole. The
reason for the copy-whole is that the paths in the image are then the paths
`make install` produces - including the hook symlink and its relative target -
rather than a second list of destinations kept in a Dockerfile, which is how an
image and a build start to disagree about where the hook is.
The build stage is Alpine so the binary is musl-linked like the rest of the
runtime image; a glibc binary would fail as "no such file" about a file that is
plainly there. `make test` runs in that stage, so an image built from a tree
whose tests fail does not get to exist.
The lighttpd config, sshd config, CGI shim, cgitrc and the two operator tools
come from the shell implementation, with the comments corrected: there is no
refcheck any more, and the hook the comments point at is now a symlink to this
binary. Nothing about the wiring changed, which is the point - the C program
drops into a host that was already built around one hook and one policy file.
Diffstat (limited to 'container/sshd_config')
| -rw-r--r-- | container/sshd_config | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/container/sshd_config b/container/sshd_config new file mode 100644 index 0000000..c180f50 --- /dev/null +++ b/container/sshd_config @@ -0,0 +1,35 @@ +Port 2222 +ListenAddress 0.0.0.0 +HostKey /run/git-host/secrets/ssh_host_ed25519_key +HostKey /run/git-host/secrets/ssh_host_rsa_key +PidFile /run/sshd/sshd.pid + +# One OS account for everyone; the *name* behind a key comes from the key +# itself. git-host-key writes +# +# environment="GIT_HOST_USER=alice",command="/usr/bin/git-shell",... ssh-ed25519 ... +# +# and git-authz reads GIT_HOST_USER out of the push environment. +AuthorizedKeysFile /run/git-host/secrets/authorized_keys + +# Without this line sshd silently drops the environment= key option, every +# connection arrives anonymous, and every push is denied. The usual objection +# does not apply here: the git account has no login shell worth having +# (ForceCommand below), no writable files and no user rc file. +PermitUserEnvironment yes + +# Belt and braces for a hand-added key that forgot its command= option: nobody +# gets a shell, only the git transport. +ForceCommand /usr/bin/git-shell + +PasswordAuthentication no +KbdInteractiveAuthentication no +ChallengeResponseAuthentication no +PermitRootLogin no +PermitTunnel no +AllowTcpForwarding no +X11Forwarding no +PermitTTY no +PrintMotd no +AllowUsers git +Subsystem sftp internal-sftp |
