02 - Secure and Automate Access to the Nova Build Machine #233

Closed
opened 2026-09-19 20:26:37 +01:00 by nimmo · 5 comments
Owner

Goal

Manage client authentication to Nova's dedicated builder identity without manually copying credentials, while keeping build access separate from Forgejo, CI publication, and deployment authority.

Dependencies

Blocked by #232: the builder identity, protocol, and privilege boundary must exist before credentials are distributed.

Requirements

  • Generate purpose-specific, key-only client credentials; never reuse personal SSH, host, Forgejo, or deployment keys.
  • Prefer one credential per authorised client/controller so access is attributable and can be revoked independently. A shared key requires an explicit, documented exception and rotation plan.
  • Use sops-nix to distribute client private keys only to opted-in NixOS hosts with strict ownership and modes.
  • Manage Nova's corresponding Fedora authorized_keys/account configuration through the documented Fedora procedure until Nova is migrated to NixOS.
  • Do not distribute the key to CI by default, and do not give the builder identity target-host or Forgejo authority.

Validation

  • An opted-in client authenticates and submits a build without manual key installation.
  • A non-opted-in host does not receive a credential.
  • Revoking one client key blocks that client without interrupting another authorised client.
  • Verify no client key grants target deployment or Forgejo write access.
## Goal Manage client authentication to Nova's dedicated builder identity without manually copying credentials, while keeping build access separate from Forgejo, CI publication, and deployment authority. ## Dependencies Blocked by #232: the builder identity, protocol, and privilege boundary must exist before credentials are distributed. ## Requirements - Generate purpose-specific, key-only client credentials; never reuse personal SSH, host, Forgejo, or deployment keys. - Prefer one credential per authorised client/controller so access is attributable and can be revoked independently. A shared key requires an explicit, documented exception and rotation plan. - Use sops-nix to distribute client private keys only to opted-in NixOS hosts with strict ownership and modes. - Manage Nova's corresponding Fedora `authorized_keys`/account configuration through the documented Fedora procedure until Nova is migrated to NixOS. - Do not distribute the key to CI by default, and do not give the builder identity target-host or Forgejo authority. ## Validation - An opted-in client authenticates and submits a build without manual key installation. - A non-opted-in host does not receive a credential. - Revoking one client key blocks that client without interrupting another authorised client. - Verify no client key grants target deployment or Forgejo write access.
Author
Owner

Working branch: feat/issue-233-nova-builder-credentials (created from current main). This issue will use just test for any activation validation; no switch deployment is in scope.

Working branch: `feat/issue-233-nova-builder-credentials` (created from current `main`). This issue will use `just test` for any activation validation; no `switch` deployment is in scope.
Author
Owner

Progress on feat/issue-233-nova-builder-credentials:\n\n- Added a Lyra-only SOPS binary secret encrypted to Lyra plus administrative recovery recipients; Vega and other clients are excluded.\n- just test on Lyra succeeded (no switch): the rendered key is root:root, mode 0400, and matches its Nova public key.\n- Nova accepted that key under the existing restricted nix-remote-builder identity. A nix store info request authenticated through the forced command.\n- A deliberately non-substituted derivation with Lyra local jobs disabled was built on Nova and copied back to Lyra.\n- Temporary plaintext key material and Nova staging files were removed. The existing user-created auto-update hold remains active and will be released only after this issue is merged.\n\nThe remaining completion criterion needs a second NixOS client (recommended: Electra): deploy its distinct SOPS key, prove its access, verify a non-opted host does not receive a key, and revoke one client key without disrupting the other.

