summaryrefslogtreecommitdiffstats
path: root/ipsilon/login
diff options
context:
space:
mode:
Diffstat (limited to 'ipsilon/login')
-rwxr-xr-xipsilon/login/authkrb.py15
-rwxr-xr-xipsilon/login/authpam.py21
-rwxr-xr-xipsilon/login/common.py8
3 files changed, 44 insertions, 0 deletions
diff --git a/ipsilon/login/authkrb.py b/ipsilon/login/authkrb.py
index 8069c6a..5b9163d 100755
--- a/ipsilon/login/authkrb.py
+++ b/ipsilon/login/authkrb.py
@@ -79,3 +79,18 @@ plugin for actual authentication. """
self.page.__dict__['negotiate'] = KrbAuth(site, self)
self.page.__dict__['unauthorized'] = KrbError(site, self)
return self.page
+
+
+class Installer(object):
+
+ def __init__(self):
+ self.name = 'krb'
+ self.ptype = 'login'
+
+ def install_args(self, group):
+ group.add_argument('--krb', choices=['yes', 'no'], default='no',
+ help='Configure Kerberos authentication')
+
+ def configure(self, opts):
+ if opts['krb'] != 'yes':
+ return
diff --git a/ipsilon/login/authpam.py b/ipsilon/login/authpam.py
index 496a774..1eb697b 100755
--- a/ipsilon/login/authpam.py
+++ b/ipsilon/login/authpam.py
@@ -143,3 +143,24 @@ for authentication. """
def get_tree(self, site):
self.page = Pam(site, self)
return self.page
+
+
+class Installer(object):
+
+ def __init__(self):
+ self.name = 'pam'
+ self.ptype = 'login'
+
+ def install_args(self, group):
+ group.add_argument('--pam', choices=['yes', 'no'], default='no',
+ help='Configure PAM authentication')
+ group.add_argument('--pam-service', action='store', default='remote',
+ help='PAM service name to use for authentication')
+
+ def configure(self, opts):
+ if opts['pam'] != 'yes':
+ return
+
+ if opts['pam_service'] != 'remote':
+ #TODO: add service_name in the database
+ return
diff --git a/ipsilon/login/common.py b/ipsilon/login/common.py
index b7000b2..d290521 100755
--- a/ipsilon/login/common.py
+++ b/ipsilon/login/common.py
@@ -20,6 +20,7 @@
from ipsilon.util.page import Page
from ipsilon.util.user import UserSession
from ipsilon.util.plugin import PluginLoader, PluginObject
+from ipsilon.util.plugin import PluginInstaller
import cherrypy
@@ -124,3 +125,10 @@ class Logout(Page):
def root(self, *args, **kwargs):
UserSession().logout(self.user)
return self._template('logout.html', title='Logout')
+
+
+class LoginMgrsInstall(object):
+
+ def __init__(self):
+ pi = PluginInstaller(LoginMgrsInstall)
+ self.plugins = pi.get_plugins()