Stop using memcache, use mod_auth_gssapi filesystem based ccaches. Remove custom session handling, use mod_auth_gssapi and mod_session to establish and keep a session cookie. Add loopback to mod_auth_gssapi to do form absed auth and pass back a valid session cookie. And now that we do not remove ccaches files to move them to the memcache, we can avoid the risk of pollutting the filesystem by keeping a common ccache file for all instances of the same user. https://fedorahosted.org/freeipa/ticket/5959 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
28 lines
645 B
Python
28 lines
645 B
Python
#
|
|
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
|
#
|
|
|
|
from ipalib import Command
|
|
from ipalib.request import context
|
|
from ipalib.plugable import Registry
|
|
from ipaserver.session import logout
|
|
|
|
register = Registry()
|
|
|
|
|
|
@register()
|
|
class session_logout(Command):
|
|
'''
|
|
RPC command used to log the current user out of their session.
|
|
'''
|
|
NO_CLI = True
|
|
|
|
def execute(self, *args, **options):
|
|
ccache_name = getattr(context, 'ccache_name', None)
|
|
if ccache_name is None:
|
|
self.debug('session logout command: no ccache_name found')
|
|
|
|
logout(ccache_name)
|
|
|
|
return dict(result=None)
|