deploy(vd03): 2e0ce81e (#144/#145) + NAM AD login on DEV
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# 2026-11-19: DEV (wonder-app-vd03) `061432c8` → `2e0ce81e` (#144 + #145, no role no login), then NAM AD login on
|
||||
|
||||
**Owner go (2026-11-19):** "ok, do it. winrm usage approved (for the vd03 deploy)", as the first step of the DEV NAM
|
||||
LDAP cutover (scadaproj plan `docs/plans/2026-11-15-nam-ldap-cutover.md` §0; record
|
||||
`scadaproj/docs/deploy/2026-11-19-vd03-nam-ldap/`).
|
||||
|
||||
**Build:** `main` @ `2e0ce81e`, ProductVersion `1.0.0+2e0ce81ea04ac5e85ddb654cf33068594ba5c3c4`. Host and CLI
|
||||
self-contained win-x64 from a clean detached worktree: 1056 app files, 224 cli files. The zip is 130 508 202 B, SHA-256
|
||||
`6c706b0a76b7e9ec7ca00e12cea19c5d86814beaf66b541f527cbfc3d6572e23`.
|
||||
|
||||
**Delta:** 11 commits: #144 (`5a642d1c`, `2d8d5a3d`, `764e75c3`), #145 (`1d2170a1`, `a5243b1e`) and the #116
|
||||
`leader-auto-down` default (`5bf6d1fa`, already drilled on vd03 2026-11-15). **No migration** (65 stays 65), no env change.
|
||||
|
||||
**Script:** `docs/deployment/deploy-prep/2026-11-19-144-145/dev-deploy.ps1`, derived from the 11-15 pack with the
|
||||
migration and env steps removed. On-box notes: `E:\ApiInstall\ScadaBridge\_DEPLOY-NOTES-2e0ce81e-20261119T145229.txt`.
|
||||
|
||||
## Window
|
||||
|
||||
| Step | Local (EST) |
|
||||
|---|---|
|
||||
| Preflight: live `061432c8`, staged `2e0ce81e` Host+CLI, 65 migrations, AuditLog 2 856 rows | 14:52:30 → 14:52:42 |
|
||||
| `reg export` both service keys; DB backup `E:\ApiInstall\ScadaBridge-backups\ScadaBridge_pre-2e0ce81e_20261119T145229.bak` (132 222 976 B, VERIFYONLY ok); appsettings kept | → 14:52:45 |
|
||||
| Stop Site, then Central | 14:52:45 → 14:53:06 |
|
||||
| Swap `app`/`cli` → `*.bak.20261119T145229`; appsettings restored (hash match) | → 14:53:12 |
|
||||
| Central ready, Site ready | 14:53:24 / 14:53:33 |
|
||||
|
||||
**Downtime:** site data path ~47 s, central API ~30 s.
|
||||
|
||||
## Gates
|
||||
|
||||
- Health ready 200 (central `:8085`, site `:8084`); both services `FAILURE_ACTIONS_ON_NONCRASH_FAILURES: TRUE`.
|
||||
- No retired-key warning in the central log.
|
||||
- Bogus inbound `X-API-Key` → 401.
|
||||
- CLI (login still off) `instance list` → 6 instances.
|
||||
|
||||
## Then: NAM AD login on (same day, 15:11)
|
||||
|
||||
- `appsettings.Central.json`: `ScadaBridge:Security:Ldap` → NAM (LDAPS nam1 + nam2 fallback, `svc_igntadmin`,
|
||||
`${secret:nam-ldap-svc-password}`, `sAMAccountName`); the `Auth` block (`DisableLogin` + `AllowOutsideDevelopment`) removed.
|
||||
- Central env: `ScadaBridge__Security__Ldap__ServiceAccountPassword` (GLAuth) removed, 12 → 11 entries.
|
||||
- Central restarted; Site not restarted.
|
||||
- **Zero-role proven live** before any `UG_WW_*` row existed: `dohertj2` was refused at `/auth/login`, at `/auth/token`
|
||||
and on the CLI. Log: "the LDAP bind succeeded but none of the user's 176 group(s) maps to a ScadaBridge role".
|
||||
- `LdapGroupMappings` rows 6–9 added by SQL: `UG_WW_APP_ADMIN_DEV`→Administrator, `UG_WW_APP_IDE_DEV`→Designer,
|
||||
`UG_WW_APP_IDE_RO_DEV`→Viewer, `UG_WW_HIST_ADMIN_DEV`→Deployer (DEV interim until `UG_WW_APP_DEPLOY_DEV` exists).
|
||||
- Then `dohertj2`: cookie login ✓, `/auth/token` 200 with Administrator+Designer+Deployer, CLI `instance list` and
|
||||
`security role-mapping list` ✓.
|
||||
- MxGateway connection Connected, 810/810, good 399 / bad 411 (baseline).
|
||||
|
||||
**Automation identity on DEV is now `dohertj2`** (HTTP Basic / `--password-file`); the login-off dev user is gone.
|
||||
|
||||
## Rollback
|
||||
|
||||
- **LDAP only:** restore `E:\ApiInstall\_ldapcut-20261119T145640\sb-appsettings.Central.json.pre-cutover` as
|
||||
`app\appsettings.Central.json`, `reg import …\reg-ScadaBridge-Central.reg`, restart Central.
|
||||
- **Binaries:** stop Site then Central; `app`/`cli` ← `*.bak.20261119T145229`; start Central then Site. No DB restore is
|
||||
needed (schema unchanged); the backup above is there for safety.
|
||||
Reference in New Issue
Block a user