From eca9bd2be23626ba61b4c4071b199dc4fd27ebc3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 28 Jul 2026 20:02:42 -0500 Subject: [PATCH] update --- README.md | 21 +++++++++++---------- defaults.inc | 2 +- inc/fleet.inc | 4 ++++ tests/test-fleet.sh | 3 +++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d857a79..07c1b89 100644 --- a/README.md +++ b/README.md @@ -178,14 +178,15 @@ a default company URL. V2 creates a random installation UUID and 256-bit credential in `/var/lib/ta-proxmenu/identity.env`. The directory is mode `0700` and the file is mode `0600`. On each interactive launch, TA-ProxMenu makes best-effort HTTPS -calls to the configured broker to record installation/upgrade state, start and -completion status, duration, TA-ProxMenu and Git versions, PVE/OS/kernel -versions, architecture, and whether the host is clustered. No background -service is installed, and broker availability never prevents the menu from -running. +calls to the configured broker to record the hostname, installation/upgrade +state, start and completion status, duration, TA-ProxMenu and Git versions, +PVE/OS/kernel versions, architecture, and whether the host is clustered. No +background service is installed, and broker availability never prevents the +menu from running. -The registry does not send hostnames, machine IDs, MAC addresses, usernames, -customer names, VM/container inventory, deployment codes, authorization -tokens, or command output. The broker stores only a digest of the random host -credential. A successful deployment-code exchange links the already-random -installation ID to a verified registry entry. +The hostname is treated as a limited operational identifier. The registry does +not send machine IDs, MAC addresses, usernames, VM/container inventory, +deployment codes, authorization tokens, credentials, or command output. The +broker stores only a digest of the random host credential. A successful +deployment-code exchange carrying the same random installation ID marks that +registry entry as verified. diff --git a/defaults.inc b/defaults.inc index a700730..4fe4dfc 100755 --- a/defaults.inc +++ b/defaults.inc @@ -3,7 +3,7 @@ action="${1:-}" FOLDER='/opt/idssys/ta-proxmenu' -VERS='2026.7.28-2' +VERS='2026.7.28-3' noupdate=' ' diff --git a/inc/fleet.inc b/inc/fleet.inc index 801bb06..3d1ed02 100644 --- a/inc/fleet.inc +++ b/inc/fleet.inc @@ -8,6 +8,7 @@ TAPM_FLEET_LAST_VERSION='' TAPM_FLEET_REGISTERED=0 TAPM_FLEET_STARTED_AT=0 TAPM_FLEET_VERSION='' +TAPM_FLEET_HOSTNAME='' TAPM_FLEET_READ_VALUE() { local key="$1" @@ -67,6 +68,7 @@ TAPM_FLEET_ENSURE_IDENTITY() { } TAPM_FLEET_COLLECT_METADATA() { + TAPM_FLEET_HOSTNAME="$(hostname -s 2>/dev/null || hostname 2>/dev/null || true)" TAPM_FLEET_GIT_COMMIT="$(git -C "${FOLDER:-/opt/idssys/ta-proxmenu}" rev-parse HEAD 2>/dev/null || true)" TAPM_FLEET_PVE_VERSION="$(pveversion 2>/dev/null | head -n 1 || true)" TAPM_FLEET_OS_VERSION="$( @@ -102,6 +104,7 @@ TAPM_FLEET_JSON() { TAPM_FLEET_ERROR_CODE="$error_code" \ TAPM_FLEET_DURATION="$duration" \ TAPM_FLEET_INSTALLATION_ID="$TAPM_FLEET_INSTALLATION_ID" \ + TAPM_FLEET_HOSTNAME="$TAPM_FLEET_HOSTNAME" \ TAPM_FLEET_CREDENTIAL="$TAPM_FLEET_CREDENTIAL" \ TAPM_FLEET_VERSION="$TAPM_FLEET_VERSION" \ TAPM_FLEET_GIT_COMMIT="$TAPM_FLEET_GIT_COMMIT" \ @@ -116,6 +119,7 @@ import json, os, sys payload = { "schema_version": 1, "installation_id": os.environ["TAPM_FLEET_INSTALLATION_ID"], + "hostname": os.environ["TAPM_FLEET_HOSTNAME"], "event": os.environ["TAPM_FLEET_EVENT"], "result": os.environ["TAPM_FLEET_RESULT"], "proxmenu_version": os.environ["TAPM_FLEET_VERSION"], diff --git a/tests/test-fleet.sh b/tests/test-fleet.sh index 6ad4134..c700419 100644 --- a/tests/test-fleet.sh +++ b/tests/test-fleet.sh @@ -26,6 +26,7 @@ if [[ "$identity_mode" != 600 ]]; then fi TAPM_FLEET_VERSION='2026.7.26-7' +TAPM_FLEET_HOSTNAME='pve01' TAPM_FLEET_GIT_COMMIT='0123456789abcdef0123456789abcdef01234567' TAPM_FLEET_PVE_VERSION='pve-manager/9.0.3/abc~1' TAPM_FLEET_OS_VERSION='Debian GNU/Linux 13 (trixie)' @@ -40,6 +41,7 @@ REGISTRATION_JSON="$registration_json" python3 -c ' import json, os payload = json.loads(os.environ["REGISTRATION_JSON"]) assert payload["installation_id"] +assert payload["hostname"] == "pve01" assert len(payload["credential"]) == 64 assert payload["proxmenu_version"] == "2026.7.26-7" assert payload["clustered"] is True @@ -73,6 +75,7 @@ python3 -c ' import json, os payload = json.loads(os.environ["EVENT_BODY"]) assert payload["event"] == "run_completed" +assert payload["hostname"] == "pve01" assert payload["result"] == "success" assert payload["duration_seconds"] == 12 assert "credential" not in payload