From cacb41e93b377496e77f824f4f1b0ce206da0bed Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 17 Mar 2015 20:25:18 -0400 Subject: Add LDAP test This finally tests the LDAP login/info plugins as well as the special "groups" attribute. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/login/authldap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ipsilon/login/authldap.py') diff --git a/ipsilon/login/authldap.py b/ipsilon/login/authldap.py index db58360..595d6be 100644 --- a/ipsilon/login/authldap.py +++ b/ipsilon/login/authldap.py @@ -190,6 +190,8 @@ class Installer(LoginManagerInstaller): help='LDAP Server Url') group.add_argument('--ldap-bind-dn-template', action='store', help='LDAP Bind DN Template') + group.add_argument('--ldap-tls-level', action='store', default=None, + help='LDAP TLS level') group.add_argument('--ldap-base-dn', action='store', help='LDAP Base DN') @@ -208,7 +210,10 @@ class Installer(LoginManagerInstaller): config['server url'] = opts['ldap_server_url'] if 'ldap_bind_dn_template' in opts: config['bind dn template'] = opts['ldap_bind_dn_template'] - config['tls'] = 'Demand' + if 'ldap_tls_level' in opts and opts['ldap_tls_level'] is not None: + config['tls'] = opts['ldap_tls_level'] + else: + config['tls'] = 'Demand' if 'ldap_base_dn' in opts and opts['ldap_base_dn'] is not None: config['base dn'] = opts['ldap_base_dn'] po.save_plugin_config(config) -- cgit