v1.15.0
Highlights
OpenLDAP identifiers longer than 20 characters
Identifier validation is now chosen per directory type. Previously every server was held to Active Directory's sAMAccountName rules — a 20-character cap, no leading digit, a metacharacter blacklist — so an OpenLDAP uid longer than 20 characters was rejected with sAMAccountName too long before any query ran, and such users could not be looked up, authenticated, or have their password changed or reset. With IsActiveDirectory unset, identifiers now use the relaxed ValidateUID rules (RFC 4519 uid: no length cap beyond a 255-byte DoS bound, digits may lead, @/. are legal). Reported by @NuLL3rr0r in netresearch/ldap-selfservice-password-changer#666; fixed in #211.
Security hardening of identifier handling (#217)
- Pooled connections no longer leak identity. A password check binds a borrowed connection as the end user; when pooling was enabled that connection returned to the pool still bound as the user, so the next borrower ran under the user's identity. The service-account bind is now restored before release (#213).
maskSensitiveDatadropped a carve-out that returned identifiers containingtest.com/example.comin cleartext, and now masks by rune so multibyte identifiers are not garbled (#215).- Rate-limit and cache keys are normalized, so case variants (and, for DNs, whitespace variants) of one account share a lockout counter instead of resetting it (#216).
UserBuilder.WithSAMAccountNameaccepts valid OpenLDAP uids; the standaloneValidatorstays strict as an advisory threat gate (#214).
Breaking
- Minimum Go is now 1.26 (
godirective 1.25 → 1.26; toolchaingo1.27.0). Consumers must build with Go 1.26 or later. Theerrors.Ascall sites moved to the type-safeerrors.AsType[T](#212).
Notes
A pre-existing user-enumeration timing oracle on the DN authentication path is tracked in #219.
Full changes in CHANGELOG.md.