[Auth] Live-verify user-bind identity + AD forest checks against real AD before publishing 0.4.4 #51
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before publishing Auth 0.4.4 (scadaproj#40, #50): live-verify the user-bind identity checks against a real AD — the "Who am I?" bound-identity match (#40) and the msDS-PrincipalName / unique-sAMAccountName forest check (#50) were tested only against GLAuth and unit fakes. Include BTDB Manager's single-domain User-mode setup (NAM AD). Also consider: a misconfigured SQL Server key-store section still throws on first store creation outside VerifyAsync (no startup validation, to avoid breaking hosts that register but don't configure it); LocalDb snapshot rows dead-lettered past MaxSnapshotDeferredRows or as orphans are never re-sent (no re-request path).
Live-verified against the NAM AD on 2026-11-12, then published as Auth 0.5.0. 0.5.0 carries 0.4.2–0.4.4 plus the new passwordless
ILdapGroupLookup(ScadaBridge#46). Commitsf5ef0ef(code) andf98ba08(index) are onmain.Method. A scratch harness drove the real
LdapAuthService(0.5.0 source) againstuswap-vdc-nam1/2. It bound with the user's own NAM account (permission given for this) and the service accountsvc_igntadmin. Both passwords came from the Keychain through the winrm CLI'skeyringand were passed to the process environment only. The output was scanned for both secrets: no leak. The user's account received one wrong-password attempt in total.User-bind identity (#40): PASS
BindMode=User,NAM\{0}, LDAPS 636 with failover to nam2: sign-in succeeds, with the same 176 groups as ServiceAccount mode. This is BTDB Manager's production shape: User mode, LDAPS,sAMAccountName, down-level template.{0}@nam.zimmer.comsucceeds. A typedNAM\nameis accepted, and refused with no bind whenAcceptDomainQualifiedNames=false. A wrong password givesBadCredentials.u:NAM\<sAMAccountName>. A base read returnsmsDS-PrincipalNameequal to that answer. Another account'smsDS-PrincipalNamediffers (negative control).msDS-PrincipalNamecomparison mutated to a wrong domain, every user-bind sign-in failsGroupLookupFailed(DC and GC) while the ServiceAccount paths stay green. That comparison is what decides against real AD.AD forest (#50): PASS
DC=zimmer,DC=com. The user'ssAMAccountNamehas exactly 1 holder across the forest in the Global Catalog.msDS-PrincipalNametoo.Service-account path (0.4.4) and the new lookup: PASS
GetUserGroupsAsyncreturns the same groups, username and display name, and canonicalises an upper-cased name. Unknown name givesUserNotFound. A real disabled AD account givesUserDisabled.DirectoryUnavailable. StartTLS 389 works. User mode givesNotSupported.Considered, not done (outside the acceptance): a misconfigured SQL Server key-store section still throws on first resolve, which is documented in the README. The LocalDb dead-letter re-request path belongs to the LocalDb lib.
Feed: all five packages are at
0.5.0, and registration lists 0.5.0. SHA256 of each downloaded copy matches the local pack:6de01b87…3b91310229fcd…0aee761e9153…41c67c4ed77ea8c…6e117175ffcd2…d9ce9