Elasticsearch - added LDAP authentication, error "Invalid username or password"

Hello,

Problem solved. This is my config for AD:

--- elasticsearch.yml
xpack:
  security:
    authc:
      realms:
        active_directory:
          my_ad:
            order: 0
            domain_name: domain.com
            url: ldap://domain.com:389
            bind_dn: elastic@domain.com
            files:
              role_mapping: "/etc/elasticsearch/role_mapping.yml"
        native:
          native1:
            order: 1

bind_dn: elastic@domain.com - this is the user that all Active Directory search requests are executed as.

--- role_mapping.yml
superuser:
  - "CN=ELK_ADMINS,OU=GROUPS,DC=domain,DC=com"
apps_monitoring:
  - "CN=ELK_USERS,OU=GROUPS,DC=domain,DC=com"

Regards,
Dan

1 Like