ci: OpenBao SSH CA for the forge (deploy-forge-host, nix cache push) — F5 #121

Merged
founder merged 1 commit from openbao/ssh-forge-ca into main 2026-08-17 00:57:45 +00:00
Owner

ssh-forge mount + CA + roles + jwt roles/policies; sshd TrustedUserCAKeys + nix-cache-push user behind a flag (off until the CA key is pasted); openbao-ssh-cert action; deploy-forge-host + build-linux behind the variable. Dry-activate + cert-auth mechanics verified.

ssh-forge mount + CA + roles + jwt roles/policies; sshd TrustedUserCAKeys + nix-cache-push user behind a flag (off until the CA key is pasted); openbao-ssh-cert action; deploy-forge-host + build-linux behind the variable. Dry-activate + cert-auth mechanics verified.
ci: OpenBao SSH CA for the forge (deploy-forge-host, nix cache push) — F5
Some checks failed
build-release.yml / ci: OpenBao SSH CA for the forge (deploy-forge-host, nix cache push) — F5 (push) Failing after 0s
build-release.yml / ci: OpenBao SSH CA for the forge (deploy-forge-host, nix cache push) — F5 (pull_request) Failing after 0s
Release: If Needed / Check (Release Needed) (push) Successful in 8s
Infra: Cloud OpenTofu / Infra (Cloud OpenTofu) (push) Successful in 52s
Build: Linux / Build (Linux x86_64) (push) Failing after 11s
Build: Linux / Build (keystore-forge x86_64) (push) Has been skipped
Deploy: API / Deploy (API) (push) Has been cancelled
Deploy: Web / Deploy (Web) (push) Has been cancelled
Namespace: Build Images / Refresh Linux runner image (push) Failing after 2m11s
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 2m13s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 4m22s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
2cde6c8ea4
infra/openbao: mount ssh-forge (type ssh) with an ed25519 CA and two
roles: forge-deploy (principal root, permit-pty only, 2h — the deploy
wait loop can run up to 2h) and nix-cache-push (principal nix-cache-push,
force-command nix-daemon --stdio); sign-only policies; jwt roles
deploy-forge-host (aud key-store-deploy-forge-host, bound to
.forgejo/workflows/deploy-forge-host.yml@refs/heads/main via
bound_claims.workflow_ref) and nix-cache-push (aud key-store-nix-cache).
Output ssh_forge_ca_public_key.

Nix (behind keyStore.forgeSshCa.enable, default false until the CA key is
pasted into nixos/keys/openbao-ssh-forge-ca.pub — an assertion refuses to
enable with the placeholder): sshd TrustedUserCAKeys merged with the
existing recovery CAs; a dedicated nix-cache-push system user with a
`Match User` block (ForceCommand nix-daemon --stdio, no PTY/forwarding)
and nix trusted-users so unsigned CI closures still land — sshd is the
authority for the forced command, the CA's default critical option only a
default.

.forgejo/actions/openbao-ssh-cert: job token → jwt login → ssh-keygen
ed25519 in RUNNER_TEMP → sign → <key>-cert.pub beside the key (OpenSSH
picks it up with -i, so ssh-ng nix copy needs nothing else). deploy-forge-
host.yml and build-linux.yml mint behind KEYSTORE_CI_SECRETS_SOURCE ==
'openbao' (build-linux only on main), age steps kept behind != 'openbao'.

Verified: YAML + bash -n; tofu fmt + validate; forge dry-activate green
with the flag on and a throwaway CA (sshd_config, Match block, trusted-
users, user, check-sshd-config all inspected); real OpenSSH 10.3 cert auth
exercised against a throwaway sshd (cert found beside the key, sshd
ForceCommand overrides the client's command, plain key / wrong principal
refused). Not yet: openbao apply, CA paste + flag flip, deploy-forge-host
test (parent).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
founder deleted branch openbao/ssh-forge-ca 2026-08-17 00:57:45 +00:00
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!121
No description provided.