Skip to content

branch-4.1:[fix](ldap) Improve LDAP authentication resiliency and diagnostics (#61673)#63288

Open
seawinde wants to merge 1 commit into
apache:branch-4.1from
seawinde:pr_61673_to_branch-4.1
Open

branch-4.1:[fix](ldap) Improve LDAP authentication resiliency and diagnostics (#61673)#63288
seawinde wants to merge 1 commit into
apache:branch-4.1from
seawinde:pr_61673_to_branch-4.1

Conversation

@seawinde
Copy link
Copy Markdown
Member

pr: #61673
commitId: ab94e99

…pache#61673)

This PR addresses several issues in the FE LDAP authentication path that
could lead to login hangs, indefinite blocking, unstable search latency,
and poor observability when the LDAP server is slow or unavailable.

  The main changes are:

- Add configurable LDAP timeouts, `ldap_connect_timeout_ms` and
`ldap_read_timeout_ms` (both default to 5000 ms), so LDAP bind and
search operations do not block indefinitely.
- Fix LDAP search connection management by removing the conflicting JNDI
built-in pooling configuration and adding `ldap_search_use_pool` to
support both pooled and non-pooled search mode.
- Improve diagnosability by adding structured performance logs across
the LDAP authentication chain, including password resolution, bind, user
lookup, group lookup, cache hit/miss, and authentication result.

Together, these changes improve FE LDAP authentication stability, make
timeout behavior explicit and configurable, reduce the risk of login
stalls, and provide better diagnostics for production issues.
@seawinde seawinde requested a review from yiguolei as a code owner May 15, 2026 07:16
@seawinde
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 1.40% (2/143) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants