# Shield AD authentication error: peer not authenticated

**URL:** <https://discuss.elastic.co/t/shield-ad-authentication-error-peer-not-authenticated/60012>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 7, 2016, 5:47pm UTC](https://discuss.elastic.co/t/shield-ad-authentication-error-peer-not-authenticated/60012 "2016-09-07T17:47:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Speedman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/speedman/32/37066_2.png) [@Speedman](https://discuss.elastic.co/u/Speedman)\
**Post date:** [September 7, 2016, 7:33pm UTC](https://discuss.elastic.co/t/shield-ad-authentication-error-peer-not-authenticated/60012/3 "2016-09-07T19:33:51Z")

</div>

That helped somewhat. It got me to a new error:

[2016-09-07 14:58:52,726][WARN][shield.authc.activedirectory] [node\_test01] authentication failed for user [KibanaTest]: failed to connect to any active directory servers  
cause: com.unboundid.ldap.sdk.LDAPException: An error occurred while attempting to connect to server [mydomain.com:636](http://mydomain.com:636): java.io.IOException: Hostname verification failed because the expected hostname '[mydomain.com](http://mydomain.com)' was not found in peer certificate 'subject='[CN=domaincontroller.mydomain.com](http://CN=domaincontroller.mydomain.com)' dNSName='[domaincontroller.mydomain.com](http://domaincontroller.mydomain.com)''.

Our domain is load-balanced between three DCs, and the DC that was indicated in the error message was one of them. Is this indicative of me needing to add load-balancing settings to the configuration, more information in the keystore, both, or something else? I read through the information in another question posted here ([link](https://discuss.elastic.co/t/shield-ldaps-integration-error/26451)). I tried hostname\_verification: false, but that produced read timeout errors on the socket. Any ideas?

---

_[View the full topic](https://discuss.elastic.co/t/shield-ad-authentication-error-peer-not-authenticated/60012)._
