Hi All
I have searched and tried various configuration, but I am just missing something to get the LDAP group permissions working.
authc config:
ldap:
description: "Authenticate via LDAP"
http_enabled: true
transport_enabled: false
order: 5
http_authenticator:
type: basic
challenge: false
authentication_backend:
# LDAP authentication backend (authenticate users against a LDAP or Active Directory)
type: ldap
config:
enable_ssl: true
pemtrustedcas_filepath: /etc/wazuh-indexer/opensearch-security/ldapcacert.pem
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: true
hosts:
-
ipa-ca.ldap.com:636 bind_dn: uid=ldapsystembind,cn=sysaccounts,cn=etc,dc=ldap,dc=com
password: 'password'
userbase: 'cn=users,cn=accounts,dc=ldap,dc=com'
usersearch: '(uid={0})'
username_attribute: uid
authz:
roles_from_myldap:
description: "Authorize via LDAP"
http_enabled: true
transport_enabled: true
authorization_backend:
type: ldap
config:
enable_ssl: true
pemtrustedcas_filepath: /etc/wazuh-indexer/opensearch-security/ldapcacert.pem
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: true
hosts:
-
ipa-ca.ldap.com:636 bind_dn: uid=ldapsystembind,cn=sysaccounts,cn=etc,dc=ldap,dc=com
password: 'password'
rolebase: 'cn=groups,cn=accounts,dc=ldap,dc=com'
# Filter to search for roles (currently in the whole subtree beneath rolebase)
# {0} is substituted with the DN of the user
# {1} is substituted with the username
# {2} is substituted with an attribute value from user's directory entry, of the authenticated user. Use userroleattribute to specify the name of the attribute
rolesearch: '(memberOf={0})'
#rolesearch: '(memberOf={2})'
# Specify the name of the attribute which value should be substituted with {2} above
userroleattribute: uid
# Roles as an attribute of the user entry
userrolename: memberOf
rolename: uid
# Resolve nested roles transitive (roles which are members of other roles and so on ...)
resolve_nested_roles: true
#userbase: 'cn=users,cn=accounts,dc=ldap,dc=com'
userbase: 'dc=ldap,dc=com'
# Filter to search for users (currently in the whole subtree beneath userbase)
# {0} is substituted with the username
usersearch: '(uid={0})'
# Skip users matching a user name, a wildcard or a regex pattern
skip_users:
- admin
- kibanaserver
In the authz I have tried both of these:
rolesearch: '(memberOf={0})'
#rolesearch: '(memberOf={2})'
and also these:
#userbase: 'cn=users,cn=accounts,dc=ldap,dc=com'
userbase: 'dc=ldap,dc=com'
In /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml
I have tried both of these:
run_as: false
run_as: true
With the true I also setup the rule sin the Rolemapping in the UI
In /etc/wazuh-indexer/opensearch-security/roles_mapping.yml
i tried both of these:
all_access:
reserved: false
hidden: false
backend_roles:
- "admin"
- "wazuhadmingroup"
hosts: []
users: []
and_backend_roles: []
description: "Maps admin to all_access"
AND
With this config I am able to login as the user specified under users, but anybody in the wazuhadmingroup get access denied.
all_access:
reserved: false
hidden: false
backend_roles:
- "admin"
- "wazuhadmingroup"
hosts: []
users:
- "kobus"
and_backend_roles: []
description: "Maps admin to all_access"
From these, can anybody tell me what I missed. I have been through the LDAP doc integration numerous times now but just cant find where I have gone wrong.
Thank you
Kobus