0

Improve LDAPS configuration settings

s0p4L1n3 hace 8 meses 0

Hello Guys,


I recently posted an issue and then a suggestion to glpi  issue page on GitHub (that I resolved by my own)


Based on my previous [issue](https://github.com/glpi-project/glpi/issues/16823)


I found the "problem" but as I can't make a PR, I propose these differents solution to helps the next adminsys (and avoid him to create another issue) that will try to configure LDAPS and thinking everything is correctly configured but no.


  • Not working LDAPS configuration

  • Working LDAPS configuration

Why do we have to specify the protocol `ldaps://` in the `server` field when we are already setting `port` field with `636`.


Then why we don't need to specify `ldap://` when it is by default the port 389.


**I propose different fixes:**


  1. Add a condition in the code that checks if the user configures port 636 but did not write ldaps:// in the server field, then a detailed error log informs the user.
  1. Or Change the field description Server to something like this


  1. Or edit LDAP configuration interface:

- replace the port field with an LDAP / LDAPS selection button

- (depending on the choice, it will pre-fill the server field with `ldaps://` and port `636` or the default ldap and 389)



My suggestions are minimum impact and here to just improve the understanding of the admins enabling LDAPS.