I will let my configuration and error logs bellow.
2025/01/08 09:37:07 ERROR: Error executing API request locally: '<' not supported between instances of 'str' and 'NoneType'
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/dapi/dapi.py", line 239, in run_local
data = f(**f_kwargs)
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/preprocessor.py", line 177, in get_permissions
roles = get_roles(auth_context=auth_context, user_id=user_id)
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/preprocessor.py", line 145, in get_roles
roles = rbac.run_auth_context_roles()
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 408, in run_auth_context_roles
user_roles = self.get_user_roles()
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 375, in get_user_roles
if (rule['id'] > orm.MAX_ID_RESERVED or self.user_id == 2) and self.check_rule(rule['rule']):
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 358, in check_rule
if self.find_item(role_chunk=rule[rule_key], mode=rule_key, role_id=role_id):
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 313, in find_item
if self.match_item(role_chunk, value, mode):
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 264, in match_item
role_chunk, auth_context = self.preprocess_to_list(role_chunk, auth_context)
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/rbac/auth_context.py", line 115, in preprocess_to_list
auth_chunk = sorted(auth_chunk) if isinstance(auth_chunk, list) else auth_chunk
TypeError: '<' not supported between instances of 'str' and 'NoneType'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/ossec/framework/python/lib/python3.10/site-packages/wazuh/core/cluster/dapi/dapi.py", line 285, in execute_local_request
data = await asyncio.wait_for(task, timeout=timeout)
File "/var/ossec/framework/python/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
TypeError: '<' not supported between instances of 'str' and 'NoneType'
2025/01/08 09:37:07 INFO: wazuh-wui (7de0d240cf007f7d657f5dc4fbafcb66) 127.0.0.1 "POST /security/user/authenticate/run_as" with parameters {} and body {"user_name": "wazuh-user-tst2", "is_reserved": false, "is_hidden": false, "is_internal_user": false, "user_requested_tenant": "__user__", "backend_roles": [null, "administrator", "acesso-wazuh", "ipausers"], "custom_attribute_names": ["ldap.dn", "
attr.ldap.cn", "attr.ldap.gidNumber", "attr.ldap.krbCanonicalName", "attr.ldap.initials", "attr.ldap.createTimestamp", "attr.ldap.modifyTimestamp", "ldap.original.username", "attr.ldap.uidNumber", "attr.ldap.gecos", "attr.ldap.displayName", "attr.ldap.ipaUniqueID", "
attr.ldap.sn", "attr.ldap.krbPrincipalName", "attr.ldap.entryusn", "attr.ldap.homeDirectory", "attr.ldap.krbLastPwdChange", "attr.ldap.loginShell", "attr.ldap.objectClass", "attr.ldap.parentid", "attr.ldap.uid", "attr.ldap.mail", "attr.ldap.givenName"], "tenants": {"wazuh-user-tst2": true}, "roles": [null, "administrator", "own_index", "acesso-wazuh", "readall", "ipausers"]} done in 0.198s: 500
I send my configuration in config.yml and roles_mapping, i already many way, but result is the same.
I tried with rolebase and rolesearch configured, but result is the same. When i configure resolve_nested_roles, no import my filther in rolesearch. The wazuh dont get my groups in LDAP.
Can you try help me? :D