diff options
author | Simo Sorce <simo@redhat.com> | 2014-10-09 11:30:25 -0400 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2014-10-09 17:35:51 +0200 |
commit | 73c60e2df7ac240ddd847568e782a9b06f3ea520 (patch) | |
tree | 02aff4c8894bf85772da5539fb3f45128f7c89f8 /ipsilon | |
parent | 00eeb02a9abd7d8045e783031e990efd8a8e1109 (diff) | |
download | ipsilon-73c60e2df7ac240ddd847568e782a9b06f3ea520.tar.gz ipsilon-73c60e2df7ac240ddd847568e782a9b06f3ea520.tar.xz ipsilon-73c60e2df7ac240ddd847568e782a9b06f3ea520.zip |
Fix mod_auth_kerb based authentication
Recent changes in how self.user is populated broke krb based auth.
Explicitly check the remote user in the module to fix it.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon')
-rwxr-xr-x | ipsilon/login/authkrb.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ipsilon/login/authkrb.py b/ipsilon/login/authkrb.py index 5f2d682..965d018 100755 --- a/ipsilon/login/authkrb.py +++ b/ipsilon/login/authkrb.py @@ -21,6 +21,7 @@ from ipsilon.login.common import LoginPageBase, LoginManagerBase from ipsilon.login.common import FACILITY from ipsilon.util.plugin import PluginObject from ipsilon.util.trans import Transaction +from ipsilon.util.user import UserSession from string import Template import cherrypy import os @@ -40,7 +41,10 @@ class KrbAuth(LoginPageBase): trans = Transaction('login', **kwargs) # If we can get here, we must be authenticated and remote_user # was set. Check the session has a user set already or error. - if self.user and self.user.name: + us = UserSession() + us.remote_login() + self.user = us.get_user() + if not self.user.is_anonymous: userdata = {'krb_principal_name': self.user.name} return self.lm.auth_successful(trans, self.user.name, 'krb', userdata) |