source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/login.py @ 3893

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/login.py@3893
Revision 3893, 1.0 KB checked in by pjkersha, 12 years ago (diff)

Security Single Sign On code separated out of ows_server code stack and put in ndg.security. ows_server can still run single sign on but in alternate modes:

  • Single Sign On Service run from within ows_server code stack - all SSO controllers, templates and globals are imported from ndg.security
  • ... or ows_server runs as a client to a Single Sign On service running in a separate paster instance. ows_server imports SSO client interface code from ndg.security

ows_server/development.ini:

  • added logging config as available with Pylons 0.9.6

ows_server/ndgDiscovery.config: [NDG_SECURITY] settings are now divided into sub sections:

  • NDG_SECURITY.ssoClient - for running a client to a Single Sign On service
  • NDG_SECURITY.ssoService - for running an integral SSO service
  • NDG_SECURITY.wssecurity - digital signature for web service interfaces
  • TODO: separate section for Gatekeeper


ows_server/ows_server/models/ndgSecurity.py: get rid of sslPeerCertDN setting to SM client - not needed

ows_server/ows_server/config/environment.py: include templates from ndg.security.server.sso

ows_server/ows_server/config/ndgMiddleware.py: call separate security SSO service/client middleware set-up

ows_server/ows_server/config/routing.py,
ows_server/ows_server/controllers/wayf.py: separate wayf controller

ows_server/ows_server/controllers/login.py: code moved to ndg.security.server.sso.sso.controllers.login ows_server login extends this class
ows_server/ows_server/controllers/logout.py: likewise for logout - inherit from ndg.security.server.sso equivalent

ows_server/ows_server/lib/security_util.py:

  • stripFromURI returns str type not unicode
  • SecurityConfig? class no longer needed - code transfered to ndg.security

ows_server/ows_server/lib/base.py: remove security handling code and instead inherit from ndg.security.client.ssoclient.ssoclient.base.BaseController?

ows_server/ows_server/public/layout/ndg2.css: fix to header image path

ows_server/ows_server/templates/ndgPage.kid: embed code to base 64 encode return to URL

Line 
1import sys,cgi
2from urlparse import urlsplit, urlunsplit
3import base64
4
5from ows_server.lib.base import *
6
7import logging
8log = logging.getLogger(__name__)
9
10try:
11    from ndg.security.server.sso.sso.controllers.login \
12        import LoginController as _LoginController
13       
14    class LoginController(_LoginController):
15        '''Provides the pylons controller for Login.  This is a wrapper class.
16        - All functionality is provided from ndg.security.server.sso.sso
17        the NDG Security Single Sign On Service package'''
18           
19except ImportError, e:
20    from warnings import warn
21    warn("Importing LoginController for Single Sign On Service: %s" % e, 
22         RuntimeWarning)
23   
24    class LoginController(BaseController):
25        '''Raise a 404 error for case where Single Sign ON Service is disabled
26        '''   
27       
28        def index(self):
29            ''' Ok, you really want to login here '''
30            log.info("Single Sign On Service is disabled setting 404 error...")
31            abort(404)
32           
Note: See TracBrowser for help on using the repository browser.