Slow performance with LDAP user.

161 views
Skip to first unread message

Facu Basgall

unread,
Aug 26, 2025, 2:59:56 PMAug 26
to Wazuh | Mailing List

Hello. I have integrated Wazuh with LDAP, but I notice that when I log in with a valid AD user, Wazuh responds much (much!) slower and takes much longer to process web requests.

With the default “admin” user, it works normally.

Juan Felipe González Ortiz

unread,
Aug 26, 2025, 4:40:06 PMAug 26
to Wazuh | Mailing List
Hi Facu, I'll look into it and let you know what I find out.

Juan Felipe González Ortiz

unread,
Aug 28, 2025, 11:21:16 AMAug 28
to Wazuh | Mailing List

Hi Facu,

Thanks for reaching out and reporting this behavior. It’s possible that the indexer is attempting to check other authentication backends before validating against LDAP, which can cause the login to feel much slower.

To better understand your setup, could you please share the following files (feel free to redact any sensitive information):

  • /etc/wazuh-indexer/opensearch-security/config.yml

  • /etc/wazuh-indexer/opensearch-security/roles_mapping.yml

Facu Basgall

unread,
Aug 28, 2025, 2:02:13 PMAug 28
to Wazuh | Mailing List

Hi, I am sharing the requested files with you.

ldap_roles_mapping.yml
ldap_config.yml

Juan Felipe González Ortiz

unread,
Sep 1, 2025, 11:29:33 AMSep 1
to Wazuh | Mailing List

Here’s the English version of the response:


Hi Facu,

We’ve reviewed your case and, at first glance, your configuration looks correct. To move forward, our team will simulate an LDAP environment and test some scenarios.

In the meantime, could you share how many groups and users you currently have in your directory? This detail is important since the number of objects can directly affect the LDAP performance with Wazuh.

Facu Basgall

unread,
Sep 1, 2025, 11:45:58 AMSep 1
to Wazuh | Mailing List

Hi! How many groups and users in the AD in general or in the Wazuh Admin and Wazuh Readers groups?

Juan Felipe González Ortiz

unread,
Sep 2, 2025, 11:12:13 AMSep 2
to Wazuh | Mailing List
Hi, In the Wazuh groups, but also if it's possible the total amount of groups.

This is to be able to replicate an environment as similar to yours as possible.

Facu Basgall

unread,
Sep 3, 2025, 10:38:58 AMSep 3
to Wazuh | Mailing List

Good.

I have in my AD approximately 4900 users, 9200 groups

But in the Wazuh Admin group I have only 7 users and in the Wazuh Readers group only 3 users.

Juan Felipe González Ortiz

unread,
Sep 4, 2025, 9:02:39 AMSep 4
to Wazuh | Mailing List

Hi, most likely the poor performance is due to the users and groups issue. 

I'm going to set up an environment simulating that number of groups and users and let you know.

Juan Felipe González Ortiz

unread,
Sep 10, 2025, 12:13:01 AMSep 10
to Wazuh | Mailing List

Hi Facu,

Thanks again for sharing the details of your environment. We’ve been reviewing the behavior and, as you mentioned, the large number of groups (around 9200) and users (about 4900) in your AD could be contributing to the performance degradation when logging in with LDAP accounts.

We are currently setting up a test environment that simulates a similar scale of users and groups in order to validate whether this is the main factor impacting the performance of Wazuh when authenticating via LDAP. Once we finish the simulation, we’ll be able to confirm and share possible optimizations or workarounds.

In the meantime, could you also let us know if the latency happens only during the initial login or if it also affects subsequent requests after authentication? That detail will help us narrow down whether the issue is strictly related to group resolution at login time or if it continues while handling queries.

We’ll keep you updated as soon as we have results from the simulation.

Facu Basgall

unread,
Sep 10, 2025, 8:57:39 AMSep 10
to Wazuh | Mailing List

Hi Juan, thanks for your answer

The slowness in wazuh occurs in all requests or web browsing, it is not only a specific case of the login. 

Juan Felipe González Ortiz

unread,
Sep 16, 2025, 4:49:38 PMSep 16
to Wazuh | Mailing List

We’ve been running some tests on our side to better understand the behavior you described with LDAP users being slower in the Wazuh web interface.

Using a local LDAP environment, we created a test user and compared API response times against the default admin user. We ran multiple benchmarks (20–50 requests per user, measuring both authenticate and GET /security/users/<user>). The results show that response times are consistently fast (<0.03s) for both users, regardless of whether they are local or LDAP. This suggests that the slowdown is not happening at the API/LDAP level, but rather somewhere else in the Wazuh web interface layer (UI rendering, role mapping, multiple API calls in parallel, etc.).

Since you mentioned your environment has around 4900 users and 9200 groups, it’s possible that the size of the directory and the number of groups per user could be adding overhead during role mapping or group resolution in the Wazuh Dashboard.

To help us narrow this down, could you provide:

  • Whether the slowdown occurs only during login, or also when navigating the Wazuh Dashboard after login.

  • If the affected LDAP user is a member of a very large number of groups.

  • Any noticeable differences between local users (like admin) and LDAP users in terms of speed.

We’ve also attached a small script (compare_wazuh_users.sh) that you can run in your environment to benchmark login and user info retrieval times for specific users. This will help confirm if the slowdown is visible directly at the API level or only through the web interface.

How to use the script

  1. Copy the attached file to your Wazuh server (or any host that can reach the API).

  2. Make it executable:

chmod +x compare_wazuh_users.sh

Edit the file to set:

  • SERVER="YOUR_WAZUH_IP"

  • USER1 / PASS1 (e.g. admin)

  • USER2 / PASS2 (e.g. your LDAP test user)

Run it

./compare_wazuh_users.sh

The script will generate a CSV file with all attempts and also print a summary with min, max, and average times per user/endpoint.

If you could share those results, along with a bit more detail about your LDAP setup, it would help us understand better where the slowdown comes from.


compare_wazuh_users.sh

Facu Basgall

unread,
Oct 8, 2025, 7:50:44 AM (2 days ago) Oct 8
to Wazuh | Mailing List

Hi! Thanks for waiting

This slowdown occurs when browsing the Wazuh dashabord

Unfortunately I don't have the information on how many groups the user belongs to.


I have run the provided script, I have attached the results, but I have not observed any drastic differences in the times.

A05762 is an LDAP user



I think I remember reading some time ago that you can configure Wazuh to increase the cache time with LDAP, can it be?

That is to say that it is not going to consult the AD all the time for the user, but to keep it in cache to reduce the times

Is this so? Can you help me with this configuration?

(note: maybe I'm wrong but I remember reading it some time ago)

wazuh_benchmark.txt
20251008_084105.jpeg
Reply all
Reply to author
Forward
0 new messages