docs(security): AdminUI LDAP failover/bind-mode keys, no-role-no-login, validator scope (#913)
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
This commit is contained in:
+23
-1
@@ -116,7 +116,29 @@ Until #678.6 the overlay never loaded on a node carrying a `cluster-*` role (the
|
||||
|
||||
> **Flipping `Security:Acl:Enabled` is a config change, not a redeploy** — both paths are wired in both modes (the node builds its permission trie on every deploy regardless), the same dark-switch discipline as [`MeshTransport`](#meshtransport), [`ConfigSource`](#configsource) and [`Telemetry`](#telemetry). It defaults off because the first deployment carrying the code would otherwise start denying every client that has no key, **including ScadaBridge's Data Connection Layer, which consumes this address space from another repo.** Enforcement fails closed on every unresolvable case, so a wiring or config mistake presents as *everything denied* — check the `OpcUaPublish: data-plane authority generation N installed` line for a non-zero grant count before debugging an individual rule. See [`security.md` § Node ACL enforcement](security.md#node-acl-enforcement-securityaclenabled).
|
||||
|
||||
**`Security:Ldap` — see [`security.md`](security.md) for the full field-by-field reference and bind-flow.** The checked-in role overlays set only `DevStubMode` and `Transport`; the remaining `LdapOptions` fields (`Enabled`, `Server`, `Port`, `AllowInsecure`, `SearchBase`, `ServiceAccountDn`, `ServiceAccountPassword`, `GroupAttribute`, `DisplayNameAttribute`, `UserNameAttribute`, `GroupToRole`) are covered there.
|
||||
**`Security:Ldap` — see [`security.md`](security.md) for the full field-by-field reference and bind-flow.** The checked-in role overlays set only `DevStubMode` and `Transport`; the remaining `LdapOptions` fields (`Enabled`, `Server`, `Port`, `AllowInsecure`, `SearchBase`, `ServiceAccountDn`, `ServiceAccountPassword`, `GroupAttribute`, `DisplayNameAttribute`, `UserNameAttribute`, `GroupToRole`, `ConnectionTimeoutMs`, `FallbackServers`, `BindMode`, `UserBindTemplate`, `AcceptDomainQualifiedNames`) are covered there.
|
||||
|
||||
<a id="securityldap"></a>
|
||||
**AD with two domain controllers (lmxopcua#913).** `FallbackServers`, `BindMode`, `UserBindTemplate` and `AcceptDomainQualifiedNames` are passed through to the shared `ZB.MOM.WW.Auth.Ldap` client (before #913 they were silently dropped, so there was no DC failover). A NAM-shaped service-env block (values are illustrative — the real hosts, DN and groups come from the cutover plan):
|
||||
|
||||
```text
|
||||
Security__Ldap__Enabled=true
|
||||
Security__Ldap__Server=dc1.nam.example.com
|
||||
Security__Ldap__Port=389
|
||||
Security__Ldap__Transport=None
|
||||
Security__Ldap__AllowInsecure=true
|
||||
Security__Ldap__FallbackServers__0=dc2.nam.example.com
|
||||
Security__Ldap__SearchBase=DC=nam,DC=example,DC=com
|
||||
Security__Ldap__ServiceAccountDn=<service account DN or UPN>
|
||||
Security__Ldap__ServiceAccountPassword=${secret:...}
|
||||
Security__Ldap__UserNameAttribute=sAMAccountName
|
||||
Security__Ldap__DisplayNameAttribute=displayName
|
||||
Security__Ldap__GroupToRole__<AD group>=Viewer
|
||||
```
|
||||
|
||||
- **Type the bare `sAMAccountName`** at the AdminUI login. In the default `BindMode=ServiceAccount`, `AcceptDomainQualifiedNames` has no effect, so `NAM\jdoe` or `jdoe@nam…` does not match the search.
|
||||
- **No role, no login:** a user whose groups map to no role (through `GroupToRole` or a system-wide DB grant) is refused at `/auth/login` (401 / "not authorized") and gets no `/auth/token`; a role-mapper fault refuses too. See [`security.md`](security.md#ldap-bind-flow-otopcualdapauthservice).
|
||||
- Startup validation checks each `FallbackServers` entry and, in `BindMode=User`, that `UserBindTemplate` contains `{0}` exactly once. `ServiceAccountDn` is **not** required at startup.
|
||||
|
||||
**`Security:Jwt`** key fields (`JwtOptions`):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user