# LDAP Connection Elastic

**URL:** <https://discuss.elastic.co/t/ldap-connection-elastic/377281>\
**Category:** Elasticsearch\
**Created:** [April 18, 2025, 10:03am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281 "2025-04-18T10:03:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [April 18, 2025, 10:03am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/1 "2025-04-18T10:03:22Z")

</div>

I have a LDAP connection from a single Elastic to LDAP server which is Active Directory  
i use ldap not ldaps and get following error

```auto
[2025-04-18T11:59:27,596][WARN][o.e.x.s.a.l.s.LdapUtils] [elk] Failed to obtain LDAP connection from pool - LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server EXAMPLE:389: IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server EXAMPLE/1.1.1.1:389: NotEntitledException(component [x-pack-core], module [unboundid.ldapsdk], class [class com.unboundid.ldap.sdk.ConnectThread], entitlement [outbound_network]), ldapSDKVersion=6.0.3, revision=405ee52a554f9867e81d4598a5b2f97beabeb29a'))')

```

I did a test and it is working via ldapsearch

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [April 18, 2025, 10:09am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/2 "2025-04-18T10:09:24Z")

</div>

````auto
[2025-04-18T11:59:27,596][WARN][o.e.x.s.a.RealmsAuthenticator] [ELK] Authentication to realm ldap1 failed - authenticate failed (Caused by LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server EXAMPLE:389: IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server EXAMPLE/EXAMPLE:389: NotEntitledException(component [x-pack-core], module [unboundid.ldapsdk], class [class com.unboundid.ldap.sdk.ConnectThread], entitlement [outbound_network]), ldapSDKVersion=6.0.3, revision=405ee52a554f9867e81d4598a5b2f97beabeb29a'))'); Caused by java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server EXAMPLE/EXAMPLE:389: NotEntitledException(component [x-pack-core], module [unboundid.ldapsdk], class [class com.unboundid.ldap.sdk.ConnectThread], entitlement [outbound_network]), ldapSDKVersion=6.0.3, revision=405ee52a554f9867e81d4598a5b2f97beabeb29a'); Caused by LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server EXAMPLE/EXAMPLE:389: NotEntitledException(component [x-pack-core], module [unboundid.ldapsdk], class [class com.unboundid.ldap.sdk.ConnectThread], entitlement [outbound_network]), ldapSDKVersion=6.0.3, revision=405ee52a554f9867e81d4598a5b2f97beabeb29a'); Caused by org.elasticsearch.entitlement.runtime.api.NotEntitledException: component [x-pack-core], module [unboundid.ldapsdk], class [class com.unboundid.ldap.sdk.ConnectThread], entitlement [outbound_network])```

ES version : 8.18.0
````

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [April 18, 2025, 11:00am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/3 "2025-04-18T11:00:52Z")

</div>

looks a bit like this bug ?

> <https://github.com/elastic/elasticsearch/issues/127003>
>
> \### Elasticsearch Version
> 
> 8.18.0
> 
> \### Installed Plugins
> 
> \_No response\_
> 
> \### Jav…a Version
> 
> \_bundled\_
> 
> \### OS Version
> 
> any
> 
> \### Problem Description
> 
> The active directory authenticator in x-pack-core uses the unboundid ldap SDK; this (pretty obvious, if you think about it) does a \`Socket.connect\` which requires \`outbound\_network\` permission. This is missing from the x-pack-core policy, causing a \`NotEntitledException\`:
> 
> \`\`\`
> \[WARN \]\[o.e.e.r.p.P.x.u.ldapsdk \] \[name\] Not entitled: component \[x-pack-core\], module \[unboundid.ldapsdk\], class \[class com.unboundid.ldap.sdk.ConnectThread\], entitlement \[outbound\_network\]
> org.elasticsearch.entitlement.runtime.api.NotEntitledException: component \[x-pack-core\], module \[unboundid.ldapsdk\], class \[class com.unboundid.ldap.sdk.ConnectThread\], entitlement \[outbound\_network\]
> at org.elasticsearch.entitlement.runtime.policy.PolicyManager.notEntitled(PolicyManager.java:572) ~\[elasticsearch-entitlement-8.18.0.jar:?\]
> at org.elasticsearch.entitlement.runtime.policy.PolicyManager.checkFlagEntitlement(PolicyManager.java:514) ~\[elasticsearch-entitlement-8.18.0.jar:?\]
> at org.elasticsearch.entitlement.runtime.policy.PolicyManager.checkEntitlementPresent(PolicyManager.java:604) ~\[elasticsearch-entitlement-8.18.0.jar:?\]
> at org.elasticsearch.entitlement.runtime.policy.PolicyManager.checkOutboundNetworkAccess(PolicyManager.java:489) ~\[elasticsearch-entitlement-8.18.0.jar:?\]
> at org.elasticsearch.entitlement.runtime.api.ElasticsearchEntitlementChecker.check$java\_net\_Socket$connect(ElasticsearchEntitlementChecker.java:636) ~\[elasticsearch-entitlement-8.18.0.jar:?\]
> at java.net.Socket.connect(Socket.java) ~\[?:?\]
> at com.unboundid.ldap.sdk.ConnectThread.run(ConnectThread.java:165) ~\[?:?\]
> \[2025-04-17T08:51:59,834\]\[WARN \]\[o.e.x.s.a.RealmsAuthenticator\] \[name\] Authentication to realm ad failed - authenticate failed (Caused by LDAPException(resultCode=91 (connect error)
> \`\`\`

I note from another thread you updated to 8.18.0, presume this worked in 8.17.x?

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [April 18, 2025, 11:12am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/4 "2025-04-18T11:12:29Z")

</div>

yes you are correct, I have a problem with removing a search from dashboard update it but now this one

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [April 18, 2025, 11:32am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/5 "2025-04-18T11:32:35Z")

</div>

Is there any estimation when they will release it?

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [April 18, 2025, 11:37am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/6 "2025-04-18T11:37:03Z")

</div>

@vahagg1 - I just don't know, not an elastic employee, just a user like you, so have no insight.

A fix is (to my understanding) straightforward, but I just happened to see same issue discussed on reddit earlier today.

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [April 18, 2025, 11:39am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/7 "2025-04-18T11:39:51Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![sthigpen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sthigpen/32/51276_2.png) [@sthigpen](https://discuss.elastic.co/u/sthigpen)\
**Post date:** [May 8, 2025, 7:49pm UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/8 "2025-05-08T19:49:26Z")

</div>

Doesn't work in 9.0.1 either.

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [May 8, 2025, 9:00pm UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/9 "2025-05-08T21:00:16Z")

</div>

Looks it is not in release note!!

---

<div class="post-metadata">

**Author:** ![vahagg1](https://avatars.discourse-cdn.com/v4/letter/v/7feea3/32.png) [@vahagg1](https://discuss.elastic.co/u/vahagg1)\
**Post date:** [June 3, 2025, 11:27am UTC](https://discuss.elastic.co/t/ldap-connection-elastic/377281/10 "2025-06-03T11:27:48Z")

</div>

> **[Elasticsearch version 8.18.2 | Elasticsearch Guide \[8.18\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.18/release-notes-8.18.2.html)**

upgrade to version 8.18.2 or 9.0.2
