Ldap authentification is not working


(hanna) #1

i want to authanticate to Active Directory,
when i add the active directory authentication i get the error: Caused by: java.net.SocketException: Connection reset
and the plugin get ignored
here is my configuration

http.cors.allow-origin: /https?://localhost(:[0-9]+)?/

http.cors.enabled: true
http.cors.allow-headers: Authorization
readonlyrest:
enable: true
prompt_for_basic_auth: false
access_control_rules:

  • name: account used by kibana
    auth_key: kibana:kibana

  • name: allow
    type: allow
    ldap_auth:
    name: “ldap1"
    groups: [‘Domain Admins’]
    indices: [”*"]

ldaps:

search_user_base_DN: 'ou=RC_Users,dc=example,dc=ca’
port: '389’
verbosity: "info"
search_groups_base_DN: 'dc=example,dc=ca’
host: '100wsproddc012.example.ca
name: ldap1
unique_member_attribute: Member
ssl_trust_all_certs: true
bind_dn: 'cn=0svc_identityelastic,ou=service,ou=RC_Users,dc=example,dc=ca’
bind_password: "Passw0rd"
user_id_attribute: "sAMAccountName"
connection_pool_size: 30 # default 30
request_timeout_in_sec: 10 # default 1
cache_ttl_in_sec: 60 # default 0 - cache disabled

in /var/log/messages i have

LDAPException(resultCode=81 (server down), errorMessage=‘An error occurred while attempting to send the LDAP message to server 100wsproddc012.example.ca:389: SSLException(message=‘java.net.SocketException: Connection reset’, trace=‘getSSLException(Alerts.java:208) / fatal(SSLSocketImpl.java:1959) / fatal(SSLSocketImpl.java:1916) / handleException(SSLSocketImpl.java:1880) / handleException(SSLSocketImpl.java:1825) / read(AppInputStream.java:116) / fill(BufferedInputStream.java:246) / read(BufferedInputStream.java:265) / read(ASN1StreamReader.java:992) / readType(ASN1StreamReader.java:329) / beginSequence(ASN1StreamReader.java:912) / readLDAPResponseFrom(LDAPMessage.java:1146) / run(LDAPConnectionReader.java:251)’, cause=SocketException(message=‘Connection reset’, trace=‘read(SocketInputStream.java:210) / read(SocketInputStream.java:141) / readFully(InputRecord.java:465) / read(InputRecord.java:503) / readRecord(SSLSocketImpl.java:983) / performInitialHandshake(SSLSocketImpl.java:1385) / readDataRecord(SSLSocketImpl.java:938) / read(AppInputStream.java:105) / fill(BufferedInputStream.java:246) / read(BufferedInputStream.java:265) / read(ASN1StreamReader.java:992) / readType(ASN1StreamReader.java:329) / beginSequence(ASN1StreamReader.java:912) / readLDAPResponseFrom(LDAPMessage.java:1146) / run(LDAPConnectionReader.java:251)’, revision=24201), revision=24201)’)

in the logs /var/log/elasticsearch/logs.log
i have

[2017-10-28T11:42:36,888][INFO ][o.e.p.PluginsService ] [101lxprodelk004] loaded plugin [readonlyrest]
[2017-10-28T11:42:39,964][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.plugin.readonlyrest.es.ReadonlyRestPlugin
[2017-10-28T11:42:40,147][INFO ][o.e.d.DiscoveryModule ] [101lxprodelk004] using discovery type [zen]
[2017-10-28T11:42:41,987][INFO ][o.e.p.r.e.ReloadableSettingsImpl] [CLUSTERWIDE SETTINGS] Cluster not ready…
[2017-10-28T11:42:42,361][INFO ][o.e.p.r.a.ACL ] ADDING BLOCK: { name: ‘account used by kibana’, policy: ALLOW}
[2017-10-28T11:42:42,361][INFO ][o.e.p.r.a.ACL ] ADDING BLOCK: { name: ‘::elie::’, policy: ALLOW}
[2017-10-28T11:42:42,988][INFO ][o.e.p.r.e.ReloadableSettingsImpl] [CLUSTERWIDE SETTINGS] Cluster not ready…
[2017-10-28T11:42:43,019][ERROR][o.e.p.r.e.IndexLevelActionFilter] Cannot configure ReadonlyREST plugin
[2017-10-28T11:42:43,088][INFO ][o.e.p.r.e.IndexLevelActionFilter] Readonly REST plugin was loaded…
[2017-10-28T11:42:43,467][INFO ][o.e.n.Node ] [101lxprodelk004] initialized
[2017-10-28T11:42:43,467][INFO ][o.e.n.Node ] [101lxprodelk004] starting …
[2017-10-28T11:42:43,740][INFO ][o.e.t.TransportService ] [101lxprodelk004] publish_address {x.y.z.v:9300}, bound_addresses {x.y.z.v:9300}
[2017-10-28T11:42:43,761][INFO ][o.e.b.BootstrapChecks ] [101lxprodelk004] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-10-28T11:42:44,006][DEBUG][o.e.a.a.c.h.TransportClusterHealthAction] [101lxprodelk004] no known master node, scheduling a retry
[2017-10-28T11:42:47,656][INFO ][o.e.m.j.JvmGcMonitorService] [101lxprodelk004] [gc][4] overhead, spent [529ms] collecting in the last [1.1s]
[2017-10-28T11:42:47,712][INFO ][o.e.c.s.ClusterService ] [101lxprodelk004] detected_master {101lxprodelk003}{Hf6jbmBxTTabA46Yz2UdnQ}{FdZf557rSnG2dxRLnlUdgg}{x.y.z.v}{x.y.z.v:9300}, added {{101lxprodelk003}{Hf6jbmBxTTabA46Yz2UdnQ}{FdZf557rSnG2dxRLnlUdgg}{x.y.z.v}{x.y.z.v:9300},{101lxprodelk002}{NckCQninQMWVKXBxRjafSQ}{DKQtZomBSA66BP7mWI_u1w}{x.y.z.v}{x.y.z.v:9300},}, reason: zen-disco-receive(from master [master {101lxprodelk003}{Hf6jbmBxTTabA46Yz2UdnQ}{FdZf557rSnG2dxRLnlUdgg}{x.y.z.v}{x.y.z.v:9300} committed version [930]])
[2017-10-28T11:42:47,818][INFO ][o.e.p.r.e.ReloadableSettingsImpl] [CLUSTERWIDE SETTINGS] Cluster is ready!
[2017-10-28T11:42:47,818][INFO ][o.e.p.r.e.ReloadableSettingsImpl] [CLUSTERWIDE SETTINGS] Stopping cluster poller…
[2017-10-28T11:42:47,857][INFO ][o.e.p.r.e.ReloadableSettingsImpl] [CLUSTERWIDE SETTINGS] index settings not found, have you installed ReadonlyREST Kibana plugin? Will keep on using elasticearch.yml. Learn more at https://readonlyrest.com