Closed tsukky67 closed 10 months ago
Based on the prompt, this seems not to be a bug, but rather a case of incorrect configuration.
For instance, in your
LDAP_BIND_USER: cn=readopnly,dc=*,dc=*,dc=*,dc=*,dc=*
the term "readopnly" appears to be a misspelling of "readonly". I would suggest a thorough re-examination of your configuration settings.
It was a simple typo. I probably typed it wrong while changing it several times. However, even after fixing it, it still shows the same behavior as before. In addition, I noticed that requests with different usernames are giving different errors, so I assume that access to the LDAP server is successful.
docker exec ldap-overleaf-sl cat /var/log/sharelatex/web.log
Set UV_THREADPOOL_SIZE=16
ENABLE_TRACE_AGENT set to undefined
ENABLE_DEBUG_AGENT set to undefined
ENABLE_PROFILE_AGENT set to undefined
Using default settings from /overleaf/services/web/config/settings.defaults.js
Using settings from /etc/sharelatex/settings.js
(node:165) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
An Error occured while getting user data during ldapsearch: Error: The target object cannot be found. Code: 0x20 #This is the error problem that is happening.
Could not bind user: uid=text,ou=people,dc=*,dc=*,dc=*,dc=*,dc=* #Behavior when this line is a non-existent user name
After several retries, I believe the problem with my configuration is in the LDAP_USER_FILTER
section.
It refers to the readme that
LDAP_USER_FILTER: '(&(memberof=GROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)(uid=%u))'
and it refers to the example file that
LDAP_USER_FILTER: "(memberof=cn=GROUPNAME,ou=groups,dc=DOMAIN,dc=TLD)"
I have tried several times, referring to both writing styles, but the behavior has not changed. I consider this part important because commenting it out fundamentally makes it not work properly.
I have tried the config
LDAP_USER_FILTER: "objectClass=*"
This is not working.
And I got the error
An Error occured while getting user data during ldapsearch: Error: Invalid attribute name: *
with the config
LDAP_USER_FILTER: "*"
This means that the config for ldapsearch is loaded, and it is probably no work for it. Does anyone have any good ideas?
I think you should use either:
## NO LDAP BIND USER:
LDAP_BINDDN: uid=%u,ou=people,dc=*,dc=*,dc=*,dc=*,dc=*
OR
## Or you can use ai global LDAP_BIND_USER
LDAP_BIND_USER: cn=readonly,dc=*,dc=*,dc=*,dc=*,dc=*
LDAP_BIND_PW: *
For testing your LDAP_USER_FILTER: you can use e.g.:
ldapsearch
similar to the confiugration
ldapsearch -vvvv -D 'uid=YOURUSERID,ou=people,dc=XXX,dc=XXX,dc=XXX' -b 'dc=XXX,dc=XXX,dc=XXX' -H ldaps://LDAPSERVER.FQDN:636 -W '(|(memberof=cn=GROUPNAME,ou=groups,dc=XXX,dc=XXX,dc=XXX)(memberof=cn=SECONDGROUPNAME,ou=groups,dc=XXX,dc=XXX,dc=XXX))'
where
-D
is the binddn-b
is the searchbase-W
prompts for simple authentication
and the most important part is the last - the filterstring. Note: this filter gives you a list of entries which are in group GROUPNAME or in SECONDGROUPNAME
for the configuration you normally ask then is UID in this result therefore the string is
'(&(uid=%u)(|(memberof=cn=YYYY,ou=groups,dc=...)(memberof=cn=ZZZ,ou=groups,dc=...)))'
I hope this helps
Thank you for your issue. We hope the the provided information was helpful to you. This issue will now be closed due to prolonged inactivity. If you have more questions, feel free to reopen it or open a new one.
I tried to do LDAP authentication but could not resolve the following error. Other services are working with the same credentials (e.g. QNAP NAS)
docker-compose.yaml is this. (* is changed for secret)