feat(admin): #1078 headless POST /api/cluster/failover (key-gated, same service+audit) and unattended SCM-restart gate

fix(install): #1075 worker identity gets read+execute (not Modify) on <PeCacheDir>\pe; re-run replaces the old grant
This commit is contained in:
Joseph Doherty
2026-12-03 16:29:27 -05:00
parent fe4bbbe256
commit 762bcd7b8d
10 changed files with 229 additions and 12 deletions
+1
View File
@@ -555,6 +555,7 @@ advertises `ServiceLevel` 250. OPC UA clients re-select.
| Peer guard | Disabled, with the reason as its tooltip, when fewer than two Up driver members exist — with one node a "failover" is a shutdown. Re-evaluated inside the service against live state, so a stale page cannot bypass it. |
| Confirmation | A dialog naming the node, and what follows (restart, ServiceLevel 250 moves, clients re-select). |
| Audit | Written through the shared `ZB.MOM.WW.Audit.IAuditWriter` seam **before** the Leave — action `cluster.manual-failover`, actor, target. A *refused* failover changes nothing and writes nothing. |
| Headless trigger (#1078) | `POST /api/cluster/failover` on an **admin** node (`ManualFailoverApiEndpoints`) calls the same `IManualFailoverService.FailOverDriverPrimaryAsync` — same peer guard, same `cluster.manual-failover` audit (actor `rest-api`, or `rest-api:<X-Actor header>`). Auth is the `DeployApiEndpoints` model, not the `FleetAdmin` cookie policy (an unattended script cannot do an LDAP login): header `X-Api-Key` == **`Security:FailoverApiKey`**, fixed-time compare, a key **separate from `Security:DeployApiKey`**; unset ⇒ `503` (disabled), wrong/missing ⇒ `401`, no peer ⇒ `409` (nothing changed or audited), accepted ⇒ `202 { outcome, leavingNode }`. Acts on the Primary of the answering node's own mesh. Used by `scripts/install/tests/Test-ScmRestartAfterClusterExit.Windows.ps1 -FailoverUrl … -FailoverApiKey …`. Treat the key as an Administrator credential. |
Phase 6 of the mesh program (see [Per-cluster meshes (Phase 6)](#per-cluster-meshes-phase-6)) split
the fleet into one 2-node mesh per application `Cluster`, so the button now acts on **this pair's own**