mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
feat: LDAP User management
LDAP will be used as default if no other auth form is enabled. LDAP now will work with ENABLE_LOGIN_FORM = false. Fixed exception "User does not match the record." Now LDAP login is case insensitive. Integrated with onboarding feature.
This commit is contained in:
@@ -1578,3 +1578,80 @@ AUDIO_TTS_AZURE_SPEECH_OUTPUT_FORMAT = PersistentConfig(
|
||||
"AUDIO_TTS_AZURE_SPEECH_OUTPUT_FORMAT", "audio-24khz-160kbitrate-mono-mp3"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
####################################
|
||||
# LDAP
|
||||
####################################
|
||||
|
||||
ENABLE_LDAP = PersistentConfig(
|
||||
"ENABLE_LDAP",
|
||||
"ldap.enable",
|
||||
os.environ.get("ENABLE_LDAP", "True").lower() == "true",
|
||||
)
|
||||
|
||||
LDAP_SERVER_LABEL = PersistentConfig(
|
||||
"LDAP_SERVER_LABEL",
|
||||
"ldap.server.label",
|
||||
os.environ.get("LDAP_SERVER_LABEL", "LDAP Server"),
|
||||
)
|
||||
|
||||
LDAP_SERVER_HOST = PersistentConfig(
|
||||
"LDAP_SERVER_HOST",
|
||||
"ldap.server.host",
|
||||
os.environ.get("LDAP_SERVER_HOST", "localhost")
|
||||
)
|
||||
|
||||
LDAP_SERVER_PORT = PersistentConfig(
|
||||
"LDAP_SERVER_PORT",
|
||||
"ldap.server.port",
|
||||
int(os.environ.get("LDAP_SERVER_PORT", "389"))
|
||||
)
|
||||
|
||||
LDAP_ATTRIBUTE_FOR_USERNAME = PersistentConfig(
|
||||
"LDAP_ATTRIBUTE_FOR_USERNAME",
|
||||
"ldap.server.attribute_for_username",
|
||||
os.environ.get("LDAP_ATTRIBUTE_FOR_USERNAME", "uid")
|
||||
)
|
||||
|
||||
LDAP_APP_DN = PersistentConfig(
|
||||
"LDAP_APP_DN",
|
||||
"ldap.server.app_dn",
|
||||
os.environ.get("LDAP_APP_DN", "")
|
||||
)
|
||||
|
||||
LDAP_APP_PASSWORD = PersistentConfig(
|
||||
"LDAP_APP_PASSWORD",
|
||||
"ldap.server.app_password",
|
||||
os.environ.get("LDAP_APP_PASSWORD", "")
|
||||
)
|
||||
|
||||
LDAP_SEARCH_BASE = PersistentConfig(
|
||||
"LDAP_SEARCH_BASE",
|
||||
"ldap.server.users_dn",
|
||||
os.environ.get("LDAP_SEARCH_BASE", "")
|
||||
)
|
||||
|
||||
LDAP_SEARCH_FILTERS = PersistentConfig(
|
||||
"LDAP_SEARCH_FILTER",
|
||||
"ldap.server.search_filter",
|
||||
os.environ.get("LDAP_SEARCH_FILTER", "")
|
||||
)
|
||||
|
||||
LDAP_USE_TLS = PersistentConfig(
|
||||
"LDAP_USE_TLS",
|
||||
"ldap.server.use_tls",
|
||||
os.environ.get("LDAP_USE_TLS", "True").lower() == "true"
|
||||
)
|
||||
|
||||
LDAP_CA_CERT_FILE = PersistentConfig(
|
||||
"LDAP_CA_CERT_FILE",
|
||||
"ldap.server.ca_cert_file",
|
||||
os.environ.get("LDAP_CA_CERT_FILE", "")
|
||||
)
|
||||
|
||||
LDAP_CIPHERS = PersistentConfig(
|
||||
"LDAP_CIPHERS",
|
||||
"ldap.server.ciphers",
|
||||
os.environ.get("LDAP_CIPHERS", "ALL")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user