Hi,
We are not getting the OS LDAP Authorization (Authz) part with backend roles to work, although LDAP Authentication works.
All users that need to be authorized are placed in LDAP in the “ldap_test_group” below ou=groups,dc=xxxx,dc=xx
The env is running Opensearch v2.6.0 on RHEL 8 with OpenLDAP authentication and PosixGroups/Accounts.
Would really appreciate som help in solving this, all config sections are below.
#1#
/usr/opensearch/config/opensearch-security/config.yml
authz:
roles_from_myldap:
description: "Authorize via LDAP or Active Directory"
http_enabled: true
transport_enabled: true
authorization_backend:
type: ldap
config:
pemtrustedcas_filepath: /usr/opensearch/config/cert/xxxx.pem
enable_ssl: true
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: true
hosts:
- ldap-xxxx.xxxx.xx:8443
bind_dn: cn=ldapuser,dc=xxxx,dc=xx
password: "xxxxx"
userbase: 'ou=users,dc=xxxx,dc=xx'
usersearch: '(uid={0})'
username_attribute: "uid"
skip_users:
- admin
- kibanaserver
rolebase: 'ou=groups,dc=xxxx,dc=xx'
rolesearch: '(memberUid={0})'
userroleattribute: null
userrolename: disabled
rolename: cn
resolve_nested_roles: false
#2#
/usr/opensearch/config/opensearch-security/internal_users.yml
#admin
admin:
hash: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
reserved: true
backend_roles:
- “admin”
- “ldap_test_group”
description: “admin user”
#3#
/usr/opensearch/config/opensearch-security/roles_mapping.yml
all_access:
reserved: false
backend_roles:
- “admin”
- “cn=ldap_test_group,ou=groups,dc=xxxx,dc=xx”
description: “Maps admin to all_access”
We have also tried changing the above line in roles_mapping.yml from “cn=ldap_test_group,ou=groups,dc=xxxx,dc=xx” to “ldap_test_group” but it does not solve the issue.
When testing manually with ldapsearch and the ldap_test_user which is a member of the ldap_test_group it works.
ldapsearch -w ‘xxxxx’ -x -D “cn=ldapuser,dc=xxxx,dc=xx” -b “ou=groups,dc=xxxx,dc=xx” -H ldaps://ldap-xxxx.xxxx.xx:8443 ‘(memberUid=ldap_test_user)’ ‘cn’
Best Regards
//Dennis