-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Security
-
Fully Compatible
-
ALL
-
v9.0, v8.3, v8.2, v8.0, v7.0
-
Server Security 2026-07-17, Server Security 2026-07-31, Server Security 2026-08-14, Server Security 2026-08-28, Server Security 2026-09-11
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Reset the bind identity when a connection is returned to the pool, and/or always establish the intended search identity in getConnectionWithOptions regardless of shouldBind().
In WrappedConnection's return-to-pool path, unbind (or mark the session as needing rebind) so no pooled connection ever carries an end-user identity into a later operation.
In getConnectionWithOptions, when shouldBind() is false but currentBoundUser() is set, force an anonymous rebind before returning the connection for a query, rather than skipping the rebind block entirely. The current guard conflates "no configured query user" with "connection is safe to reuse as-is."
Acceptance Criteria
- With LDAP authorization configured and no ldapQueryUser, a role lookup after an end-user PLAIN authentication executes under the anonymous bind, not the end-user's DN.
- Role sets computed for a user are independent of which other users recently authenticated.
- Deployments that do configure ldapQueryUser continue to rebind to the query user as before.
Test Coverage
- Unit/integration test: authenticate user A via PLAIN, then trigger a role lookup for user B; assert the search bind identity is anonymous (or the configured query user), never A's DN.
- Integration test with a mock LDAP server that returns different group memberships for anonymous vs an authenticated DN; assert the computed roles match the anonymous-bind result regardless of prior authentications.