Skip to content

Space in search BaseDN causes request to fail #68

@ghost

Description

I wanted to try out GLAuth instead of OpenLDAP for use with Authelia. GLAuth works perfectly with ldaptools, but with Authelia I always get "Authentication failed", so I started to debug the requests and found out Authelia puts a space between the request BaseDN so instead of dc=example,dc=com it sends dc=example, dc=com which causes the request to fail. I wasn't sure whether to submit this to GLAuth or to Authelia, so I'll just submit it to both.

authelia/authelia#306

Example of working request (done with ldapsearch):

14:13:12.879190 Bind ▶ DEBU 054 Bind request: bindDN: cn=admin,ou=admins,dc=example,dc=com, BaseDN: dc=example,dc=com, source: 192.168.0.68:54638
14:13:12.879279 Bind ▶ DEBU 055 Bind success as %s from %s cn=admin,ou=admins,dc=example,dc=com 192.168.0.68:54638
14:13:12.879753 Search ▶ DEBU 056 Search request as %s from %s for %s cn=admin,ou=admins,dc=example,dc=com 192.168.0.68:54638 (objectclass=*)
14:13:12.879955 Search ▶ DEBU 057 AP: Search OK: %s (objectclass=*)

Example of broken request


14:13:27.437198 Bind ▶ DEBU 058 Bind request: bindDN: cn=admin,ou=admins,dc=example,dc=com, BaseDN: dc=example,dc=com, source: 192.168.0.68:54642
14:13:27.437283 Bind ▶ DEBU 059 Bind success as %s from %s cn=admin,ou=admins,dc=example,dc=com 192.168.0.68:54642
14:13:27.437730 Search ▶ DEBU 05a Search request as %s from %s for %s cn=admin,ou=admins,dc=example,dc=com 192.168.0.68:54642 (objectclass=*)
2018/12/15 14:13:27 handleSearchRequest error LDAP Result Code 50 "Insufficient Access Rights": Search Error: search BaseDN dc=example, dc=com is not in our BaseDN dc=example,dc=com

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions