[GH-ISSUE #114] WikiJS LDAP failing authentication #47

Closed
opened 2026-02-27 08:14:56 +03:00 by kerem · 1 comment
Owner

Originally created by @abbiewade on GitHub (Feb 1, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/114

Hi @nitnelave!

I'm using the standard WikiJS setup, and have gone to manually configure LDAP and run into issues.

image

The LDAP logs are:

lldap             | 2022-02-01T10:35:04.673732Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 1, op: BindRequest(LdapBindRequest { dn: "cn=admin,ou=people,dc=example,dc=com", cred: Simple("********") }), ctrl: [] }    
lldap             | 2022-02-01T10:35:04.673760Z DEBUG lldap::infra::ldap_handler: Received bind request for "cn=admin,ou=people,dc=example,dc=com"    
lldap             | 2022-02-01T10:35:04.673790Z DEBUG lldap::infra::ldap_server: Replying with LDAP op: BindResponse(LdapBindResponse { res: LdapResult { code: Success, matcheddn: "", message: "", referral: [] }, saslcreds: None })    
lldap             | 2022-02-01T10:35:04.675053Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 2, op: SearchRequest(LdapSearchRequest { base: "ou=people, dc=example, dc=com", scope: Subtree, aliases: Never, sizelimit: 0, timelimit: 10, typesonly: false, filter: And([Or([Equality("uid", "admin"), Equality("mail", "{{username}")]), Equality("objectClass", "person")]), attrs: [] }), ctrl: [] }    
lldap             | 2022-02-01T10:35:04.675082Z DEBUG lldap::infra::ldap_handler: Received search request: LdapSearchRequest { base: "ou=people, dc=example, dc=com", scope: Subtree, aliases: Never, sizelimit: 0, timelimit: 10, typesonly: false, filter: And([Or([Equality("uid", "admin"), Equality("mail", "{{username}")]), Equality("objectClass", "person")]), attrs: [] }    
lldap             | 2022-02-01T10:35:04.675098Z  WARN lldap::infra::ldap_handler: The specified search tree [("ou", "people"), (" dc", "example"), (" dc", "com")] is not under the common subtree [("dc", "example"), ("dc", "com")]    
lldap             | 2022-02-01T10:35:04.675111Z DEBUG lldap::infra::ldap_server: Replying with LDAP op: SearchResultDone(LdapResult { code: Success, matcheddn: "", message: "", referral: [] })    
lldap             | 2022-02-01T10:35:04.675507Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 3, op: UnbindRequest, ctrl: [] }   

As you pointed out in discord, the wiki seems to be adding a space which may be the issue. Are you able to help out?

Thank you!

Originally created by @abbiewade on GitHub (Feb 1, 2022). Original GitHub issue: https://github.com/lldap/lldap/issues/114 Hi @nitnelave! I'm using the [standard WikiJS setup](https://docs.requarks.io/install/docker), and have gone to manually configure LDAP and run into issues. ![image](https://user-images.githubusercontent.com/10896397/151940725-578592f6-9a71-4193-bb01-284ab8a350c9.png) The LDAP logs are: ``` lldap | 2022-02-01T10:35:04.673732Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 1, op: BindRequest(LdapBindRequest { dn: "cn=admin,ou=people,dc=example,dc=com", cred: Simple("********") }), ctrl: [] } lldap | 2022-02-01T10:35:04.673760Z DEBUG lldap::infra::ldap_handler: Received bind request for "cn=admin,ou=people,dc=example,dc=com" lldap | 2022-02-01T10:35:04.673790Z DEBUG lldap::infra::ldap_server: Replying with LDAP op: BindResponse(LdapBindResponse { res: LdapResult { code: Success, matcheddn: "", message: "", referral: [] }, saslcreds: None }) lldap | 2022-02-01T10:35:04.675053Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 2, op: SearchRequest(LdapSearchRequest { base: "ou=people, dc=example, dc=com", scope: Subtree, aliases: Never, sizelimit: 0, timelimit: 10, typesonly: false, filter: And([Or([Equality("uid", "admin"), Equality("mail", "{{username}")]), Equality("objectClass", "person")]), attrs: [] }), ctrl: [] } lldap | 2022-02-01T10:35:04.675082Z DEBUG lldap::infra::ldap_handler: Received search request: LdapSearchRequest { base: "ou=people, dc=example, dc=com", scope: Subtree, aliases: Never, sizelimit: 0, timelimit: 10, typesonly: false, filter: And([Or([Equality("uid", "admin"), Equality("mail", "{{username}")]), Equality("objectClass", "person")]), attrs: [] } lldap | 2022-02-01T10:35:04.675098Z WARN lldap::infra::ldap_handler: The specified search tree [("ou", "people"), (" dc", "example"), (" dc", "com")] is not under the common subtree [("dc", "example"), ("dc", "com")] lldap | 2022-02-01T10:35:04.675111Z DEBUG lldap::infra::ldap_server: Replying with LDAP op: SearchResultDone(LdapResult { code: Success, matcheddn: "", message: "", referral: [] }) lldap | 2022-02-01T10:35:04.675507Z DEBUG lldap::infra::ldap_server: Received LDAP message: LdapMsg { msgid: 3, op: UnbindRequest, ctrl: [] } ``` As you pointed out in discord, the wiki seems to be adding a space which may be the issue. Are you able to help out? Thank you!
kerem closed this issue 2026-02-27 08:14:56 +03:00
Author
Owner

@nitnelave commented on GitHub (Feb 11, 2022):

After testing with OpenLDAP, they seem to be trimming spaces everywhere they can, so, "dc=example,dc=com" is equivalent to " dc = example , dc = com ".

I'll fix that in LLDAP

<!-- gh-comment-id:1035941088 --> @nitnelave commented on GitHub (Feb 11, 2022): After testing with OpenLDAP, they seem to be trimming spaces everywhere they can, so, `"dc=example,dc=com"` is equivalent to `" dc = example , dc = com "`. I'll fix that in LLDAP
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#47
No description provided.