Hello,
we had a working SearchGuard setup with basic auth. After adding LDAP to authc we suddenly got this error:
[2019-05-14T14:18:05,037][WARN ][c.f.d.a.l.b.LDAPAuthorizationBackend] [1.2.3.4-node-1] Unable to connect to ldapserver ldap.foo.bar:636 due to ElasticsearchException[Empty file path for searchguard.ssl.transport.truststore_filepath]. Try next.
As you can see from the config below we’re not using truststores, but PEM certificates. Any idea why this happens only when we try to use LDAP?
elasticsearch.yml
[...] searchguard.enterprise_modules_enabled: true searchguard.ssl.transport.enforce_hostname_verification: false searchguard.ssl.transport.resolve_hostname: false searchguard.ssl.transport.pemcert_filepath: ... searchguard.ssl.transport.pemkey_filepath: ... searchguard.ssl.transport.pemtrustedcas_filepath: ... searchguard.ssl.http.enabled: true searchguard.ssl.http.pemcert_filepath: ... searchguard.ssl.http.pemkey_filepath: ... searchguard.ssl.http.pemtrustedcas_filepath: ... searchguard.nodes_dn: - ... searchguard.authcz.admin_dn: - ... searchguard.restapi.roles_enabled: - sg_all_access
sg_config.yml:
searchguard:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: false
remoteIpHeader: x-forwarded-for
proxiesHeader: x-forwarded-by
authc:
kibana_auth_domain:
enabled: true
order: 0
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: internal
basic_internal_auth_domain:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: basic
challenge: true
authentication_backend:
type: intern
ldap:
enabled: true
order: 2
http_authenticator:
type: basic
challenge: false
authentication_backend:
type: ldap
config:
hosts:
- ...
bind_dn: ...
password: ...
enable_ssl: true
enable_start_tls: false
enable_ssl_client_auth: false
verify_hostnames: true
userbase: ...
usersearch: (uid={0})
username_attribute: uid
authz: