mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 09:26:00 +03:00
[GH-ISSUE #1259] LDAP using TLS not possible with current control panel settings #1021
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1021
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @psycotic2017 on GitHub (Oct 2, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1259
Impacted versions
Current behavior
Even though the control panel suggests otherwise there is no option to use LDAP with TLS. Selecting 'Yes' on the 'Use a secured connection' setting only seems to create a LDAP URL for SSL (ldaps://) even if the port number is 389.
Selecting 'No' on the 'Use a secured connection' setting and putting 'AUTH_LDAP_START_TLS = True' in settings.py enables communication with LDAP over TLS
Expected behavior
Selecting 'Yes' on the 'Use a secured connection' setting and leaving the port number at 389 suggests to me that TLS would be used
@tonioo commented on GitHub (Oct 6, 2017):
@psycotic2017 And what happens if you change the port?
@psycotic2017 commented on GitHub (Oct 7, 2017):
@tonioo Changing the port number makes no difference, as far as I can tell.
Looking at the code in modoboa/core/app_settings.py (and I'm no python expert at all) at line 421:
ldap_uri = "ldaps://" if values["ldap_secured"] else "ldap://"This piece of code seems to set the ldap uri independent of the port number.
Personally I think the ldap secured setting should have 3 values and not 2 as it has at present.
Rather than off or on it should be off, ssl or tls.
The ssl setting would set the
ldaps://uri as it does already, the tls setting would keep theldap://uri but setAUTH_LDAP_START_TLS = True