Skip to content
Snippets Groups Projects
Commit cfea5053 authored by Sameer Al-Sakran's avatar Sameer Al-Sakran Committed by GitHub
Browse files

Merge pull request #5461 from wwwiiilll/ldap-anon-bind

Allow anonymous binding for the LDAP lookup user
parents bb746f3c e3870bac
No related branches found
No related tags found
No related merge requests found
......@@ -199,14 +199,12 @@ const SECTIONS = [
{
key: "ldap-bind-dn",
display_name: "Username or DN",
type: "string",
required: true
type: "string"
},
{
key: "ldap-password",
display_name: "Password",
type: "password",
required: true
type: "password"
},
{
key: "ldap-user-base",
......
......@@ -35,7 +35,7 @@
(setting/set-string! :ldap-security new-value)))
(defsetting ldap-bind-dn
"The Distinguished Name to bind as, this user will be used to lookup information about other users.")
"The Distinguished Name to bind as (if any), this user will be used to lookup information about other users.")
(defsetting ldap-password
"The password to bind with for the lookup user.")
......@@ -78,8 +78,6 @@
[]
(boolean (and (ldap-enabled)
(ldap-host)
(ldap-bind-dn)
(ldap-password)
(ldap-user-base))))
(defn- details->ldap-options [{:keys [host port bind-dn password security]}]
......
......@@ -27,6 +27,11 @@
{:status :SUCCESS}
(ldap/test-ldap-connection (get-ldap-details)))
;; The connection test should allow anonymous binds
(expect-with-ldap-server
{:status :SUCCESS}
(ldap/test-ldap-connection (dissoc (get-ldap-details) :bind-dn)))
;; The connection test should fail with an invalid user search base
(expect-with-ldap-server
:ERROR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment