Pulse/internal/config
rcourtman a49a4e65d1 Stop shared-token same-hostname agents collapsing identities
Two standalone Proxmox sites that reuse one short node name and one
pasted install token still folded into a single host record: the
token+hostname binding and the continuity store's hostname+token
fallback both resolve identity without consulting the machine ID, so
the second site's reports adopted the first site's host ID and the
record flip-flopped between machines. Removing that collapsed record
(the agent uninstaller does this on reinstall) then revoked the shared
token because the still-used guard could only see one record, leaving
every surviving agent rejected with 401 "Unauthorized access attempt"
on /api/agents/agent/report - the new symptom reported on #1753 after
the v6.4.2 retest.

Qualify host token binding slots with the reporting machine's identity
so two machines behind one token+hostname hold separate bindings,
refuse to adopt a bound or continuity identity whose recorded machine
ID disagrees with the report's, and rebuild bindings machine-qualified
after token reloads. Reports without a machine ID keep the legacy
binding shape and same-machine reinstalls keep their stable IDs.

Regression coverage: a state-layer test proving two shared-token pve01
machines keep distinct stable identities, continuity-match tests for
the machine guard, and an end-to-end router test walking the reporter's
estate - both install patterns, alternating reports, uninstall and
reinstall - asserting report auth never breaks and no token is revoked
while its sibling site still uses it.
2026-09-01 14:36:49 +01:00
..
ai.go Rework Patrol around outcome-driven autonomous operations 2026-08-14 12:52:51 +01:00
ai_additional_test.go Route service-context discovery through the Patrol model by default 2026-07-11 10:55:10 +01:00
ai_config_test.go Rework Patrol around outcome-driven autonomous operations 2026-08-14 12:52:51 +01:00
ai_legacy_guardrails_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
ai_nil_receiver_w0716_coverage_test.go Add pure branch-coverage tests for the fresh Patrol and Docker drop 2026-07-16 22:27:29 +01:00
ai_patrol_finding_notify_test.go Route new Patrol findings to alert notification channels 2026-07-18 11:59:05 +01:00
ai_provider_lifecycle_test.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
ai_providers.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
ai_usage_persistence_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
api_token_migration_atomic_test.go Enforce collector credential scope allowlists 2026-08-30 17:18:38 +01:00
api_tokens.go Enforce collector credential scope allowlists 2026-08-30 17:18:38 +01:00
api_tokens_additional_test.go Enforce collector credential scope allowlists 2026-08-30 17:18:38 +01:00
api_tokens_branchcov0718_test.go Add Go branch-coverage tests for twelve pure backend helpers 2026-07-19 15:10:09 +01:00
api_tokens_coverage_test.go fix(relay): introduce dedicated mobile runtime scope 2026-03-24 23:59:52 +00:00
api_tokens_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
audit_read_activity.go Replace the two non-discriminating audit telemetry fields and guard the class 2026-08-05 17:33:57 +01:00
availability.go Add multi-location service delivery evidence 2026-08-30 21:44:32 +01:00
availability_test.go Add multi-location service delivery evidence 2026-08-30 21:44:32 +01:00
billing_state.go Harden CodeQL storage and integer boundaries 2026-07-09 17:37:08 +01:00
billing_state_test.go Harden CodeQL storage and integer boundaries 2026-07-09 17:37:08 +01:00
branchcov0723pm_test.go Cover eval scenario catalog, control-plane printers and pure helpers 2026-07-23 16:42:08 +01:00
client_helpers.go
client_helpers_test.go fix: Update runtime config when toggling Docker update actions setting 2026-01-03 11:14:17 +00:00
code_standards_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
config.go Keep token migrations atomic 2026-08-29 07:24:30 +01:00
config_ai_effective_branchcov0716_test.go Add Go branch-coverage tests for models config securityutil and aicontracts helpers 2026-07-16 14:20:13 +01:00
config_ai_providers_static_branchcov0716_test.go Add Go branch-coverage tests for pure config and helper packages 2026-07-16 10:19:51 +01:00
config_availability_branchcov0716_test.go Add alert intent policies and delivery receipts 2026-07-20 20:27:39 +01:00
config_credential_masking_branchcov0716_test.go Add Go branch-coverage tests for pure config and helper packages 2026-07-16 10:19:51 +01:00
config_entitlement_billing_branchcov0716_test.go Add Go branch-coverage tests for models config securityutil and aicontracts helpers 2026-07-16 14:20:13 +01:00
config_env_overrides_test.go fix(config): restore legacy PORT fallback for FRONTEND_PORT with deprecation warning 2026-06-10 22:32:28 +01:00
config_load_env_test.go Retire self-hosted trial signup control plane 2026-04-28 17:02:04 +01:00
config_load_extra_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
config_load_extra_test.go Keep token migrations atomic 2026-08-29 07:24:30 +01:00
config_load_test.go Stop a failed system settings read from resetting settings silently 2026-08-20 14:34:05 +01:00
config_report_branding_branchcov0716_test.go Add Go branch-coverage tests for pure config and helper packages 2026-07-16 10:19:51 +01:00
config_report_schedules_branchcov0716_test.go Add Go branch-coverage tests for models config securityutil and aicontracts helpers 2026-07-16 14:20:13 +01:00
config_utils_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
config_validation_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
detect_public_url_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
detect_root.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
detect_root_test.go fix: env overrides and OS-aware test improvements 2026-01-22 13:49:05 +00:00
docker_metadata.go Complete canonical web interface links 2026-07-24 12:42:16 +01:00
docker_metadata_test.go Preserve resource URLs across runtime identity changes 2026-07-23 22:33:07 +01:00
docker_report_order.go Surface typed helper container degradation 2026-08-31 15:53:50 +01:00
docker_report_order_test.go Surface typed helper container degradation 2026-08-31 15:53:50 +01:00
entitlement_billing_state.go Support entitlement-backed quickstart bootstrap 2026-04-03 21:09:41 +01:00
export.go feat(alerts): add external dead-man monitoring 2026-08-27 16:27:46 +01:00
export_import_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
export_tenant_isolation_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
export_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
file_read_limits.go Preserve standalone host continuity across restart 2026-04-15 16:23:42 +01:00
guest_docker_load_test.go Give the Docker-in-LXC opt-in an admin Settings toggle 2026-08-20 14:27:12 +01:00
guest_metadata.go Let guest metadata writes finish before the monitor stops 2026-08-05 19:05:05 +01:00
guest_metadata_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
guest_metadata_test.go Let guest metadata writes finish before the monitor stops 2026-08-05 19:05:05 +01:00
host_continuity.go Stop shared-token same-hostname agents collapsing identities 2026-09-01 14:36:49 +01:00
host_continuity_test.go Stop shared-token same-hostname agents collapsing identities 2026-09-01 14:36:49 +01:00
host_metadata.go Complete canonical web interface links 2026-07-24 12:42:16 +01:00
host_metadata_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
import_transaction.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
import_transaction_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
import_transaction_test.go
metadata_helpers.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
metadata_load_limits_test.go Preserve standalone host continuity across restart 2026-04-15 16:23:42 +01:00
metadata_permissions_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
migration.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
migration_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
multi_tenant.go Harden multi-tenant persistence paths 2026-03-29 15:32:19 +01:00
multi_tenant_branchcov0722pm_test.go Cover SSO conversion, TrueNAS app mapping and config store round-trips 2026-07-22 16:18:00 +01:00
multi_tenant_test.go Harden multi-tenant persistence paths 2026-03-29 15:32:19 +01:00
node_test_tally.go Measure node connection test outcomes 2026-08-24 10:17:17 +01:00
node_test_tally_test.go Measure node connection test outcomes 2026-08-24 10:17:17 +01:00
oidc.go Fix legacy OIDC SSO discovery and CSP nonce 2026-07-07 09:54:14 +01:00
oidc_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
patrol_autopilot_persistence.go Enforce server-owned Patrol Autopilot acknowledgement 2026-07-11 23:12:00 +01:00
patrol_autopilot_persistence_test.go Enforce server-owned Patrol Autopilot acknowledgement 2026-07-11 23:12:00 +01:00
patrol_run_tally_test.go Stop failed reads from silently clobbering preserved save data 2026-08-20 14:49:59 +01:00
persistence.go Enforce collector credential scope allowlists 2026-08-30 17:18:38 +01:00
persistence_ai_branches_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
persistence_ai_suppression_test.go Stop failed reads from silently clobbering preserved save data 2026-08-20 14:49:59 +01:00
persistence_ai_test.go Remove the cloud_context_privacy dial; fix cloud context to a lean posture 2026-06-09 09:43:21 +01:00
persistence_aichat_branchcov0724pm_test.go Cover pure helpers and persistence round-trips across the backend 2026-07-25 00:21:35 +01:00
persistence_alert_intent.go Add alert intent policies and delivery receipts 2026-07-20 20:27:39 +01:00
persistence_alert_intent_test.go feat(alerts): add external dead-man monitoring 2026-08-27 16:27:46 +01:00
persistence_alerts_error_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
persistence_alerts_extra_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
persistence_alerts_normalization_test.go feat(alerts): add initial delivery routing 2026-07-30 15:37:53 +01:00
persistence_corrupt_preserve_test.go Preserve corrupt AI findings and chat files instead of clobbering them 2026-08-20 15:37:41 +01:00
persistence_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
persistence_deadlock_test.go
persistence_deadman_test.go feat(alerts): add external dead-man monitoring 2026-08-27 16:27:46 +01:00
persistence_env_update_test.go Remove dead autoUpdateCheckInterval and autoUpdateTime settings 2026-07-28 11:13:37 +01:00
persistence_extended_test.go Remove dead autoUpdateCheckInterval and autoUpdateTime settings 2026-07-28 11:13:37 +01:00
persistence_fail_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
persistence_init_test.go Canonicalize config persistence file roots 2026-03-29 14:56:33 +01:00
persistence_installation_scope.go Require installation auth for Patrol quickstart 2026-04-03 00:45:05 +01:00
persistence_installation_scope_test.go Require installation auth for Patrol quickstart 2026-04-03 00:45:05 +01:00
persistence_metadata_accessors.go Preserve resource URLs across runtime identity changes 2026-07-23 22:33:07 +01:00
persistence_metadata_test.go Preserve resource URLs across runtime identity changes 2026-07-23 22:33:07 +01:00
persistence_migration_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
persistence_nocrypto_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
persistence_nodes_recovery_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
persistence_nodes_save_test.go Clear all errcheck and gofmt violations so make lint gates on real findings 2026-06-09 21:42:21 +01:00
persistence_profiles_branchcov0724pm_test.go Cover pure helpers and persistence round-trips across the backend 2026-07-25 00:21:35 +01:00
persistence_profiles_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
persistence_relay.go Aggregate simplify-review cleanups (no behavior change) 2026-05-12 17:32:11 +01:00
persistence_relay_test.go Wire PULSE_RELAY_ENABLED and PULSE_RELAY_SERVER as real env overrides 2026-05-12 11:18:31 +01:00
persistence_save_errors_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
persistence_sso_coverage_test.go Fix legacy OIDC SSO discovery and CSP nonce 2026-07-07 09:54:14 +01:00
persistence_test.go Keep token migrations atomic 2026-08-29 07:24:30 +01:00
persistence_webhooks_migration_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
pve_instances.go Fix cross-site auto-registration identity matching 2026-08-04 22:58:36 +01:00
pve_instances_test.go Fix multi-organization Proxmox connection identity 2026-07-28 17:15:54 +01:00
pve_node_identity.go Add durable Proxmox node display names 2026-07-24 15:46:56 +01:00
pve_node_identity_branchcov0724pm_test.go Cover pure helpers and persistence round-trips across the backend 2026-07-25 00:21:35 +01:00
pve_node_identity_test.go Add durable Proxmox node display names 2026-07-24 15:46:56 +01:00
quickstart_billing_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
report_branding.go Add entitlement-gated report branding 2026-06-02 18:11:25 +01:00
report_schedules.go Add MSP report scheduling and alert rollup 2026-07-07 20:37:18 +01:00
report_schedules_branchcov0722pm_test.go Cover SSO conversion, TrueNAS app mapping and config store round-trips 2026-07-22 16:18:00 +01:00
sso.go Fix legacy OIDC SSO discovery and CSP nonce 2026-07-07 09:54:14 +01:00
sso_legacy_env_branchcov0723am_test.go Cover agent policy, alias normalization and agent report helpers 2026-07-23 06:44:33 +01:00
sso_test.go Harden SAML URL validation paths 2026-04-01 12:00:31 +01:00
truenas.go Require TrueNAS API key owner identity 2026-08-31 17:09:53 +01:00
truenas_test.go Require TrueNAS API key owner identity 2026-08-31 17:09:53 +01:00
vmware.go v6(settings): phase 8 — per-surface Monitor* scope for TrueNAS and VMware 2026-04-19 15:02:18 +01:00
vmware_test.go v6(settings): phase 8 — per-surface Monitor* scope for TrueNAS and VMware 2026-04-19 15:02:18 +01:00
watcher.go Keep token migrations atomic 2026-08-29 07:24:30 +01:00
watcher_extra_test.go Own ConfigWatcher API token persistence 2026-04-12 11:19:34 +01:00
watcher_fsnotify_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
watcher_init_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
watcher_test.go Keep API token watcher mutations ordered 2026-08-27 22:44:46 +01:00
workload_history_activity_tally.go Add workload history discovery lens 2026-08-30 13:49:58 +01:00
workload_history_activity_tally_test.go Add workload history discovery lens 2026-08-30 13:49:58 +01:00