Skip to content
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

Error message with button "Test LDAP" is empty #5540

Closed
2 tasks done
doekman opened this issue May 15, 2018 · 5 comments
Closed
2 tasks done

Error message with button "Test LDAP" is empty #5540

doekman opened this issue May 15, 2018 · 5 comments
Labels

Comments

@doekman
Copy link
Contributor

doekman commented May 15, 2018

Please confirm you have done the following before posting your bug report:

Describe the bug
On the /admin/ldap-page, when pressing the button "Test LDAP", an error icon is shown without a text message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /admin/ldap
  2. Make sure LDAP enabled is checked.
  3. Have an "LDAP Server" filled in, like ldap://myserver.mydomain.com (I connect to an macOS Server.app Open Directory server)
  4. Use as "LDAP Bind Username" a username like OpenDirReader
  5. Fill out the correct password, and also other fields.
  6. Click on "Save"
  7. Now go again to /admin/ldap
  8. Press the button "Test LDAP"

Expected behavior
A text message explaining the error (below the "Test LDAP" button, right of the red error-icon).

Screenshots
test ldap error

Server (please complete the following information):

  • Snipe-IT Version: v4.3.0 build 3586 (gec1fa8e90)
  • OS: Debian
  • Web Server: NGINX
  • PHP Version: 7.0.27-0+deb9u1

Desktop (please complete the following information):

  • OS: macOS 10.13.4 (17E202)
  • Browser: Safari 11.1 (13605.1.33.1.4)
  • Version [e.g. 22]

Error Messages

[11:24:50] LOG.debug: Preparing to test LDAP connection
[11:24:50] LOG.debug: attempting to bind to LDAP for LDAP test
[11:24:50] LOG.debug: Bind failed

Description
Via Safari's developer console I see that the URL /api/v1/settings/ldaptest returns the JSON {"message": "Could not bind to LDAP: Invalid DN syntax"}. This information is not shown to in the UI.

Also: I figured out the exact problem why LDAP Test failed: the field "LDAP Bind Username" is put into the bind_rdn parameter of the ldap_bind function. The bind_rdn is not a username, but an LDAP dn format, like uid=OpenDirReader,cn=users,dc=myserver,dc=mydomain,dc=com.

So this bug is about:

  1. LDAP Test button should show some error message text.
  2. The LDAP settings screen should provide some guidance as what to fill into the field "LDAP Bind Username" (for example: rename the field to "LDAP Bind DN").

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@snipe
Copy link
Owner

snipe commented May 16, 2018

LDAP configuration is detailed in detail here: https://snipe-it.readme.io/docs/ldap-sync-login

@Mynty100
Copy link

Is this a windows AD or open source AD ?

Based on your setting these would not be what I would use for windows AD.

Let us know try help you further.

doekman added a commit to doekman/snipe-it that referenced this issue May 17, 2018
Error message with button "Test LDAP" is empty snipe#5540
@doekman
Copy link
Contributor Author

doekman commented May 17, 2018

By the way, we use OpenLDAP on macOS (the one that came with Server.app). I've got my LDAP sync working already, so this one is for the person installing Snipe-IT after me :-)

snipe pushed a commit that referenced this issue May 18, 2018
Error message with button "Test LDAP" is empty #5540
@stale
Copy link

stale bot commented Jul 16, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Jul 16, 2018
@doekman
Copy link
Contributor Author

doekman commented Jul 16, 2018

was already fixed.

@doekman doekman closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants