# Can I use x-pack ldap authentication without SSL?

**URL:** https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364
**Category:** Elasticsearch
**Created:** [June 30, 2017, 4:40am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364 "2017-06-30T04:40:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![lks21c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lks21c/32/15218_2.png) [@lks21c](https://discuss.elastic.co/u/lks21c)
#### Post date: [June 30, 2017, 4:40am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/1 "2017-06-30T04:40:03Z")

</div>

Hi. I'm curious that I can use x-pack ldap authentication without SSL or not.

Thank you in advance for reply.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [June 30, 2017, 6:16am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/2 "2017-06-30T06:16:35Z")

</div>

LDAP authentication does not require SSL.

---

<div class="post-metadata">

### Author: ![lks21c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lks21c/32/15218_2.png) [@lks21c](https://discuss.elastic.co/u/lks21c)
#### Post date: [June 30, 2017, 6:42am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/3 "2017-06-30T06:42:59Z")

</div>

Does it mean I can use ldap://ldap\_url:389 instead of ldaps://ldap\_url:636?

Thanks for the fast reply.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [June 30, 2017, 7:01am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/4 "2017-06-30T07:01:55Z")

</div>

> [@](#):
>
> Does it mean I can use ldap://ldap\_url:389 instead of ldaps://ldap\_url:636?

That is correct. We support both `ldap` and `ldaps`.

---

<div class="post-metadata">

### Author: ![lks21c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lks21c/32/15218_2.png) [@lks21c](https://discuss.elastic.co/u/lks21c)
#### Post date: [June 30, 2017, 7:16am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/5 "2017-06-30T07:16:31Z")

</div>

Thanks for verification.

But I've got another question.  
I've tried to integrate es to my local open ldap server which is running on docker.  
Could you tell me which point I'm doing wrong below?

**[elasticsearch.yml]**

xpack:  
security:  
authc:  
realms:  
ldap\_realm:  
type: ldap  
order: 0  
url: "ldap://localhost:389"  
bind\_dn: "cn=admin,dc=example,dc=org"  
bind\_password: admin  
user\_search:  
base\_dn: "dc=example,dc=org"  
attribute: cn  
group\_search:  
base\_dn: "dc=example,dc=org"  
files:  
role\_mapping: "role\_mapping.yml"  
unmapped\_groups\_as\_roles: false

**[es log]**

I got below message when I run es.

[2017-06-30T16:07:05,403][INFO][o.e.x.s.a.l.LdapUserSearchSessionFactory] [Do8HS8c] Realm [ldap\_realm] is in user-search mode - base\_dn=[dc=example,dc=org], attribute=[cn]

**[trial for verification]**  
curl -u cn=admin,dc=example,dc=org:admin localhost:9200/a/b/\_search

**[error msg]**

I got this error message.

unable to authenticate user [cn=admin,dc=example,dc=org] for REST request [/a/b/\_search]

Moreover, the request was successful with default "elastic" account.

curl -u elastic:changeme localhost:9200/a/b/\_search

---

<div class="post-metadata">

### Author: ![lks21c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lks21c/32/15218_2.png) [@lks21c](https://discuss.elastic.co/u/lks21c)
#### Post date: [June 30, 2017, 8:30am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/6 "2017-06-30T08:30:32Z")

</div>

I succeeded login with below script.  
In a nutshell, I could use just id of ldap rather than using "full ldap name".

curl -u admin:admin2 localhost:9200/a/b/\_search

Thx.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 28, 2017, 8:30am UTC](https://discuss.elastic.co/t/can-i-use-x-pack-ldap-authentication-without-ssl/91364/7 "2017-07-28T08:30:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