Progress on `feat/issue-233-nova-builder-credentials`:\n\n- Added a Lyra-only SOPS binary secret encrypted to Lyra plus administrative recovery recipients; Vega and other clients are excluded.\n- `just test` on Lyra succeeded (no `switch`): the rendered key is `root:root`, mode `0400`, and matches its Nova public key.\n- Nova accepted that key under the existing restricted `nix-remote-builder` identity. A `nix store info` request authenticated through the forced command.\n- A deliberately non-substituted derivation with Lyra local jobs disabled was built on Nova and copied back to Lyra.\n- Temporary plaintext key material and Nova staging files were removed. The existing user-created auto-update hold remains active and will be released only after this issue is merged.\n\nThe remaining completion criterion needs a second NixOS client (recommended: Electra): deploy its distinct SOPS key, prove its access, verify a non-opted host does not receive a key, and revoke one client key without disrupting the other.
Author
Owner

Checkpoint commit: 30e7af1 (feat(nix): provision Lyra Nova builder credential). It includes the Lyra SOPS credential, recipient isolation, durable-client documentation, and removal of the pre-existing duplicate netcat package warning. The branch is intentionally not yet pushed; #233 remains open pending the second-client and independent-revocation validation.

Checkpoint commit: `30e7af1` (`feat(nix): provision Lyra Nova builder credential`). It includes the Lyra SOPS credential, recipient isolation, durable-client documentation, and removal of the pre-existing duplicate netcat package warning. The branch is intentionally not yet pushed; #233 remains open pending the second-client and independent-revocation validation.
Author
Owner

Electra preparation checkpoint (not yet pushed): 615bc6d adds the independently encrypted Electra credential and 3541303 adds its Electra-only SOPS recipient rule plus root-owned 0400 declaration. Electra preflight is clean, currently booted in igpu, and has no auto-update hold. No Nova authorization line or Electra live activation has been performed yet.

Electra preparation checkpoint (not yet pushed): `615bc6d` adds the independently encrypted Electra credential and `3541303` adds its Electra-only SOPS recipient rule plus root-owned `0400` declaration. Electra preflight is clean, currently booted in `igpu`, and has no auto-update hold. No Nova authorization line or Electra live activation has been performed yet.
Author
Owner

Completion evidence for the two-client credential boundary (branch remains local/unpushed):\n\n- Electra completed a just test activation without switch; its rendered key is root:root, mode 0400, and has an independent fingerprint from Lyra.\n- Nova now holds exactly the two restricted nix-remote-builder public keys, both under the existing forced nix-store --serve --write SSHD boundary.\n- Electra authenticated to the forced store and submitted a deliberately non-substituted derivation with local jobs disabled; Nova built it and Electra copied the result back.\n- Revocation proof: removing only Lyra’s Nova key denied Lyra (Permission denied, exit 1) while Electra retained remote-store access (exit 0). Lyra’s exact key was restored and revalidated (exit 0).\n- Declarative scope: Vega receives neither credential; Lyra receives only Lyra’s; Electra receives only Electra’s.\n- All temporary key/public-key staging files were removed. Lyra’s user-created auto-update hold remains active and must be released only after the eventual MR merge.

Completion evidence for the two-client credential boundary (branch remains local/unpushed):\n\n- Electra completed a `just test` activation without `switch`; its rendered key is `root:root`, mode `0400`, and has an independent fingerprint from Lyra.\n- Nova now holds exactly the two restricted `nix-remote-builder` public keys, both under the existing forced `nix-store --serve --write` SSHD boundary.\n- Electra authenticated to the forced store and submitted a deliberately non-substituted derivation with local jobs disabled; Nova built it and Electra copied the result back.\n- Revocation proof: removing only Lyra’s Nova key denied Lyra (`Permission denied`, exit 1) while Electra retained remote-store access (exit 0). Lyra’s exact key was restored and revalidated (exit 0).\n- Declarative scope: Vega receives neither credential; Lyra receives only Lyra’s; Electra receives only Electra’s.\n- All temporary key/public-key staging files were removed. Lyra’s user-created auto-update hold remains active and must be released only after the eventual MR merge.
nimmo added reference feat/issue-233-nova-builder-credentials 2026-09-20 01:40:05 +01:00
nimmo closed this issue 2026-09-20 01:45:23 +01:00
Sign in to join this conversation.
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
nimmo/nixos-config#233
No description provided.