Changeset 4821


Ignore:
Timestamp:
16/01/09 11:45:29 (11 years ago)
Author:
pjkersha
Message:
  • esg-ipcc-ar5.eap: Added activity diagrams to describe security WSGI chain logic for browser and non-broswer based requests
  • Single Sign On service: added capability to pick static file content and templates from alternative directory set in config file - no tested.
Location:
TI12-security/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/config/environment.py

    r4020 r4821  
    11"""Pylons environment configuration""" 
    22import os 
    3  
     3from os.path import dirname 
    44from pylons import config 
    55 
     
    1313    """ 
    1414    # Pylons paths 
    15     root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
    16     paths = dict(root=root, 
    17                  controllers=os.path.join(root, 'controllers'), 
    18                  static_files=os.path.join(root, 'public'), 
    19                  templates=[os.path.join(root, 'templates')]) 
     15    rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
     16     
     17    configDir = None 
     18    if 'configfile' in app_conf: 
     19        from ConfigParser import SafeConfigParser as ConfigParser 
     20        cfg = ConfigParser(defaults={'here': dirname(app_conf['configfile'])}) 
     21        cfg.read(app_conf['configfile']) 
     22        if cfg.has_option('DEFAULT', 'rootDir'): 
     23            configDir = cfg.get('DEFAULT', 'rootDir') 
     24     
     25    if configDir is None: 
     26        configDir = rootDir 
     27         
     28    paths = dict(root=configDir, 
     29                 controllers=os.path.join(rootDir, 'controllers'), 
     30                 static_files=os.path.join(configDir, 'public'), 
     31                 templates=[os.path.join(configDir, 'templates')]) 
    2032 
    2133    # Initialize config with the basic options 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/config/ssoServiceMiddleware.py

    r4773 r4821  
    88         
    99from os.path import expandvars as xpdvars 
     10from os.path import dirname 
    1011import logging 
    1112log = logging.getLogger(__name__) 
     
    4142    def __init__(self, app, g, app_conf, **kw): 
    4243        log.debug("SSOMiddleware.__init__ ...") 
    43         ndg.security.server.sso.cfg = SSOServiceConfig(app_conf['configfile'], **kw) 
     44        ndg.security.server.sso.cfg = SSOServiceConfig(app_conf['configfile'],  
     45                                                       **kw) 
    4446         
    4547        # Copy into client for the benefit of 
     
    9698    def read(self, cfgFilePath): 
    9799        '''Read content of config file into object''' 
    98         self.cfg = ConfigParser() 
     100        self.cfg = ConfigParser(defaults={'here': dirname(cfgFilePath)}) 
    99101        self.cfg.read(cfgFilePath) 
    100102  
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/sslclientauthn.py

    r4770 r4821  
    9191             
    9292    errorResponseCode = property(fget=_getErrorResponseCode, 
    93                             fset=_setErrorResponseCode, 
    94                             doc="Response code raised if client certificate " 
    95                                 "verification fails") 
     93                                 fset=_setErrorResponseCode, 
     94                                 doc="Response code raised if client " 
     95                                     "certificate verification fails") 
    9696         
    9797    def _setCACertsFromFileList(self, caCertFilePathList): 
Note: See TracChangeset for help on using the changeset viewer.