The branch, master has been updated via 019de66c67ab70c279030e9bb17884b369c6fd0e (commit) from d7fac0cdf9f44dcbf752f2f0fcabe262c804efa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 019de66c67ab70c279030e9bb17884b369c6fd0e Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 5 01:07:58 2012 +0100 new backend option: auth-mech, allow several authentication mechanisms to be implemented ----------------------------------------------------------------------- Summary of changes: etc/x2gobroker.conf | 3 +++ x2gobroker/backends/base.py | 14 ++++++++++---- x2gobroker/defaults.py | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-) The diff of changes is: diff --git a/etc/x2gobroker.conf b/etc/x2gobroker.conf index b453a7a..6d42375 100644 --- a/etc/x2gobroker.conf +++ b/etc/x2gobroker.conf @@ -84,15 +84,18 @@ enable-html-output = false [zeroconf] enable = true +auth-mech = pam desktop-shell = KDE [singlenodes] enable = false +auth-mech = pam session-profiles = /etc/x2go/broker/x2gobroker-sessionprofiles.conf session-profiles-map = /etc/x2go/broker/x2gobroker-sessionprofilesmap.conf [ldap] enable = false +auth-mech = pam uri = ldap://localhost:389 base = dc=example,dc=org user-search-filter = (&(objectClass=posixAccount)(uid=*)) diff --git a/x2gobroker/backends/base.py b/x2gobroker/backends/base.py index 8b2cbb3..afff442 100644 --- a/x2gobroker/backends/base.py +++ b/x2gobroker/backends/base.py @@ -121,10 +121,16 @@ class X2GoBroker(object): def _check_access(self, username='', password='', authid=None): - # do a simple PAM authentication against the PAM service ,,x2gobroker'' - if username and password: - if pam.authenticate(username, password, service="x2gobroker"): - return True + if self.config.get_value(self.backend_name, 'auth-mech').lower() == 'pam': + # do a simple PAM authentication against the PAM service ,,x2gobroker'' + if username and password: + if pam.authenticate(username, password, service="x2gobroker"): + return True + + elif self.config.get_value(self.backend_name, 'auth-mech').lower() == 'htpasswd': + ### TODO: implement an authentication mechanism that can use htpasswd files + pass + return False def check_access(self, username='', password='', authid=None, ): diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py index d1bbd35..34a33fb 100644 --- a/x2gobroker/defaults.py +++ b/x2gobroker/defaults.py @@ -51,15 +51,18 @@ X2GOBROKER_CONFIG_DEFAULTS = { }, 'zeroconf': { 'enable': True, + 'auth-mech': 'pam', 'desktop-shell': 'KDE', }, 'inifile': { 'enable': False, + 'auth-mech': 'pam', 'session-profiles': '/etc/x2go/broker/x2gobroker-sessionprofiles.conf', 'session-profiles-map': '/etc/x2go/broker/x2gobroker-sessionprofilesmap.conf', }, 'ldap': { 'enable': False, + 'auth-mech': 'pam', 'uri': 'ldap://localhost:389', 'base': 'dc=example,dc=org', 'user-search-filter': '(&(objectClass=posixAccount)(uid=*))', hooks/post-receive -- x2gobroker.git (HTTP(S) Session broker for X2Go) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).