Wazuh fix note · LDAP login

Wazuh LDAP: restrict login to one group

With the usual LDAP setup, a user in the user base who is in no mapped group still logs in. On a Wazuh 4.14.7 indexer with OpenLDAP, such a user got HTTP 200 from the security plugin with backend_roles: [] and the role own_index. Adding the group to the authentication search turned the same login into a 401, while a group member kept all_access. One more thing we measured: a user removed from the group kept all_access until the security cache was flushed.

Dong Nguyen, ATK New Technology · 2 October 2026 · measured on wazuh-indexer 4.14.7 (security plugin 2.19.5) with OpenLDAP

Stuck on this right now? Email your custom rules or decoders, one sample log line and your Wazuh version to dongnx@atkvn.com. We run them on that exact version and reply within 24 hours with what we find. Free. Remove hostnames, IPs and usernames first. Rather not send them? Run the free pre-check in your browser; your files never leave your machine. Rather have it fixed? USD 149 fixed price per problem, reproduced on your version, and you pay only after it works on your system. Our first three customers pay USD 49 for one fix, in exchange for an anonymised write-up we can publish.


How to check in one minute

Ask the indexer who a user is, with that user's own credentials:

curl -sk -u someuser https://<indexer>:9200/_plugins/_security/authinfo

HTTP 200 with "backend_roles":[] means the directory accepted the user and no group matched; the user then has only what is mapped to every user, own_index by default. The dashboard logs users in through the indexer's security plugin, so this is the check that decides it.

Why it happens

The security plugin uses LDAP twice. The authc domain only checks that usersearch finds the user under userbase and that the password binds. Groups are read later, by the authz backend, and only decide roles. In the default roles_mapping.yml of the 4.14.7 image, own_index is mapped to users: "*", so an authenticated user always has a role.

Our test directory: alice in group wazuh-admins (mapped to all_access), bob only in ou=people. The authc part as most guides write it:

      ldap:
        http_enabled: true
        transport_enabled: false
        order: 1
        http_authenticator:
          type: basic
          challenge: false
        authentication_backend:
          type: ldap
          config:
            hosts:
            - "ldap.example.org:389"
            bind_dn: "cn=admin,dc=example,dc=org"
            password: "<bind password>"
            userbase: "ou=people,dc=example,dc=org"
            usersearch: "(uid={0})"
            username_attribute: "uid"
usersearchalice (in group)bob (not in group)
(uid={0})200, backend_roles ["wazuh-admins"], roles own_index, all_access200, backend_roles [], roles own_index
with the memberOf filter below200, same as before401 Authentication finally failed

Fix

Put the group into the authentication search, in config.yml of the security plugin:

            usersearch: "(&(uid={0})(memberOf=cn=wazuh-admins,ou=groups,dc=example,dc=org))"

Load it with securityadmin.sh. The paths below are those of a package install; we ran the same command inside the Docker image, where config and certificates live under /usr/share/wazuh-indexer/:

/usr/share/wazuh-indexer/plugins/opensearch-security/tools/securityadmin.sh \
  -f /etc/wazuh-indexer/opensearch-security/config.yml -t config -icl -nhnv \
  -cacert /etc/wazuh-indexer/certs/root-ca.pem \
  -cert /etc/wazuh-indexer/certs/admin.pem \
  -key /etc/wazuh-indexer/certs/admin-key.pem -h localhost

Removed from the group, still in

After we removed bob from wazuh-admins, authinfo still returned 200 with all_access 3 seconds and 25 seconds later. Flushing the security cache made the next login a 401 at once:

curl -sk --cert admin.pem --key admin-key.pem -X DELETE \
  https://<indexer>:9200/_plugins/_security/api/cache

When you revoke access in the directory, flush the cache if it has to take effect now.

Limits of what we measured

Single-node wazuh-indexer 4.14.7 in Docker with OpenLDAP (memberof overlay), measured through the indexer's _plugins/_security/authinfo; we did not drive the Wazuh dashboard login screen. Not tested: Active Directory, nested groups, LDAPS, other versions. We did not measure how long the security cache keeps a removed user; we only know it was longer than 25 seconds.

Have it working

Directory login still letting the wrong people in? Send your config.yml authc/authz blocks (bind password removed), the roles_mapping.yml entries, one authinfo output and your Wazuh version to the address below. We reply within 24 hours with what we find. Free. Rather have it fixed for you? USD 149 fixed price per problem, paid after it works on your system.