-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ldap authentication fails against ldap.js #7062
Comments
khushboovashi
added a commit
to khushboovashi/pgadmin4
that referenced
this issue
Dec 22, 2023
…o ignore fetching schema from the LDAP server. pgadmin-org#7062
@andreimirt, please test #7080. |
akshay-joshi
pushed a commit
that referenced
this issue
Jan 1, 2024
…o ignore fetching schema from the LDAP server. #7062
@andreimirt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Authentication fails against ldap.js because the the requested schema doesn't pass validation, even though the schema is not needed for authentication, so the server could be defined using
get_info=None
instead ofget_info=ALL
To Reproduce
Steps to reproduce the behavior:
raise LDAPSchemaError('malformed schema definition, use get_info=NONE in Server definition')
Expected behavior
The LDAP user should be authenticated considering that regardless of the validity of the schema, it is not needed for authentication.
Error message
Official Docker image
Additional context
I am using the Azure-LDAP-wrapper that uses ldap.js server, but I'm using it to authenticate successfully multiple services, including postgresql. I am aware that if there wouldn't be any other issue either in the server or in the client, the current ldap client implementation in pgadmin should not make a difference, but considering that likely server.schema is not necessary for authentication, pgadmin should perhaps not request it, which allows ldap authentication on more systems.
Workaround
To temporary fix the issue I did exactly what the error message from ldap3 library suggests in the error message. I modified ldap.py in the sense of modifying
get_info=ALL
toget_info=None
. This allows authentication without any issues. Changing this would leaveserver.schema
empty, but I couldn't find any place where it would be needed.The text was updated successfully, but these errors were encountered: