Good evening,
I have read a lot of posts here with very similar problems but unfortunately none of them could help me. I am trying to login to OpenSearch with my LDAP credentials. My config.yml looks like this:
ldap:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: basic
challenge: true
authentication_backend:
type: ldap
config:
enable_ssl: true
pemtrustedcas_filepath: '/path/to/opensearch/config/my-ca.pem'
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: false
hosts:
- my-ldap-host.de:636
bind_dn: "cn=xxx,ou=xxx,ou=xxx,ou=Groups,ou=group,ou=xxx,dc=xxx,dc=de"
password: xxxx
userbase: "ou=xxx,dc=xxx,dc=de"
usersearch: '(sAMAccountName={0})'
username_attribute: cn
authz:
ldap:
http_enabled: true
transport_enabled: true
authorization_backend:
type: ldap
config:
enable_ssl: true
pemtrustedcas_filepath: '/path/to/opensearch/config/my-ca.pem'
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: false
hosts:
- my-ldap-host:636
bind_dn: "cn=xxx,ou=xxx,ou=xxx,ou=Groups,ou=group,ou=xxx,dc=xxx,dc=de"
password: xxxx
userbase: "ou=xxx,dc=xxx,dc=de"
usersearch: '(sAMAccountName={0})'
username_attribute: cn
rolebase: 'OU=xxx,OU=xxx,OU=Groups,OU=group,OU=xxx,DC=xxx,DC=de'
rolesearch: '(member={0})'
userroleattribute: null
userrolename: none
rolename: "name"
resolve_nested_roles: true
#rolesearch_enabled: false
skip_users:
- kibanaserver
- admin
In roles_mapping.yml
I added the following to the all_access
role:
all_access:
reserved: false
backend_roles:
- "admin"
- "CN=xxx,OU=xxx,OU=xxx,OU=Groups,OU=group,OU=xxx,DC=xxx,DC=de"
description: "Maps admin to all_access"
OpenSearch Dashboards accepted the role map:
But nevertheless I get an Invalid username or password error when I try to login with my LDAP credentials. Also when I try to get cluster health I get
"error" : {
"root_cause" : [
{
"type" : "security_exception",
"reason" : "no permissions for [cluster:monitor/health] and User [name=my-resolved-ldap-name, backend_roles=[xxx, xxx], requestedTenant=null]"
}
This error suggests that somehow my credentials are read by Opensearch because my login name is resolved as my name saved in LDAP although I did not use it anywhere in Opensearch.
Does anyone have an idea what is wrong with my configuration?
I would be very thankful for a respond!