Browse Source

ldap filter

isundil 1 month ago
parent
commit
133da7eef8
2 changed files with 10 additions and 2 deletions
  1. 8 1
      config.sample.json
  2. 2 1
      src/config.ts

+ 8 - 1
config.sample.json

@@ -4,5 +4,12 @@
     "slaves": [ "http://some.host:1234" ],
     "masterPubKey": "generated by npm run generate-key",
     "masterPrivateKey": "generated by npm run generate-key",
-    "apiKeys": []
+    "apiKeys": [],
+    "ldapAuthentication": {
+        "ldapUrl": "ldaps://ldap.xxx.com",
+        "bindDnField": "cn",
+        "bindBase": "ou=users,dc=xxx,dc=com",
+        "usernameField": "dn",
+        "ldapFilter": ""
+    }
 }

+ 2 - 1
src/config.ts

@@ -40,7 +40,8 @@ class ConfigurationManagerLoader {
                 bindDnField: config.ldapAuthentication.bindDnField,
                 bindBase: config.ldapAuthentication.bindBase,
                 ldapUrl: config.ldapAuthentication.ldapUrl,
-                usernameField: config.ldapAuthentication.usernameField
+                usernameField: config.ldapAuthentication.usernameField,
+                ldapFilter: config.ldapAuthentication.ldapFilter
             } : null
         };
     }