[Kimchi-devel] [PATCHv1 1/4] Add configuration of LDAP

lvroyce0210 at gmail.com lvroyce0210 at gmail.com
Mon Oct 20 13:52:17 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      | 9 +++++++++
 src/kimchi/config.py.in | 5 +++++
 2 files changed, 14 insertions(+)

diff --git a/src/kimchi.conf.in b/src/kimchi.conf.in
index ea39292..5c54d4e 100644
--- a/src/kimchi.conf.in
+++ b/src/kimchi.conf.in
@@ -43,3 +43,12 @@
 [display]
 # Port for websocket proxy to listen on
 #display_proxy_port = 64667
+
+[authentication]
+# Authentication method, available option: pam, ldap.
+# method = pam
+
+# Following fields need to be specified if using LDAP.
+# ldap_server = "localhost"
+# ldap_search_base = "ou=People, dc=kimchi, dc=org"
+# ldap_search_filter = "uid=%(username)s"
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index 097c017..887fe63 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -259,6 +259,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