Hi,
when the elastic instance went down, below is the logs found in elasticsearch log file
[2022-06-29T22:10:44,089][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [elastic] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=SUCCESS, user=User[username=elastic,roles=[superuser],fullName=null,email=null,metadata={_reserved=true}], message=null, exception=null}]
[2022-06-29T22:10:44,094][DEBUG][o.e.x.s.a.e.ReservedRealm] [elastic.coordinate.com] realm [reserved] authenticated user [elastic], with roles [[superuser]] (cached)
[2022-06-29T22:10:44,094][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [elastic] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=SUCCESS, user=User[username=elastic,roles=[superuser],fullName=null,email=null,metadata={_reserved=true}], message=null, exception=null}]
[2022-06-29T22:10:44,094][DEBUG][o.e.x.s.a.e.ReservedRealm] [elastic.coordinate.com] realm [reserved] authenticated user [elastic], with roles [[superuser]] (cached)
[2022-06-29T22:10:44,094][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [elastic] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=SUCCESS, user=User[username=elastic,roles=[superuser],fullName=null,email=null,metadata={_reserved=true}], message=null, exception=null}]
[2022-06-29T22:10:44,146][DEBUG][o.e.x.s.a.e.ReservedRealm] [elastic.coordinate.com] realm [reserved] authenticated user [elastic], with roles [[superuser]] (cached)
[2022-06-29T22:10:44,146][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [elastic] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=SUCCESS, user=User[username=elastic,roles=[superuser],fullName=null,email=null,metadata={_reserved=true}], message=null, exception=null}]
[2022-06-29T22:10:44,899][DEBUG][o.e.x.s.a.e.ReservedRealm] [elastic.coordinate.com] realm [reserved] authenticated user [elastic], with roles [[superuser]] (cached)
[2022-06-29T22:10:44,899][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [elastic] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=SUCCESS, user=User[username=elastic,roles=[superuser],fullName=null,email=null,metadata={_reserved=true}], message=null, exception=null}]
[2022-06-29T22:10:46,034][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [rmc_admin] using realm [reserved/reserved] with token [UsernamePasswordToken] was [AuthenticationResult{status=CONTINUE, user=null, message=null, exception=null}]
[2022-06-29T22:10:46,037][DEBUG][o.e.x.s.a.l.s.LdapUtils ] [elastic.coordinate.com] LDAP user bind [SimpleBindRequest(dn='rmc_admin@ldapserver', controls={AuthorizationIdentityRequestControl(isCritical=false)})] failed for [LDAPConnection(connected to ldapserver:389)] - [LDAPException(resultCode=49 (invalid credentials), diagnosticMessage='80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839 ', ldapSDKVersion=4.0.8, revision=28812)]
[2022-06-29T22:10:46,038][DEBUG][o.e.x.s.a.l.LdapRealm ] [elastic.coordinate.com] Exception occurred during authenticate for active_directory/my_ad
com.unboundid.ldap.sdk.LDAPBindException: 80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839
at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2273) ~[unboundid-ldapsdk-4.0.8.jar:4.0.8]
at org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils$2.lambda$doRun$0(LdapUtils.java:195) ~[x-pack-security-7.16.3.jar:7.16.3]
at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
at org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.privilegedConnect(LdapUtils.java:76) ~[x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils$2.doRun(LdapUtils.java:195) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.maybeForkAndRun(LdapUtils.java:102) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.support.LdapUtils.maybeForkThenBind(LdapUtils.java:212) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactory$ADAuthenticator.authenticate(ActiveDirectorySessionFactory.java:320) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactory.getSessionWithoutPool(ActiveDirectorySessionFactory.java:161) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.PoolingSessionFactory.session(PoolingSessionFactory.java:110) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.LdapRealm.lambda$doAuthenticate$1(LdapRealm.java:147) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.xpack.security.authc.ldap.LdapRealm$CancellableLdapRunnable.doRun(LdapRealm.java:343) [x-pack-security-7.16.3.jar:7.16.3]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:777) [elasticsearch-7.16.3.jar:7.16.3]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) [elasticsearch-7.16.3.jar:7.16.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
[2022-06-29T22:10:46,039][DEBUG][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication of [rmc_admin] using realm [active_directory/my_ad] with token [UsernamePasswordToken] was [AuthenticationResult{status=CONTINUE, user=null, message=authenticate failed, exception=LDAPException(resultCode=49 (invalid credentials), diagnosticMessage='80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839 ', ldapSDKVersion=4.0.8, revision=28812)}]
[2022-06-29T22:10:46,039][WARN ][o.e.x.s.a.RealmsAuthenticator] [elastic.coordinate.com] Authentication to realm my_ad failed - authenticate failed (Caused by LDAPException(resultCode=49 (invalid credentials), diagnosticMessage='80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839 ', ldapSDKVersion=4.0.8, revision=28812))
[2022-06-29T22:10:46,143][INFO ][o.e.t.ClusterConnectionManager] [elastic.coordinate.com] transport connection to [{elastic.node1}{eKXQW3zMSp-QIb9KCQz8cQ}{sby4A-WxR1KUnr3kzZ-Z6A}{elastic.node1}{192.168.1.23:9300}{his}] closed by remote
[2022-06-29T22:10:46,193][INFO ][o.e.c.s.ClusterApplierService] [elastic.coordinate.com] removed {{elastic.node1}{eKXQW3zMSp-QIb9KCQz8cQ}{sby4A-WxR1KUnr3kzZ-Z6A}{elastic.node1}{192.168.1.23:9300}{his}}, term: 29, version: 6221, reason: ApplyCommitRequest{term=29, version=6221, sourceNode={elastic.node2}{pHcFS0YKQTmhb0pWXBpz7A}{Ezc10TLbQua9ZYyBY9JQ2A}{elastic.node2}{192.168.1.24:9300}{m}{xpack.installed=true, transform.node=false}}
[2022-06-29T22:10:46,995][DEBUG][o.e.x.s.a.e.ReservedRealm] [elastic.coordinate.com] realm [reserved] authenticated user [elastic], with roles [[superuser]] (cached)
===========================
Below is the configuration we used to configure the LDAP with Elastic
xpack:
security:
authc:
realms:
active_directory:
my_ad:
order: 0
domain_name: ldapserver
url: ldap://ldapserver:389
files:
role_mapping: /opt/elk/elasticsearch/config/role_mapping.yml