From 182fbe30945a8de005f00b460968dca7973342fb Mon Sep 17 00:00:00 2001 From: rcritten Date: Mon, 10 Sep 2007 16:33:01 -0400 Subject: Enable mod_proxy to sit in front of TurboGears and pass along the kerberos principal name Add an identity an visit class to TurboGears that can handle the user without requiring a database Update the UI to show the user correctly. Note that this is currently disabled. It is hardcoded to always return the principal test@FREEIPA.ORG in proxyprovider.py It doesn't handle an unauthorized request because that can never happen. --- ipa-server/ipa-gui/ipagui/proxyvisit.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ipa-server/ipa-gui/ipagui/proxyvisit.py (limited to 'ipa-server/ipa-gui/ipagui/proxyvisit.py') diff --git a/ipa-server/ipa-gui/ipagui/proxyvisit.py b/ipa-server/ipa-gui/ipagui/proxyvisit.py new file mode 100644 index 00000000..1fde3902 --- /dev/null +++ b/ipa-server/ipa-gui/ipagui/proxyvisit.py @@ -0,0 +1,25 @@ +from turbogears.visit.api import BaseVisitManager, Visit +from turbogears import config + +import logging + +log = logging.getLogger("turbogears.visit.proxyvisit") + +class ProxyVisitManager(BaseVisitManager): + """Virtually empty class just so can avoid saving this stuff in a + database.""" + def __init__(self, timeout): + super(ProxyVisitManager,self).__init__(timeout) + return + + def create_model(self): + return + + def new_visit_with_key(self, visit_key): + return Visit(visit_key, True) + + def visit_for_key(self, visit_key): + return Visit(visit_key, False) + + def update_queued_visits(self, queue): + return None -- cgit