Ignore:
Timestamp:
20/08/08 14:03:20 (12 years ago)
Author:
cbyrom
Message:

General refactoring and updating of code, including:

Removal of refC14nKw and singnedInfoC14nKw keywords in wsssecurity session manager config
(the refC14nInclNS and signedInfoC14nInclNS keywords are sufficient);
Creation of new DOM signature handler class, dom.py, based on the wsSecurity
class;
Abstraction of common code between dom.py and etree.py into new parent
class, BaseSignatureHandler?.py.
Fixing and extending use of properties in the SignatureHandler? code.
Fixing a few bugs with the original SignatureHandler? code.
Updating of test cases to new code/code structure.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/AttAuthorityClientTest.py

    r3652 r4129  
    2020from ndg.security.common.AttCert import AttCertRead 
    2121from ndg.security.common.X509 import X509CertParse, X509CertRead 
    22 from ndg.security.common.wsSecurity import SignatureHandler as SigHdlr 
     22from ndg.security.common.wssecurity.dom import SignatureHandler as SigHdlr 
    2323 
    2424from os.path import expandvars as xpdVars 
     
    109109        # Inclusive namespace prefixes for Exclusive C14N 
    110110        try: 
    111             refC14nKw = {'unsuppressedPrefixes': 
    112                          self.cfg['setUp']['wssrefinclns'].split()}            
     111            refC14nInclNS = self.cfg['setUp']['wssrefinclns'].split()            
    113112        except KeyError: 
    114             refC14nKw = {'unsuppressedPrefixes':[]} 
    115  
    116         try: 
    117             signedInfoC14nKw = {'unsuppressedPrefixes': 
    118                             self.cfg['setUp']['wsssignedinfoinclns'].split()}           
     113            refC14nInclNS = [] 
     114 
     115        try: 
     116            signedInfoC14nInclNS = self.cfg['setUp']['wsssignedinfoinclns'].split()           
    119117        except KeyError: 
    120             signedInfoC14nKw = {'unsuppressedPrefixes':[]} 
     118            signedInfoC14nInclNS = [] 
    121119                 
    122120        setSignatureHandler = eval(self.cfg['setUp']['setsignaturehandler']) 
     
    133131                        signingPriKeyPwd=self.clntPriKeyPwd, 
    134132                        caCertFilePathList=caCertFilePathList, 
    135                         refC14nKw=refC14nKw, 
    136                         signedInfoC14nKw=signedInfoC14nKw, 
     133                        refC14nInclNS=refC14nInclNS, 
     134                        signedInfoC14nInclNS=signedInfoC14nInclNS, 
    137135                        tracefile=sys.stderr) 
    138136             
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/README

    r4128 r4129  
    33The test client connects to two different test Attribute Authorities 
    44corresponding to the fictitious Service Providers Site "A" and Site "B".  Each 
    5 has it's own respective properties file.  The services require access to specific 
     5has its own respective properties file.  The services require access to specific 
    66security settings so the following should be done, if not running as root: 
    77 
    88i) Set the NDGSEC_DIR environment variable set to a local dir 
    99ii) Copy /ndg/security/server/conf and /ndg/security/server/logs directories to this dir 
    10 iii) Set the NDGSEC_AA_PROPFILEPATH environment variable to the dir with the server config 
    11 file - i.e. siteAAttAuthorityProperties.xml 
     10iii) Set the NDGSEC_AA_PROPFILEPATH environment variable to the file with the server config 
     11 - i.e. siteAAttAuthorityProperties.xml (the same env var should be used for the siteB config file) 
    1212 
    1313These services must be started before 
     
    2929the services - i.e. use: 
    3030 
    31 export $no_proxy=localhost:5100,localhost:5000,localhost:4900  
     31export no_proxy=localhost:5100,localhost:5000,localhost:4900  
    3232 
    3333Run the unit tests script AttAuthorityClientTest.py from another terminal: 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgrClient/SessionMgrClientTest.py

    r4120 r4129  
    2323     
    2424from ndg.security.common.X509 import X509CertParse, X509CertRead 
    25 from ndg.security.common.wsSecurity import SignatureHandler as SigHdlr 
     25from ndg.security.common.wssecurity.dom import SignatureHandler as SigHdlr 
    2626 
    2727from os.path import expandvars as xpdVars 
     
    113113        # Inclusive namespace prefixes for Exclusive C14N 
    114114        try: 
    115             refC14nKw = {'unsuppressedPrefixes': 
    116                          self.cfg['setUp']['wssrefinclns'].split()}            
     115            refC14nInclNS = self.cfg['setUp']['wssrefinclns'].split()            
    117116        except KeyError: 
    118             refC14nKw = {'unsuppressedPrefixes':[]} 
    119  
    120         try: 
    121             signedInfoC14nKw = {'unsuppressedPrefixes': 
    122                             self.cfg['setUp']['wsssignedinfoinclns'].split()}           
     117            refC14nInclNS = [] 
     118 
     119        try: 
     120            signedInfoC14nInclNS = self.cfg['setUp']['wsssignedinfoinclns'].split()           
    123121        except KeyError: 
    124             signedInfoC14nKw = {'unsuppressedPrefixes':[]} 
     122            signedInfoC14nInclNS = [] 
    125123                 
    126124        setSignatureHandler = eval(self.cfg['setUp']['setsignaturehandler']) 
     
    138136                        signingPriKeyPwd=clntPriKeyPwd, 
    139137                        caCertFilePathList=caCertFilePathList, 
    140                         refC14nKw=refC14nKw, 
    141                         signedInfoC14nKw=signedInfoC14nKw, 
     138                        refC14nInclNS=refC14nInclNS, 
     139                        signedInfoC14nInclNS=signedInfoC14nInclNS, 
    142140                        tracefile=sys.stderr)  
    143141         
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/client/echoClientTest.py

    r4075 r4129  
    1313 
    1414from ConfigParser import SafeConfigParser 
    15 from ndg.security.common import wsSecurity 
     15from ndg.security.common.wssecurity.dom import SignatureHandler 
    1616 
    1717from os.path import expandvars as xpdVars 
     
    4747         
    4848        # Signature handler object is passed to binding 
    49         sigHandler = wsSecurity.SignatureHandler( 
     49        sigHandler = SignatureHandler( 
    5050                                 signingPriKeyFilePath=signingPriKeyFilePath, 
    5151                                 signingPriKeyPwd=signingPriKeyPwd, 
    5252                                 signingCertFilePath=signingCertFilePath, 
    5353                                 caCertFilePathList=caCertFilePathList, 
    54                                  refC14nKw={'unsuppressedPrefixes':[]}, 
    55                                  signedInfoC14nKw={'unsuppressedPrefixes':[]}) 
     54                                 refC14nInclNS=[], 
     55                                 signedInfoC14nInclNS=[]) 
    5656 
    5757        locator = EchoServiceLocator() 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/echoServer.py

    r4096 r4129  
    1515    EchoService as _EchoService 
    1616 
    17 from ndg.security.common import wsSecurity 
     17from ndg.security.common.wssecurity.dom import SignatureHandler 
    1818 
    1919from os.path import expandvars as xpdVars 
     
    105105    # Create the Inherited version of the server 
    106106    echo = EchoService() 
    107     echo.signatureHandler = wsSecurity.SignatureHandler(cfg=wsseCfgFilePath) 
     107    echo.signatureHandler = SignatureHandler(cfg=wsseCfgFilePath) 
    108108 
    109109    serviceContainer.setNode(echo, url=path) 
Note: See TracChangeset for help on using the changeset viewer.