diff --git a/docs/deploy/2026-11-19-vd03-qa-cdf433a3-nam-ldap.md b/docs/deploy/2026-11-19-vd03-qa-cdf433a3-nam-ldap.md new file mode 100644 index 000000000..c1a47f69e --- /dev/null +++ b/docs/deploy/2026-11-19-vd03-qa-cdf433a3-nam-ldap.md @@ -0,0 +1,65 @@ +# 2026-11-19: DEV vd03 + QA vq03/vq04 on `cdf433a3`, AdminUI login on NAM AD + +`master` `76e73e7d` → `cdf433a3` (83 commits, **no migration**; carries #913: LDAP options passthrough incl. +`FallbackServers`, zero-role refusal at `/auth/login` and `/auth/token`, library logger), then the AdminUI login moved to +NAM AD as part of the family cutover (scadaproj plan `docs/plans/2026-11-15-nam-ldap-cutover.md` §0 DEV, §0Q QA). Owner +approvals 2026-11-19: "ok, do it. winrm usage approved (for the vd03 deploy)" and "do the qa ldap plan, winrm usage +approved". Family records: scadaproj `docs/deploy/2026-11-19-vd03-nam-ldap/` and `docs/deploy/2026-11-19-qa-nam-ldap/`. +**No rollback.** + +| | | +|---|---| +| Package | `otopcua-cdf433a3.zip` sha256 `c89ba97295a2a8de0a9941918abfd349e881b4b58f4e50a071b1eb0b9ef9887c`, 1410 files, ProductVersion `1.0.0+cdf433a3512353de…`; deps LocalDb(+Replication) 0.3.8, HistorianGateway.Client 1.1.0, Theme 1.0.1, Secrets.Ui 1.0.1 | +| Installer | `Install-ScriptWorkerIsolation.ps1` `bb31d275…`, `ScriptWorkerIsolation.psm1` `4c1c9d0b…`, `Invoke-OtOpcUaInstallSwap.ps1` `10c07bd0…` (the #908 process-exit wait) | +| Staged | vd03 `E:\ApiInstall\_stage-otopcua-cdf433a3\`; QA `E:\psrem-stage\otopcua-cdf433a3\` (pulled from vd03 over SMB, re-hashed) | + +## DEV wonder-app-vd03 (single node, redundancy `Mode` unset) + +| Step | Result | +|---|---| +| Prepare (service up) | zip hash, 1410 files, version, deps ok; `OtOpcUaHost.reg` + ConfigDb `COPY_ONLY` backup in `E:\ApiInstall\OtOpcUa-backups\pre-20261119-otopcua-cdf433a3\`; pre-window `-Verify` OK 14/14; swap `-WhatIf` ok | +| Swap (`-NoStart`) | invoked 18:52:40Z; `stop -> swapped and verified: 6.5 s`; `OtOpcUa-data` backed up while stopped | +| Start | 18:53:15.6Z → ready 18:53:23.0Z (7.5 s). **Downtime ~14.5 s.** Post-start `-Verify` OK 14/14; env unchanged (34 entries) | +| Gates | health 5/5, ServiceLevel 250, Mode unset, historian probe reachable, 23 raw tags `failed=0` | +| 20:14Z NAM login | env +18: `Security__Ldap__{Enabled=true, DevStubMode=false, Server=uswap-vdc-nam1.nam.zimmer.com, Port=636, Transport=Ldaps, AllowInsecure=false, FallbackServers__0=uswap-vdc-nam2.nam.zimmer.com:636, SearchBase=DC=nam,DC=zimmer,DC=com, ServiceAccountDn=svc_igntadmin@nam.zimmer.com, ServiceAccountPassword=${secret:nam-ldap-svc-password}, UserNameAttribute=sAMAccountName, DisplayNameAttribute=name, GroupAttribute=memberOf, BindMode=ServiceAccount}` + `GroupToRole__UG_WW_APP_ADMIN_DEV=Administrator`, `…APP_IDE_DEV=Designer`, `…APP_IDE_RO_DEV=Viewer`, `…HIST_ADMIN_DEV=Viewer`; `Security__Auth__DisableLogin` true → false; restart (~9 s) | +| 20:15Z cookie | **AdminUI login looped over plain HTTP**: `Security:Cookie:RequireHttpsCookie` defaults to `true`, so the auth cookie is `Secure` and never comes back over `http://…:9000`. Added `Security__Cookie__RequireHttpsCookie=false`; restart (~9 s) | +| Login gates | anonymous → `/login`; bogus refused; `dohertj2` cookie login + `GET /` 200; `/auth/token` 200 roles Viewer+Designer+Administrator; no service-bind warning | + +## QA wonder-app-vq03 + vq04 (Warm pair; one window: the binary swap and the LDAP change share one start) + +Before: vq04 Primary (250), vq03 Standby (90), `OpcUa__Redundancy__Mode=Warm`. Secret `nam-ldap-svc-password` seeded +into each node's `data\secrets.db` (KEK `C:\ProgramData\ZB\kek\otopcua.kek`; secret replication is off) and read back. +Scripts: the 11-13 QA pack retargeted (`otopcua-prepare.ps1`, `otopcua-swap2.ps1`, `otopcua-start.ps1` in the scadaproj +QA record); the pack's "no redundancy keys" refusal was dropped, since QA runs Warm. + +| Step | vq03 (Standby) | vq04 (Primary) | +|---|---|---| +| Prepare (service up) | 1410 files ok; ConfigDb `OtOpcUaConfig_pre-cdf433a3_20261119.bak` + VERIFYONLY; 9 migrations; pre-window `-Verify` OK | same (no DB step) | +| Swap (`-NoStart`, first vq03 while vq04 served) | 21:07:55Z swapped and verified, 6.2 s; data + pki backed up; **no `file in use` retry** | stop issued 21:08:33.6Z; swapped and verified 12.2 s | +| Env (stopped) | `env-otopcua.ps1` 51 → 61 | 50 → 60 | +| Start | 21:09:41.7Z → ready 21:09:49.8Z (8.0 s) | 21:08:51.4Z → ready 21:09:29.2Z (37.8 s, first node up alone) | +| Post-start `-Verify` | OK 21/21 | OK 21/21 | + +Env change on each node: the nine GLAuth `Security__Ldap__*` entries replaced by the NAM block above plus +`Security__Ldap__GroupToRole__UG_WW_APP_ADMIN_QA=Administrator`, `…APP_IDE_QA=Designer`, `…APP_IDE_RO_QA=Viewer`, +`…HIST_ADMIN_QA=Viewer` and `Security__Cookie__RequireHttpsCookie=false`. `Security__Auth__DisableLogin` was already +false on QA. **Pair outage ~56 s** (vq04 stop → vq04 ready; 11-13 was 36.5 s). + +**Gates:** vq04 Primary **250** (`otopcua_redundancy_warm_role` 1), vq03 Standby **90**; `localdb_oplog_depth` 0 and +replication connected on both; script workers up (shards 0, 1) on both; ScadaBridge `WarmCanary` reconnected to the +Primary, 2/2 Good. Login: anonymous → `/login`; bogus refused on both; `dohertj2` cookie login + `GET /` 200 (no +loop); `/auth/token` 200 roles **Viewer+Designer+Administrator**. No LDAP or service-bind warning in the OTel export. + +## Rollback + +- Binaries: vd03 `_stage-otopcua-cdf433a3\rollback.ps1` (→ `OtOpcUa.bak.20261119-pre-cdf433a3`); QA: stop both, swap + `app.bak.20261119-pre-cdf433a3` back with `Invoke-OtOpcUaInstallSwap.ps1 -NoCarry -NoStart`, restore `data\` from + `E:\psrem-stage\otopcua-cdf433a3\backup`, start both. +- LDAP: `reg import` the pre-cutover `OtOpcUaHost` export — vd03 `E:\ApiInstall\_ldapcut-20261119T145640\reg-OtOpcUaHost.reg`, + QA `E:\ApiInstall\_ldapcut-20261119T152947\` (vq03) / `…T152958\` (vq04) — then restart. + +## Notes + +- The cookie default (`RequireHttpsCookie=true`) breaks AdminUI login on every plain-HTTP tier; any tier without TLS + needs the env entry until TLS lands. +- Existing noise, not caused here: "Mesh PSK secret `ot-mesh-psk-dev` for cluster DEV is absent" on QA.