docs(docker-dev): #1116 correct POST /api/deployments responses; SEC-36 stale LDAP bind default + login flip recipe
This commit is contained in:
+17
-3
@@ -135,7 +135,16 @@ The first build takes a few minutes (.NET SDK image + restore + publish). **No m
|
|||||||
|
|
||||||
Central nodes authenticate against the shared GLAuth at `10.100.0.35:3893` (baseDN `dc=zb,dc=local`). `DevStubMode` is **not** active. Sign in with any test user (password `password`); `multi-role` / `password` returns all three roles (Administrator, Designer, Viewer). Group→role mappings are seeded by `seed/seed-clusters.sql`. The GLAuth source of truth + deploy runbook is in `scadaproj/infra/glauth/`. **Do not** enable `DevStubMode` outside local debugging — production must always bind a real LDAP backend.
|
Central nodes authenticate against the shared GLAuth at `10.100.0.35:3893` (baseDN `dc=zb,dc=local`). `DevStubMode` is **not** active. Sign in with any test user (password `password`); `multi-role` / `password` returns all three roles (Administrator, Designer, Viewer). Group→role mappings are seeded by `seed/seed-clusters.sql`. The GLAuth source of truth + deploy runbook is in `scadaproj/infra/glauth/`. **Do not** enable `DevStubMode` outside local debugging — production must always bind a real LDAP backend.
|
||||||
|
|
||||||
The LDAP service-account bind password is read from the host env var `OTOPCUA_LDAP_BIND_PASSWORD` (compose default `serviceaccount123`, the committed dev password of the shared GLAuth, so the rig works with nothing set). Export it before `docker compose up` to bind with a different password (#619).
|
The LDAP service-account bind password is read from the host env var `OTOPCUA_LDAP_BIND_PASSWORD` (#619). **The compose default (`serviceaccount123`) is stale since SEC-36**: the shared GLAuth's `serviceaccount` password was rotated out-of-band and is deliberately not recorded in any repo (see `~/Desktop/scadaproj/infra/glauth/README.md`, "Users"). The default is fine with login disabled (the rig's default, `Security__Auth__DisableLogin: "true"`, never binds), but any **login-enabled** gate must export the current value from the owner / secret store first, and never commit it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export OTOPCUA_LDAP_BIND_PASSWORD='<current value from the owner/secret store>'
|
||||||
|
export OTOPCUA_DISABLE_LOGIN=false # real cookie login flow on central-1/central-2
|
||||||
|
./docker-dev/compose.sh up -d # recreates central-1/central-2 with login on
|
||||||
|
# ...run the gate; sign in as e.g. multi-role / password...
|
||||||
|
unset OTOPCUA_DISABLE_LOGIN OTOPCUA_LDAP_BIND_PASSWORD # back to the default (login disabled)
|
||||||
|
./docker-dev/compose.sh up -d
|
||||||
|
```
|
||||||
|
|
||||||
## Headless deploy
|
## Headless deploy
|
||||||
|
|
||||||
@@ -153,8 +162,13 @@ The body is optional and the no-body form is fully supported (verified on this r
|
|||||||
the minimal-API `DeployRequest?` parameter binds a missing body *and* a `Content-Length: 0` body
|
the minimal-API `DeployRequest?` parameter binds a missing body *and* a `Content-Length: 0` body
|
||||||
as **null** — it does not 400 — and the handler defaults the audit field to
|
as **null** — it does not 400 — and the handler defaults the audit field to
|
||||||
`CreatedBy = "rest-api"`. A bare `./docker-dev/deploy.sh` answers `202 Accepted` with the new
|
`CreatedBy = "rest-api"`. A bare `./docker-dev/deploy.sh` answers `202 Accepted` with the new
|
||||||
`deploymentId` + `revisionHash`, `200` when there is nothing to deploy, and `409` while another
|
`deploymentId` + `revisionHash`. A repeat POST is **not** a no-op: it creates a new deployment (it may
|
||||||
deployment is still in flight.
|
reuse the previous revision hash) and answers `202` again. The other answers are `202` with a
|
||||||
|
`Location` to poll when the outcome is unknown (the ask timed out; the deployment may still go
|
||||||
|
ahead), `409` while another deployment is still in flight, `422` when the deployment is rejected
|
||||||
|
(validation / deploy gates), `401` for a missing/bad API key, `503` when the deploy API is not
|
||||||
|
configured or available, and `500` for an unexpected outcome. (`DeployApiEndpoints.cs` maps a
|
||||||
|
`NoChanges` outcome to `200`, but nothing currently produces it.)
|
||||||
|
|
||||||
### First-POST 404 — mechanism CONFIRMED (2026-08-18)
|
### First-POST 404 — mechanism CONFIRMED (2026-08-18)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user