Changeset 4318 for TI12-security/trunk


Ignore:
Timestamp:
09/10/08 16:39:28 (11 years ago)
Author:
pjkersha
Message:

Added ConfigFileParsers? unittests. ConfigFileParsers? validation currently broken.

Location:
TI12-security/trunk/python
Files:
5 added
1 deleted
54 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/Tests/etreewss/client/echoClientTest.cfg

    r4024 r4318  
    33# P J Kershaw 13/12/06 
    44# 
    5 # Copyright (C) 2006 CCLRC & NERC 
     5# Copyright (C) 2006 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/Tests/etreewss/server/echoServer.cfg

    r4054 r4318  
    33# P J Kershaw 13/12/06 
    44# 
    5 # Copyright (C) 2006 CCLRC & NERC 
     5# Copyright (C) 2006 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/Tests/etreewss/server/wssecurity.cfg

    r4024 r4318  
    55# P J Kershaw 01/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.client/ndg/security/client/ssoclient/ssoClient.cfg

    r3892 r4318  
    55# P J Kershaw 01/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.client/setup.cfg

    r4141 r4318  
    66# P J Kershaw 27/10/06 
    77#  
    8 # Copyright (C) 2006 CCLRC & NERC 
     8# Copyright (C) 2006 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/CredWallet.py

    r4304 r4318  
    854854        @type mapFromTrustedHosts: bool 
    855855        @param mapFromTrustedHosts: Attribute Authority Web Service.""" 
    856         if CredWallet.isBoolString(mapFromTrustedHosts): 
    857             mapFromTrustedHosts = bool(mapFromTrustedHosts) 
    858              
    859         elif not isinstance(mapFromTrustedHosts, bool): 
     856        if not isinstance(mapFromTrustedHosts, bool): 
    860857            raise AttributeError("Expecting %r for mapFromTrustedHosts " 
    861858                                 "attribute" % bool) 
     
    886883        a list of ACs that could be used in a re-try to get a mapped AC from  
    887884        the target Attribute Authority.""" 
    888         if CredWallet.isBoolString(rtnExtAttCertList): 
    889             rtnExtAttCertList = bool(rtnExtAttCertList) 
    890              
    891         elif not isinstance(rtnExtAttCertList, bool): 
     885        if not isinstance(rtnExtAttCertList, bool): 
    892886            raise AttributeError("Expecting %r for rtnExtAttCertList " 
    893887                                 "attribute" % bool) 
     
    899893                                 doc="Set to True to enable mapped AC " 
    900894                                     "requests") 
    901  
    902     @staticmethod 
    903     def isBoolString(string): 
    904         '''Test for string set to equivalent of bool const values''' 
    905         return isinstance(string, basestring) and string in ('True', 'False') 
    906  
    907895 
    908896    def isValid(self, **x509CertKeys): 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/authz/pdp/browse.cfg

    r3894 r4318  
    66# P J Kershaw 09/04/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/authz/pdp/proftp.cfg

    r3790 r4318  
    66# P J Kershaw 09/04/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/authz/pep.cfg

    r3896 r4318  
    55# P J Kershaw 04/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/myproxy.py

    r4307 r4318  
    242242         
    243243         
    244     #_________________________________________________________________________             
    245244    def __init__(self, propFilePath=None, **prop): 
    246         """Make an initial settings for client connections to MyProxy 
     245        """Make any initial settings for client connections to MyProxy 
    247246         
    248247        Settings are held in a dictionary which can be set from **prop, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/utils/ClassFactory.py

    r4262 r4318  
    9696         
    9797    except Exception, e: 
    98         raise ClassFactoryError("Error instantiating class, %s: " % \ 
     98        raise ClassFactoryError("Error instantiating class, %s: %s" % \ 
    9999                                                    (importClass.__name__, e)) 
    100100             
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/utils/ConfigFileParsers.py

    r4304 r4318  
    6868                  "properties file") 
    6969        properties = readXMLPropertyFile(propFilePath, validKeys) 
     70        validationProp = properties 
    7071    else: 
    7172        properties = readINIPropertyFile(propFilePath, validKeys, 
    7273                                         **iniPropertyFileKw) 
     74        sections = iniPropertyFileKw.get('sections') 
     75        prefix = iniPropertyFileKw.get('prefix') 
     76        if sections is not None: 
     77            for section in sections: 
     78                if prefix is not None: 
     79                    propBranch = properties[section][prefix] 
     80                    validateProperties(propBranch, validKeys) 
     81                else: 
     82                    validateProperties(propBranch, validKeys) 
     83        else: 
     84            validationProp = properties 
    7385 
    7486    # if validKeys set, check that all loaded property values are featured in  
     
    156168            self.cfg.read(propFilePath) 
    157169            if not os.path.isfile(propFilePath): 
    158                 raise ValueError('Error parsing properties file "%s": No such ' 
    159                                  'file' % propFilePath) 
     170                raise IOError('Error parsing properties file "%s": No such ' 
     171                              'file' % propFilePath) 
    160172            
    161173        properties = {} 
     
    182194                properties[section] = _parseConfig(self.cfg,  
    183195                                                   keys,  
    184                                                    section=section) 
     196                                                   section=section, 
     197                                                   prefix=prefix) 
    185198     
    186199        log.debug("Finished reading from INI properties file") 
     
    232245    log.debug("Parsing section: %s" % section) 
    233246 
    234     properties = {} 
     247    propRoot = {} 
    235248    prefixDot = prefix + '.' 
    236249     
     
    251264            continue 
    252265         
    253         # Allow for prefixes - 1st a prefix used for all these parameters 
    254         if prefix and key.startswith(prefixDot): 
    255             key = key.replace(prefixDot, '') 
    256              
     266        # Allow for prefixes - 1st a prefix global to all parameters 
     267        keyLevels = key.split('.') 
     268        if keyLevels[0] == prefix: 
     269            keyLevels = keyLevels[1:] 
     270            if keyLevels == []: 
     271                raise ConfigFileParseError('Expecting "%s.<option>"; got "%s"'% 
     272                                           ((prefix,)*2)) 
     273                 
     274            # Add a sub-section for this prefix 
     275            if prefix not in propRoot: 
     276                propRoot[prefix] = {} 
     277             
     278            propThisBranch = propRoot[prefix] 
     279        else: 
     280            propThisBranch = propRoot 
     281                
    257282        # 2nd - prefixes to denote sections 
    258         splitKey = key.split('.') 
    259         if len(splitKey) > 1: 
    260             # Nb. This allows only one level of nesting 
    261             sectionKey = splitKey[0] 
    262             subKey = ''.join(splitKey[1:]) 
    263             if sectionKey in validKeys: 
    264                 val = _parseVal(cfg, section, key, validKeys[sectionKey], 
     283        if len(keyLevels) > 1: 
     284                 
     285            # Nb. This allows only one level of nesting - subsequent levels if 
     286            # present are represented by a concatenation of the levels joined 
     287            # by underscores 
     288            subSectionKey = keyLevels[0] 
     289            subKey = '_'.join(keyLevels[1:]) 
     290            if subSectionKey in validKeys: 
     291                val = _parseVal(cfg, section, key, validKeys[subSectionKey], 
    265292                                subKey=subKey) 
    266                 if sectionKey in properties: 
    267                     properties[sectionKey][subKey] = val 
     293                if subSectionKey in propThisBranch: 
     294                    propThisBranch[subSectionKey][subKey] = val 
    268295                else: 
    269                     properties[sectionKey] = {subKey: val} 
     296                    propThisBranch[subSectionKey] = {subKey: val} 
    270297        else:  
    271298            # No sub-section present    
    272299            val = _parseVal(cfg, section, key, validKeys) 
    273300         
     301            subKey = keyLevels[0] 
     302             
    274303            # check if key already exists; if so, append to list 
    275             if properties.has_key(key): 
    276                 properties[key] = __listify(properties[key]).extend(val) 
     304            if propThisBranch.has_key(subKey): 
     305                propThisBranch[subKey] = __listify(propThisBranch[subKey]).extend(val) 
    277306            else: 
    278                 properties[key] = val 
     307                propThisBranch[subKey] = val 
    279308 
    280309    log.debug("Finished parsing section") 
    281     return properties 
     310    return propRoot 
    282311 
    283312def _parseVal(cfg, section, option, validKeys, subKey=None): 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/wssecurity/__init__.py

    r4304 r4318  
    132132        """ behaves as data dictionary of WS-Security properties 
    133133        """ 
    134         if key not in self.defParam: 
     134        if key not in WSSecurityConfig.propertyDefaults: 
    135135            raise KeyError("Invalid key '%s'" % key) 
    136136         
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/wssecurity/wssecurity.cfg

    r3722 r4318  
    55# P J Kershaw 01/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.common/setup.cfg

    r4141 r4318  
    66# P J Kershaw 27/10/06 
    77#  
    8 # Copyright (C) 2006 CCLRC & NERC 
     8# Copyright (C) 2006 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/SessionMgr/__init__.py

    r4304 r4318  
    244244    CREDREPOS_KEYNAME = 'credentialRepository' 
    245245    CREDWALLET_KEYNAME = 'credentialWallet' 
    246  
     246    defaultSectionName = 'sessionManager' 
     247     
    247248    authNServicePropertyDefaults = { 
    248249        'modFilePath': None, 
     
    322323        self.readProperties() 
    323324 
    324         # Instantiate the authentication service to use with the session manager 
     325        # Instantiate the authentication service to use with the session  
     326        # manager 
     327        authNModFilePath=self.__prop[self.AUTHN_KEYNAME].get('moduleFilePath') 
    325328        self.__authNService = instantiateClass( 
    326                 self.__prop[self.AUTHN_KEYNAME].get('moduleName'), 
    327                 self.__prop[self.AUTHN_KEYNAME].get('className'), 
    328                 moduleFilePath=self.__prop[self.AUTHN_KEYNAME].get('moduleFilePath'), 
    329                 objectType=AbstractAuthNService,  
    330                 classProperties=self.__prop[self.AUTHN_KEYNAME]) 
     329                            self.__prop[self.AUTHN_KEYNAME].get('moduleName'), 
     330                            self.__prop[self.AUTHN_KEYNAME].get('className'), 
     331                            moduleFilePath=authNModFilePath, 
     332                            objectType=AbstractAuthNService,  
     333                            classProperties=self.__prop[self.AUTHN_KEYNAME]) 
     334         
    331335        # Call here as we can safely expect that all Credential Repository 
    332336        # parameters have been set above 
    333         credentialRepositoryModule = self.__prop[self.CREDREPOS_KEYNAME].get('modName') 
    334         credentialRepositoryClassName = self.__prop[self.CREDREPOS_KEYNAME].get('className') 
    335         if credentialRepositoryModule is None or credentialRepositoryClassName is None: 
     337        credentialRepositoryModule = \ 
     338            self.__prop[self.CREDREPOS_KEYNAME].get('modName') 
     339        credentialRepositoryClassName = \ 
     340            self.__prop[self.CREDREPOS_KEYNAME].get('className') 
     341             
     342        if credentialRepositoryModule is None or \ 
     343           credentialRepositoryClassName is None: 
    336344            self._credentialRepository = NullCredentialRepository() 
    337345        else: 
     
    10091017class AbstractAuthNService: 
    10101018    """ 
    1011     An abstract base class to define the authentication service interface for use 
    1012     with a SessionMgr service 
     1019    An abstract base class to define the authentication service interface for  
     1020    use with a SessionMgr service 
    10131021    """ 
    10141022 
    1015     # valid configuration property keywords 
    1016     __validKeys = ('hostname', 
    1017                    'port', 
    1018                    'serverDN', 
    1019                    'serverCNprefix', 
    1020                    'gridSecurityDir', 
    1021                    'openSSLConfFilePath', 
    1022                    'tmpDir', 
    1023                    'proxyCertMaxLifetime', 
    1024                    'proxyCertLifetime', 
    1025                    'caCertFile') 
    1026  
    1027     def __init__(self, propFilePath=None, **prop): 
    1028         """Make an initial settings for client connections to MyProxy 
     1023    def __init__(self, propertiesFile=None, **prop): 
     1024        """Make any initial settings 
    10291025         
    10301026        Settings are held in a dictionary which can be set from **prop, 
     
    10321028        given by propFilePath 
    10331029         
    1034         @param propFilePath:   set properties via a configuration file 
     1030        @param propertiesFile:   set properties via a configuration file 
    10351031        @param **prop:         set properties via keywords - see __validKeys 
    10361032        class variable for a list of these 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/authnservice/myproxyauthn.py

    r4310 r4318  
    11""" 
    2 MyProxy Client interface - extending the SessionMgr abstractAuthNService  
     2MyProxy Client interface - extending the SessionMgr AbstractAuthNService  
    33interface - to allow use with SessionMgr 
    44 
     
    1414__revision__ = '$Id: $' 
    1515 
    16 from ndg.security.server.SessionMgr import AbstractAutheNService 
     16from ndg.security.server.SessionMgr import AbstractAuthNService 
    1717from ndg.security.common.myproxy import MyProxyClient 
    1818 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/ca/start-container.sh

    r2145 r4318  
    88# @author P J Kershaw 12/02/07 
    99# 
    10 # @copyright (C) 2007 CCLRC & NERC 
     10# @copyright (C) 2007 STFC & NERC 
    1111# 
    1212# @license This software may be distributed under the terms of the Q Public  
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/conf/attAuthority.cfg

    r4139 r4318  
    55# C Byrom 20/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/conf/ca.tac

    r4138 r4318  
    99@author P J Kershaw 23/11/06 
    1010 
    11 @copyright (C) 2007 CCLRC & NERC 
     11@copyright (C) 2007 STFC & NERC 
    1212 
    1313@license This software may be distributed under the terms of the Q Public  
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/conf/sessionMgr.cfg

    r4158 r4318  
    55# P J Kershaw 07/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/wssecurity.cfg

    r3720 r4318  
    55# P J Kershaw 01/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.server/setup.cfg

    r4141 r4318  
    66# P J Kershaw 27/10/06 
    77#  
    8 # Copyright (C) 2007 CCLRC & NERC 
     8# Copyright (C) 2007 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/X509/x509Test.cfg

    r3195 r4318  
    33# P J Kershaw 03/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/XMLSecDoc/xmlSecDocTest.cfg

    r4138 r4318  
    33# P J Kershaw 03/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/attAuthorityClientTest.cfg

    r4246 r4318  
    33# P J Kershaw 16/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/siteAAttAuthority.cfg

    r4245 r4318  
    55# C Byrom 20/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/siteBAttAuthority.cfg

    r4139 r4318  
    55# C Byrom 20/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/site-a.ini

    r4285 r4318  
    66# P J Kershaw 12/09/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/site-b.ini

    r4245 r4318  
    66# P J Kershaw 12/09/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/attCertTest.cfg

    r4138 r4318  
    33# P J Kershaw 03/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/authz/pdp/browse/browse.cfg

    r4138 r4318  
    66# P J Kershaw 09/04/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/authz/pdp/proftp-pdp.cfg

    r3793 r4318  
    66# P J Kershaw 09/04/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/ca/caClientTest.cfg

    r2158 r4318  
    33# P J Kershaw 09/02/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/ca/server.sh

    r2145 r4318  
    77#@author P J Kershaw 09/02/07 
    88#                                                                                 
    9 #@copyright (C) 2007 CCLRC & NERC 
     9#@copyright (C) 2007 STFC & NERC 
    1010#                                                                                 
    1111#@licence: This software may be distributed under the terms of the Q Public  
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/credwallet/credWallet.cfg

    r4304 r4318  
    55# P J Kershaw 03/10/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/credwallet/credWalletTest.cfg

    r4293 r4318  
    33# P J Kershaw 03/10/08 
    44# 
    5 # Copyright (C) 2008 CCLRC & NERC 
     5# Copyright (C) 2008 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
     
    1414# Site B Attribute Authority from the attAuthority unit tests.  This is a site 
    1515# where the user is not registered 
    16 #attributeAuthorityURI=http://localhost:5100/AttributeAuthority 
     16attributeAuthorityURI=http://localhost:5100/AttributeAuthority 
    1717# Test with tcpmon 
    18 attributeAuthorityURI=http://localhost:5099/AttributeAuthority 
     18#attributeAuthorityURI=http://localhost:5099/AttributeAuthority 
    1919userX509CertFilePath=$NDGSEC_CREDWALLET_UNITTEST_DIR/test.crt 
    2020userPriKeyFilePath=$NDGSEC_CREDWALLET_UNITTEST_DIR/test.key 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/myProxy/myProxyClientTest.cfg

    r4138 r4318  
    33# P J Kershaw 13/12/06 
    44# 
    5 # Copyright (C) 2006 CCLRC & NERC 
     5# Copyright (C) 2006 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionCookie/sessionCookieTest.cfg

    r3192 r4318  
    33# P J Kershaw 16/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgr/sessionMgr.cfg

    r4304 r4318  
    55# P J Kershaw 07/10/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
     
    3232# Directory containing CA cert.s to verify SSL peer cert against - ignored if  
    3333# useSSL is blank  
    34 sslCACertDir: $NDGSEC_DIR/conf/certs/ca 
     34sslCACertDir: $NDGSEC_SM_UNITTEST_DIR/ca 
    3535 
    3636# Credential Wallet Settings - global to all user sessions 
     
    6767 
    6868# Name of class in module to instantiate  
    69 credentialRepository.className: NullCredRepos 
     69credentialRepository.className: NullCredentialRepository 
    7070 
    7171# Optional Properties file argument to Credential Repository class.  This is  
     
    7474credentialRepository.propertiesFile: 
    7575 
    76  
    7776# Authentication service properties  
    7877authNService.moduleFilePath:  
    79 authNService.moduleName: ndg.security.server.authenservice.session_mgr_my_proxy_client 
    80 authNService.className: SessionMgrMyProxyClient 
    81 authNService.propertiesFile: 
     78authNService.moduleName: ndg.security.server.authnservice.basicauthn 
     79authNService.className: BasicAuthN 
    8280 
    83 # MyProxy AuthNService Plugin specific settings 
    84 # Delete this element and take setting from MYPROXY_SERVER environment  
    85 # variable if required 
    86 #hostname: localhost 
    87  
    88 #  
    89 # Delete this element to take default setting 7512 or read  
    90 # MYPROXY_SERVER_PORT setting 
    91 authNService.port: 7512 
    92  
    93 # Useful if hostname and certificate CN don't match correctly.  Globus  
    94 # host DN is set to "host/<fqdn: ".  Delete this element and set from  
    95 # MYPROXY_SERVER_DN environment variable if prefered 
    96 authNService.serverDN: 
    97  
    98 # Set "host/" prefix to host cert CN as is default with globus 
    99 authNService.serverCNprefix: host/  
    100   
    101 # This directory path is used to locate the OpenSSL configuration file 
    102 # 
    103 # The settings are used to set up the defaults for the Distinguished Name of 
    104 # the new proxy cert. issued  
    105 #  
    106 # GLOBUS_LOCATION or GRID_SECURITY_DIR environment variables may be used 
    107 # but the settings can be independent of any Globus installation 
    108 authNService.openSSLConfFilePath: $NDGSEC_DIR/conf/openssl.conf 
    109 authNService.tmpDir: /tmp 
    110  
    111 # Limit on maximum lifetime (in seconds) any proxy certificate can have -  
    112 # specified when a certificate is first created by store() method 
    113 authNService.proxyCertMaxLifetime: 43200 
    114  
    115 # Life time of a proxy certificate (seconds) when issued from the Proxy Server  
    116 # with ndg.security.server.MyProxy.getDelegation() method 
    117 authNService.proxyCertLifetime: 43200 
    118   
    119 # CA certificate applied to verify peer certificate against in 
    120 # SSL connection to MyProxy server 
    121 authNService.caCertFile: $NDGSEC_DIR/conf/certs/cacert.pem 
     81# Specific settings for BasicAuthN Session Manager authentication plugin 
     82authNService.basicAuthN.accounts: testuser:776767df1f96e3b773eceffad55c61eae53ea31fef3563732046a7a6 ndg-user:d63dc919e201d7bc4c825630d2cf25fdc93d4b2f0d46706d29038d01 
    12283 
    12384# 
     
    12990# The CA certificates of other NDG trusted sites should go here.  NB, multiple 
    13091# values should be delimited by a space 
    131 wssecurity.caCertFilePathList: $NDGSEC_DIR/conf/certs/ca/cacert.pem   
     92wssecurity.caCertFilePathList: $NDGSEC_SM_UNITTEST_DIR/ca/ndg-test-ca.crt 
    13293 
    13394# Signature of an outbound message 
     
    139100 
    140101# PEM encoded cert 
    141 wssecurity.signingCertFilePath: $NDGSEC_DIR/conf/certs/sm-cert.pem 
     102wssecurity.signingCertFilePath: $NDGSEC_SM_UNITTEST_DIR/sm.crt 
    142103 
    143104# ... or provide file path to PEM encoded private key file 
    144 wssecurity.signingPriKeyFilePath: $NDGSEC_DIR/conf/certs/sm-key.pem 
     105wssecurity.signingPriKeyFilePath: $NDGSEC_SM_UNITTEST_DIR/sm.key 
    145106 
    146107# Password protecting private key.  Leave blank if there is no password. 
    147108wssecurity.signingPriKeyPwd= 
    148  
    149 # Provide a space separated list of file paths 
    150 wssecurity.caCertFilePathList: $NDGSEC_DIR/conf/certs/ca/cacert.pem 
    151109 
    152110# Set the ValueType for the BinarySecurityToken added to the WSSE header for a 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgr/sessionMgrTest.cfg

    r4304 r4318  
    33# P J Kershaw 12/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgr/test_sessionMgr.py

    r4304 r4318  
    5959        # Omit traceFile keyword to leave out SOAP debug info 
    6060        self.propFilePath = xpdVars(self.cfg.get('setUp', 'propFilePath')) 
    61 #        self.sm = SessionMgr(propFilePath=propFilePath) 
     61        self.sm = SessionMgr(propFilePath=self.propFilePath) 
    6262 
    6363    def test0Init(self): 
    64         sm = SessionMgr(propFilePath=self.propFilePath) 
     64        pass 
    6565         
    6666    def _sessionMgrConnect(self): 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgrClient/sessionMgr.cfg

    r4158 r4318  
    55# P J Kershaw 07/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgrClient/sessionMgrClientTest.cfg

    r4138 r4318  
    33# P J Kershaw 12/01/07 
    44# 
    5 # Copyright (C) 2007 CCLRC & NERC 
     5# Copyright (C) 2007 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgrClient/wsgi/session-manager.ini

    r4279 r4318  
    66# P J Kershaw 01/10/08 
    77#  
    8 # Copyright (C) 2008 CCLRC & NERC 
     8# Copyright (C) 2008 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/utils/attAuthority.cfg

    r4139 r4318  
    55# C Byrom 20/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/utils/invalidAttAuthorityProperties.xml

    r4139 r4318  
    55# C Byrom 20/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/utils/sessionMgr.cfg

    r4158 r4318  
    55# P J Kershaw 07/08/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/client/echoClientTest.cfg

    r4096 r4318  
    33# P J Kershaw 13/12/06 
    44# 
    5 # Copyright (C) 2006 CCLRC & NERC 
     5# Copyright (C) 2006 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/echoServer.cfg

    r4238 r4318  
    33# P J Kershaw 13/12/06 
    44# 
    5 # Copyright (C) 2006 CCLRC & NERC 
     5# Copyright (C) 2006 STFC & NERC 
    66#  
    77# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/wssecurity.cfg

    r4238 r4318  
    55# P J Kershaw 01/04/08 
    66#  
    7 # Copyright (C) 2008 CCLRC & NERC 
     7# Copyright (C) 2008 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndg.security.test/setup.cfg

    r4141 r4318  
    55# P J Kershaw 15/03/06 
    66#  
    7 # Copyright (C) 2007 CCLRC & NERC 
     7# Copyright (C) 2007 STFC & NERC 
    88#  
    99# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/ndgSetup.sh

    r2181 r4318  
    1010# P J Kershaw 21/10/05 
    1111# 
    12 # Copyright (C) 2005 CCLRC & NERC 
     12# Copyright (C) 2005 STFC & NERC 
    1313# 
    1414# This software may be distributed under the terms of the Q Public License, 
  • TI12-security/trunk/python/setup.cfg

    r4141 r4318  
    66# P J Kershaw 27/10/06 
    77#  
    8 # Copyright (C) 2006 CCLRC & NERC 
     8# Copyright (C) 2006 STFC & NERC 
    99#  
    1010# This software may be distributed under the terms of the Q Public License, 
Note: See TracChangeset for help on using the changeset viewer.