Thanks for the update.
I tried with AD conf as below from the link from elasticsearch,
xpack:
security:
authc:
realms:
active_directory:
type: active_directory
order: 0
domain_name: gslb.yydbg.yyads.db.com
url: "ldaps://gslb.yydbg.yyads.db.com:636"
unmapped_groups_as_roles: true
and I get the below error,
curl -u ramacvij:hello123 http://10.245.45.21:9200
{"error":{"root_cause":[{"type":"security_exception","reason":"error attempting to authenticate request","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"error attempting to authenticate request","caused_by":{"type":"l_d_a_p_exception","reason":"An error occurred while attempting to connect to server gslb.yydbg.yyads.db.com:636: java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='Unable to verify an attempt to to establish a secure connection to 'gslb.yydbg.yyads.db.com:636' because an unexpected error was encountered during validation processing: SSLPeerUnverifiedException(message='peer not authenticated', trace='getPeerCertificates(SSLSessionImpl.java:431) / verifySSLSocket(HostNameSSLSocketVerifier.java:113) / (LDAPConnectionInternals.java:166) / connect(LDAPConnection.java:860) / connect(LDAPConnection.java:760) / connect(LDAPConnection.java:710) / (LDAPConnection.java:534) / getConnection(SingleServerSet.java:229) / getConnection(ServerSet.java:98) / getConnection(FailoverServerSet.java:545) / getConnection(FailoverServerSet.java:459) / session(ActiveDirectorySessionFactory.java:104) / lambda$doAuthenticate$0(LdapRealm.java:130) / run(ThreadContext.java:527) / runWorker(ThreadPoolExecutor.java:1142) / run(ThreadPoolExecutor.java:617) / run(Thread.java:745)', revision=24201)')","caused_by":{"type":"i_o_exception","reason":"LDAPException(resultCode=91 (connect error), errorMessage='Unable to verify an attempt to to establish a secure connection to 'gslb.yydbg.yyads.db.com:636' because an unexpected error was encountered during validation processing: SSLPeerUnverifiedException(message='peer not authenticated', trace='getPeerCertificates(SSLSessionImpl.java:431) / verifySSLSocket(HostNameSSLSocketVerifier.java:113) / (LDAPConnectionInternals.java:166) / connect(LDAPConnection.java:860) / connect(LDAPConnection.java:760) / connect(LDAPConnection.java:710) / (LDAPConnection.java:534) / getConnection(SingleServerSet.java:229) / getConnection(ServerSet.java:98) / getConnection(FailoverServerSet.java:545) / getConnection(FailoverServerSet.java:459) / session(ActiveDirectorySessionFactory.java:104) / lambda$doAuthenticate$0(LdapRealm.java:130) / run(ThreadContext.java:527) / runWorker(ThreadPoolExecutor.java:1142) / run(ThreadPoolExecutor.java:617) / run(Thread.java:745)', revision=24201)')","caused_by":{"type":"l_d_a_p_exception","reason":"Unable to verify an attempt to to establish a secure connection to 'gslb.yydbg.yyads.db.com:636' because an unexpected error was encountered during validation processing: SSLPeerUnverifiedException(message='peer not authenticated', trace='getPeerCertificates(SSLSessionImpl.java:431) / verifySSLSocket(HostNameSSLSocketVerifier.java:113) / (LDAPConnectionInternals.java:166) / connect(LDAPConnection.java:860) / connect(LDAPConnection.java:760) / connect(LDAPConnection.java:710) / (LDAPConnection.java:534) / getConnection(SingleServerSet.java:229) / getConnection(ServerSet.java:98) / getConnection(FailoverServerSet.java:545) / getConnection(FailoverServerSet.java:459) / session(ActiveDirectorySessionFactory.java:104) / lambda$doAuthenticate$0(LdapRealm.java:130) / run(ThreadContext.java:527) / runWorker(ThreadPoolExecutor.java:1142) / run(ThreadPoolExecutor.java:617) / run(Thread.java:745)', revision=24201)","caused_by":{"type":"s_s_l_peer_unverified_exception","reason":"peer not authenticated"}}}},"header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}
Same error for this conf as well,
xpack:
security:
authc:
realms:
ldap1:
type: ldap
order: 0
url: "ldaps://gslb.yydbg.yyads.db.com:636"
ssl:
certificate_authorities: [ "/home/elastic/applications/elasticsearch-5.2.1/config/x-pack/db-uat-root-ca.pem" ]
bind_dn: "cn=some_user, ou=users, dc=YYDBG, dc=YYADS, dc=DB, DC=COM"
bind_password: hellothere
user_search:
base_dn: "dc=YYDBG, dc=YYADS, dc=DB, DC=COM"
attribute: cn
group_search:
base_dn: "dc=YYDBG, dc=YYADS, dc=DB, DC=COM"