source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py @ 3893

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py@3893
Revision 3893, 3.5 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 
1"""
2Setup your Routes options here
3"""
4import os
5from routes import Mapper
6
7def make_map():
8    root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
9
10    map = Mapper(directory=os.path.join(root_path, 'controllers'))
11   
12    # This route handles displaying the error page and graphics used in the 404/500
13    # error pages. It should likely stay at the top to ensure that the error page is
14    # displayed properly.
15    map.connect('error/:action/:id', controller='error')
16   
17    # Define your routes. The more specific and detailed routes should be defined first,
18    # so they may take precedent over the more generic routes. For more information, refer
19    # to the routes manual @ http://routes.groovie.org/docs/
20    #map.connect(':controller/:action/:id')
21    #map.connect('*url', controller='template', action='view')
22   
23    #WMS
24    map.connect(':file/wms', controller='csml_wms')  #should become obsolete
25    map.connect('wms/:uri', controller='csml_wms')
26   
27    #WCS
28    #map.connect(':file/status/:jobID', controller='status', action='getStatus')  #not used currently
29    #wcs controller for all versions: (called wcsx)
30    map.connect('wcs/:uri', controller='csml_wcsx')
31
32    #filestore - used for 'store' in wcs
33    map.connect('filestore/:file', controller='fetch', action='fetchFile')
34   
35    # following is the shell for the rest of the ndg
36   
37    map.connect('login', controller='login')
38    map.connect('getCredentials', controller='login', action='getCredentials')
39    map.connect('wayf', controller='wayf')
40    map.connect('logout', controller='logout')
41    map.connect('semantic',controller='discovery', action='semantic')
42    map.connect('view/:uri', controller = 'retrieve', action='view')
43    map.connect('askCorrect/:uri', controller='retrieve', action='askCorrect')
44    map.connect('correct/:uri', controller='retrieve', action='correct')
45    map.connect('retrieve/:uri', controller = 'retrieve')
46    map.connect('selectedItems',controller='selectedItems',action='index')
47    map.connect('viewItems',controller='viewItems',action='index')
48    map.connect('removeViewItem',controller='viewItems',action='index')
49    map.connect('addSelectedItem/:entryid/:divid',
50                controller='selectedItems',action='addSelectedItem')
51    map.connect('unSelectItem/:entryid/:divid', controller='selectedItems',action='unSelectItem')
52    map.connect('removeSelectedItem/:entryid',controller='selectedItems',action='removeSelectedItem')
53    map.connect('visualise', controller='visualise', action='index')
54
55    # This route doesn't match the controller's parameters.
56    #map.connect('csml/:uri', controller='csml_api')
57    # Below is the way it worked before with added
58    #"csml" path component
59    #map.connect('csml/:file.:format', controller='csml_api', action='index',
60              #format='html')
61    #map.connect('csml/:file/:(feature).:format', action='getFeature',
62              #controller='csml_api', format='html')
63    #map.connect('csml/:file/:feature/:action', controller='csml_api')
64
65    map.connect('trackback/:uri', controller='trackback')
66    map.connect('discovery',controller='discovery')
67    map.connect('visualise/:dataset/:view',controller='visualise',action='tabChange')
68    map.connect('visualise/:view',controller='visualise',action='featureChange')
69    #do this last or else you'll get bizarre behaviour
70    map.connect('',controller='discovery',action='index')
71    map.connect('clearSession',controller='discovery',action='clearSession')
72    return map
Note: See TracBrowser for help on using the repository browser.