diff --git a/backend/auth/backends/ldap.py b/backend/auth/backends/ldap.py index a005ca3..b86510e 100644 --- a/backend/auth/backends/ldap.py +++ b/backend/auth/backends/ldap.py @@ -11,7 +11,9 @@ class Backend(AbstractBackend): - _server = Server(host=settings.ldap.host, connect_timeout=settings.ldap.timeout) + _server = Server(host=settings.ldap.host, + use_ssl=settings.ldap.use_ssl, + connect_timeout=settings.ldap.timeout) @staticmethod def search_string(username: str) -> str: diff --git a/backend/config.py b/backend/config.py index 4d43f09..8da905d 100644 --- a/backend/config.py +++ b/backend/config.py @@ -20,6 +20,7 @@ class LdapSettings(BaseSettings): user: str = "uid=username,cn=users,dc=suse,dc=de" password: str = "secret" host: str = "example.com" + use_ssl: bool = False bind_template: str = "uid={username},cn=users,dc=suse,dc=de" search_template: str = "(uid={username})" attr: LdapAttributeMap = LdapAttributeMap()