[Kimchi-devel] [PATCHv4 1/8] Add configuration of LDAP

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Fri Nov 14 10:37:14 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

Add LDAP configuration to specify LDAP server,
search base and filter for query user.

Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
 src/kimchi.conf.in      | 14 ++++++++++++++
 src/kimchi/config.py.in |  5 +++++
 2 files changed, 19 insertions(+)

diff --git a/src/kimchi.conf.in b/src/kimchi.conf.in
index ea39292..62eb40b 100644
--- a/src/kimchi.conf.in
+++ b/src/kimchi.conf.in
@@ -43,3 +43,17 @@
 [display]
 # Port for websocket proxy to listen on
 #display_proxy_port = 64667
+
+[authentication]
+# Authentication method, available option: pam, ldap.
+# method = pam
+
+# If specified method to ldap, following fields need to be specified.
+# ldap server domain name used to authenticate.
+# ldap_server = "localhost"
+
+# Search tree base in ldap
+# ldap_search_base = "ou=People, dc=kimchi, dc=org"
+
+# User id filter
+# ldap_search_filter = "uid=%(username)s"
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index 06765a2..88de1aa 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -285,6 +285,11 @@ def _get_config():
     config.set("server", "environment", "production")
     config.set("server", "federation", "off")
     config.set('server', 'max_body_size', '4*1024*1024')
+    config.add_section("authentication")
+    config.set("authentication", "method", "pam")
+    config.set("authentication", "ldap_server", "")
+    config.set("authentication", "ldap_search_base", "")
+    config.set("authentication", "ldap_search_filter", "")
     config.add_section("logging")
     config.set("logging", "log_dir", paths.log_dir)
     config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
-- 
1.8.3.2




More information about the Kimchi-devel mailing list