From 78d228a94c2051284ee0a375171f2f9f1f4414ec Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Sat, 14 Nov 2026 08:13:00 +0100 Subject: [PATCH] docs: document immutable Agent image installs --- docs/ui-pages.md | 2 +- skills/central-auto-updates/SKILL.md | 2 +- skills/site-agent-installer-ui/SKILL.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ui-pages.md b/docs/ui-pages.md index ee26bae..0a9f2f4 100644 --- a/docs/ui-pages.md +++ b/docs/ui-pages.md @@ -281,7 +281,7 @@ Lancer └──────────────────────────────────────────────┘ ``` -Docker Compose affiche le YAML comme une étape « Configuration », suivie des commandes pour démarrer et vérifier l'Agent. Chaque bloc a une copie intégrée en haut à droite; après copie, l'icône devient une coche. Les commandes d'installation restent masquées tant que la release signée correspondante n'est pas disponible. Docker exige aussi les métadonnées d'image vérifiées de la release, puis installe l'image publiée avec le tag `latest`; les remplacements déclenchés par Central restent vérifiés par digest signé. En cas d'indisponibilité, le panneau montre une alerte explicite à la place des commandes. +Docker Compose affiche le YAML comme une étape « Configuration », suivie des commandes pour démarrer et vérifier l'Agent. Chaque bloc a une copie intégrée en haut à droite; après copie, l'icône devient une coche. Les commandes d'installation restent masquées tant que la release signée correspondante n'est pas disponible. Docker exige les métadonnées d'image vérifiées de la release et épingle l'image CPU ou GPU sur son digest signé (`repository@sha256:digest`). Compose utilise `pull_policy: always` pour récupérer exactement ce digest; Docker Run utilise `--pull always`. En cas d'indisponibilité, le panneau montre une alerte explicite à la place des commandes. La commande Linux ne contient ni l'URL Central ni le token du site. À son exécution, elle demande l'URL HTTPS puis le token sans afficher sa saisie, place les valeurs dans des fichiers temporaires protégés et télécharge les scripts par HTTPS avant leur exécution. L'installateur exige les fichiers d'enrôlement protégés et conserve le token comme credential systemd. diff --git a/skills/central-auto-updates/SKILL.md b/skills/central-auto-updates/SKILL.md index af4be1d..0d82061 100644 --- a/skills/central-auto-updates/SKILL.md +++ b/skills/central-auto-updates/SKILL.md @@ -49,7 +49,7 @@ For an explicitly authorized host validation, inspect existing services and data ## Acceptance -Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. For the Site Install UI, assert generated CPU/GPU Compose and `docker run` references use the corresponding `:latest` Agent image, Compose sets `pull_policy: always`, Docker Run commands set `--pull always`, all paths mount `/var/run/docker.sock`, and the non-root Agent receives the socket group (`DOCKER_GID` in Compose; detected socket GID for Linux `docker run`). Keep signed digest validation for updates dispatched by Central. A signed Agent manifest always requires the CPU image repository and digest; GPU image metadata is optional for CPU-only releases, and must be present as a valid repository/digest pair when either field is supplied. Unit tests cover CPU-only and CPU+GPU signed manifests plus a malformed half-pair. Source-built Compose acceptance probes Central's latest-release API against the configured public Forgejo source and verifies the returned signature and required CPU digest; record whether the current release also carries GPU metadata. Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data. +Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. For the Site Install UI, assert generated CPU/GPU Compose and `docker run` references use their corresponding immutable `repository@sha256:digest` Agent image, Compose sets `pull_policy: always`, Docker Run commands set `--pull always`, all paths mount `/var/run/docker.sock`, and the non-root Agent receives the socket group (`DOCKER_GID` in Compose; detected socket GID for Linux `docker run`). Keep signed digest validation for updates dispatched by Central. A signed Agent manifest always requires the CPU image repository and digest; GPU image metadata is optional for CPU-only releases, and must be present as a valid repository/digest pair when either field is supplied. Unit tests cover CPU-only and CPU+GPU signed manifests plus a malformed half-pair. Source-built Compose acceptance probes Central's latest-release API against the configured public Forgejo source and verifies the returned signature and required CPU digest; record whether the current release also carries GPU metadata. Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data. When a runtime Dockerfile changes for OS security updates, source-build and health-check the corresponding Central/Agent image, then scan its saved image archive with the pinned Trivy version and the same `HIGH,CRITICAL` severities used by CI. Record the finding IDs and fixed package versions; do not hide a nonzero scan behind application acceptance. diff --git a/skills/site-agent-installer-ui/SKILL.md b/skills/site-agent-installer-ui/SKILL.md index f4ce789..21cf969 100644 --- a/skills/site-agent-installer-ui/SKILL.md +++ b/skills/site-agent-installer-ui/SKILL.md @@ -11,7 +11,7 @@ Keep the site Agent installer in `src/Heimdall.Web/Components/SiteInstallPanel.r - Offer only Heimdall-supported platforms: Linux, Windows, and Docker. Keep method choices mapped in `AvailableMethods` and reset to that platform's sensible default in `SelectOperatingSystem`. - Keep generated command content in the existing builders and `Commands` projection. Platform selection controls the builders; do not duplicate generated commands in markup. -- Native install commands require a latest signed release with update key, signed manifest, signature, and Agent archive assets. Docker commands additionally require verified CPU/GPU image metadata and the update key, but install the corresponding published `:latest` image. Generated Compose uses `pull_policy: always`; generated Docker Run commands use `--pull always`. Preserve signed digest validation for Agent updates dispatched later by Central. +- Native install commands require a latest signed release with update key, signed manifest, signature, and Agent archive assets. Docker commands additionally require verified CPU/GPU image metadata and the update key, and install the corresponding immutable `repository@sha256:digest` reference. Generated Compose uses `pull_policy: always`; generated Docker Run commands use `--pull always`. Preserve signed digest validation for Agent updates dispatched later by Central. - Treat site tokens and generated configuration as secrets: show them only in the authenticated site's installer view and copy only after a deliberate click. Do not log generated content. - The Linux generated installer command must not embed Central URL or site token in its text or process arguments. Prompt for both at execution time, hide token input, use protected temporary files and the installer's file-based flags, and clean those files on all exits. - For live installer verification, use the authenticated Orca browser session. Check for the dedicated Heimdall login only in the user secret store at `~/.config/heimdall/credentials.json`; never put account passwords in this skill, repository config, shell arguments, or Orca `fill` commands. The file fallback is owner-only (`0700` directory, `0600` file) and base64-encoded, not encrypted. If it is absent, provide the user-run masked helper `~/.local/bin/store-heimdall-credentials`; do not report the credentials as persisted until that helper succeeds. If Orca has no safe autofill path, ask the user to enter the password in the visible browser.