LDAP auth: remove config option 'ldap_use_ssl'

Remove the config option 'ldap_use_ssl' from the code and documentation,
deprecating it for good.
This commit is contained in:
Peter Marschall
2025-09-29 20:54:21 +02:00
parent ce1e5c939a
commit 8c9df49caf
5 changed files with 1 additions and 24 deletions

View File

@@ -8,6 +8,7 @@
* Fix: RECURRENCE-ID comparison on all-day events
* Fix: format_ut problem on 32-bit systems (got lost inbetween since fixed in 3.5.8)
* Maintain: Refactor Web UI Javascript into separate files
* Cleanup: deprecate config option 'ldap_use_ssl' for good
## 3.6.0

View File

@@ -1143,12 +1143,6 @@ login names.
Default: (unset, in which case the login name is directly used as the username)
##### ldap_use_ssl
_(>= 3.3.0)_
Use ssl on the LDAP connection. **Deprecated!** Use `ldap_security` instead.
##### ldap_security
_(>= 3.5.2)_

3
config
View File

@@ -101,9 +101,6 @@
# Attribute holding the value to be used as username after authentication
#ldap_user_attribute = cn
# Use ssl on the LDAP connection (DEPRECATED - use 'ldap_security'!)
#ldap_use_ssl = False
# Encryption mode to be used. Default: none; one of: none, tls, starttls
#ldap_security = none

View File

@@ -26,8 +26,6 @@ Authentication backend that checks credentials with a LDAP server.
ldap_secret_file Path of the file containing the password of the 'ldap_reader_dn'
ldap_filter Search filter to find the user DN to authenticate
The following parameters control TLS connections:
ldap_use_ssl Use ssl on the ldap connection.
Deprecated, use 'ldap_security' instead!
ldap_security Encryption mode to be used,
one of: *none* | tls | starttls
ldap_ssl_verify_mode Certificate verification mode for tls and starttls;
@@ -104,14 +102,6 @@ class Auth(auth.BaseAuth):
self._ldap_security = configuration.get("auth", "ldap_security")
if self._ldap_security not in ("none", "tls", "starttls"):
raise RuntimeError("Illegal value for config setting ´ldap_security'")
ldap_use_ssl = configuration.get("auth", "ldap_use_ssl")
if ldap_use_ssl:
logger.warning("Configuration uses deprecated 'ldap_use_ssl': use 'ldap_security' ('none', 'tls', 'starttls') instead.")
if self._ldap_security == "starttls":
raise RuntimeError("Deprecated config setting 'ldap_use_ssl = True' conflicts with 'ldap_security' = 'starttls'")
elif self._ldap_security != "tls":
logger.warning("Update configuration: set 'ldap_security = tls' instead of deprecated 'ldap_use_ssl = True'")
self._ldap_security = "tls"
self._ldap_ssl_ca_file = configuration.get("auth", "ldap_ssl_ca_file")
self._ldap_ssl_verify_mode = configuration.get("auth", "ldap_ssl_verify_mode")
if self._ldap_ssl_verify_mode not in ("NONE", "OPTIONAL", "REQUIRED"):
@@ -165,7 +155,6 @@ class Auth(auth.BaseAuth):
if self._ldap_reader_dn and not self._ldap_secret:
logger.error("auth.ldap_secret : (not provided)")
raise RuntimeError("LDAP authentication requires ldap_secret for ldap_reader_dn")
logger.info("auth.ldap_use_ssl : %s" % ldap_use_ssl)
logger.info("auth.ldap_security : %s" % self._ldap_security)
logger.info("auth.ldap_ssl_verify_mode : %s" % self._ldap_ssl_verify_mode)
if self._ldap_ssl_ca_file:

View File

@@ -306,10 +306,6 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
"value": "",
"help": "Attribute to be used as username after authentication",
"type": str}),
("ldap_use_ssl", {
"value": "False",
"help": "Use ssl on the LDAP connection. Deprecated, use ldap_security instead!",
"type": bool}),
("ldap_security", {
"value": "none",
"help": "Encryption mode to be used: *none*|tls|starttls",