From d9462bd85da28ae9a7c5a62bd47b9cda924f2481 Mon Sep 17 00:00:00 2001 From: spektr Date: Fri, 27 Nov 2026 06:41:19 +0100 Subject: [PATCH] =?UTF-8?q?GNAI-024:=20gn=5Fbackup=5Freceiver=20um=20CT-11?= =?UTF-8?q?4-restic-Key=20und=20Zielverzeichnis=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ghostnet-ki (10.0.0.90) ist das etablierte hostunabhängige Backup-Ziel (GNAI-000 Blocker 4). CT 114 pusht seine clientseitig verschlüsselten Wallet-Backups per restic/sftp als gn-backup nach /var/lib/ghostnet-ai-backup/ct114/restic. Neuer Key ct114-restic.pub (Fingerprint SHA256:i4UFMsAmdGdi8s0pJeVnK7Ros1liEqXzJ2IghyBCBiU), quellbeschränkt from="10.0.0.61", no forwarding. Rolle samoacht jetzt authorized_keys aus Haupt- plus Zusatzschlüsseln. Anwenden auf ghostnet-ki erfolgt separat per llm-server host.yml durch den Operator. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 7 +++++++ .../host/ansible/files/ssh/ct114-restic.pub | 1 + .../ansible/roles/gn_backup_receiver/README.md | 6 ++++++ .../roles/gn_backup_receiver/defaults/main.yml | 8 ++++++++ .../roles/gn_backup_receiver/tasks/main.yml | 16 ++++++++++++++-- 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 llm-server/host/ansible/files/ssh/ct114-restic.pub diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 91e4039..149ab90 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -229,6 +229,13 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). - Verifiziert: Litecoin v0.21.5.8 SHA-256 gegen signiertes `SHA256SUMS.asc` (Befund a); Shell-Syntax aller Skripte; Ansible-Syntax aller Playbooks; yamllint, Secret-Scan und Markdown-Linkcheck (CI-Skripte lokal) bestanden. +- **2026-11-27:** restic-Key `id_ed25519_ghostnet_ct114_restic` + (`restic@ct114`, Fingerprint `SHA256:i4UFMsAmdGdi8s0pJeVnK7Ros1liEqXzJ2IghyBCBiU`) + erzeugt und als `ct114-restic.pub` in der Rolle `gn_backup_receiver` + (llm-server/host) hinterlegt, quellbeschränkt auf `10.0.0.61`, plus + Zielverzeichnis `/var/lib/ghostnet-ai-backup/ct114` für das restic-Repo. + Anwenden auf ghostnet-ki per `llm-server/host/ansible` `host.yml` + (Operator, mit Go). - **Noch nicht produktiv:** CT 114 existiert nicht; Provisioning, Ansible-Konvergenz, Wallet-Anlage und Abnahmetests folgen Abschnitt 6/10 nach explizitem Go des Betreibers. diff --git a/llm-server/host/ansible/files/ssh/ct114-restic.pub b/llm-server/host/ansible/files/ssh/ct114-restic.pub new file mode 100644 index 0000000..43127fb --- /dev/null +++ b/llm-server/host/ansible/files/ssh/ct114-restic.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZAt2wB48lIH1vSWL7djBHufmnpb19zrSoMw18CeIss restic@ct114 diff --git a/llm-server/host/ansible/roles/gn_backup_receiver/README.md b/llm-server/host/ansible/roles/gn_backup_receiver/README.md index 78fe389..7e66250 100644 --- a/llm-server/host/ansible/roles/gn_backup_receiver/README.md +++ b/llm-server/host/ansible/roles/gn_backup_receiver/README.md @@ -12,6 +12,12 @@ PVE host (GNAI-000 section 4, blocker 4). (`files/ssh/pve-backup.pub`, fingerprint `SHA256:tabCXnfrKhWI2+0F8vZgLqg7JtWn1Xt4ifo8o2KuPNc`) restricted with `from="10.0.0.2"` and no forwarding. +- **2026-11-27 (GNAI-024):** zusatzlicher CT-114-restic-Key + (`files/ssh/ct114-restic.pub`, Fingerprint + `SHA256:i4UFMsAmdGdi8s0pJeVnK7Ros1liEqXzJ2IghyBCBiU`), restricted mit + `from="10.0.0.61"` und no forwarding; Zielverzeichnis + `/var/lib/ghostnet-ai-backup/ct114` (restic-Repo der clientseitig + verschluesselten Wallet-Backups aus CT 114). - Home `/var/lib/ghostnet-ai-backup` stays root-owned `0711` (traversable for sshd StrictModes, not writable); the AI backup archives written by the root `gnai-ai-backup` timer stay root-owned. Only `lxc/` and `.ssh/` diff --git a/llm-server/host/ansible/roles/gn_backup_receiver/defaults/main.yml b/llm-server/host/ansible/roles/gn_backup_receiver/defaults/main.yml index 47b6830..2577c36 100644 --- a/llm-server/host/ansible/roles/gn_backup_receiver/defaults/main.yml +++ b/llm-server/host/ansible/roles/gn_backup_receiver/defaults/main.yml @@ -22,3 +22,11 @@ gn_backup_lxc_dir: /var/lib/ghostnet-ai-backup/lxc # Restrictions for the PVE backup key (public key in files/ssh/pve-backup.pub). gn_backup_ssh_options: 'from="10.0.0.2",no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc' gn_backup_pubkey_file: pve-backup.pub + +# Additional source-restricted receiver keys. CT 114 (Litecoin wallet LXC, +# GNAI-024) pushes its client-side encrypted wallet backups (restic over +# sftp) into gn_backup_ct114_dir; the key may only be used from the CT. +gn_backup_additional_keys: + - file: ct114-restic.pub + options: 'from=\"10.0.0.61\",no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc' +gn_backup_ct114_dir: /var/lib/ghostnet-ai-backup/ct114 diff --git a/llm-server/host/ansible/roles/gn_backup_receiver/tasks/main.yml b/llm-server/host/ansible/roles/gn_backup_receiver/tasks/main.yml index fa9565d..c890c6d 100644 --- a/llm-server/host/ansible/roles/gn_backup_receiver/tasks/main.yml +++ b/llm-server/host/ansible/roles/gn_backup_receiver/tasks/main.yml @@ -35,9 +35,13 @@ group: gn-backup mode: "0700" -- name: Install the source-restricted PVE backup key +- name: Install the source-restricted receiver keys ansible.builtin.copy: - content: "{{ gn_backup_ssh_options }} {{ lookup('ansible.builtin.file', role_path ~ '/../../files/ssh/' ~ gn_backup_pubkey_file) }}" + content: |- + {{ gn_backup_ssh_options }} {{ lookup('ansible.builtin.file', role_path ~ '/../../files/ssh/' ~ gn_backup_pubkey_file) }} + {% for key in gn_backup_additional_keys %} + {{ key.options }} {{ lookup('ansible.builtin.file', role_path ~ '/../../files/ssh/' ~ key.file) }} + {% endfor %} dest: "{{ gn_backup_account.home }}/.ssh/authorized_keys" owner: "{{ gn_backup_account.name }}" group: gn-backup @@ -50,3 +54,11 @@ owner: "{{ gn_backup_account.name }}" group: gn-backup mode: "0700" + +- name: Create the CT 114 restic target directory + ansible.builtin.file: + path: "{{ gn_backup_ct114_dir }}" + state: directory + owner: "{{ gn_backup_account.name }}" + group: gn-backup + mode: "0700"