Changeset 4238 for TI12-security/trunk


Ignore:
Timestamp:
26/09/08 10:51:13 (11 years ago)
Author:
pjkersha
Message:

Working unit tests for WSGI based Attribute Authority. TODO:

  • test with Attribute Authority properties picked up from ini file instead of XML properties file (code supports both methods)
  • refactor unit test config to use standard WS-Security config section
Location:
TI12-security/trunk/python
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/wssecurity.py

    r4233 r4238  
    11"""WSGI Middleware for WS-Security 
    22 
    3 Currently implements Digital Signature handling based around ZSI 
     3Implements Digital Signature handling based around ZSI 
    44 
    55NERC Data Grid Project""" 
     
    2727class WSSecurityFilterConfigError(WSSecurityFilterError): 
    2828    """WS-Security Filter Config Error""" 
    29      
     29  
    3030class WSSecurityFilter(SOAPMiddleware): 
    3131    """Base class for WS-Security filters 
     
    4444        wsseCfgFilePath = self.app_conf.get('wsseCfgFilePath')         
    4545        wsseCfgFileSection = self.app_conf.get('wsseCfgFileSection') 
    46         wsseCfg = app_conf.copy() 
    47         wsseCfg.update(kw) 
    4846         
    4947        self.signatureHandler = SignatureHandler(cfg=wsseCfgFilePath, 
    50                                             cfgFileSection=wsseCfgFileSection, 
    51                                             **wsseCfg) 
     48                                            cfgFileSection=wsseCfgFileSection) 
    5249            
    5350     
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/attAuthorityClientTest.cfg

    r4138 r4238  
    128128cacertfilepathlist = $NDGSEC_AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt 
    129129 
    130 uri = http://localhost:5100/AttributeAuthority 
    131 # Heath Data Server 
    132 #uri = http://glue.badc.rl.ac.uk/DEWS/HealthDataServer/AttributeAuthority 
    133 # Marine Data Server 
    134 #uri = http://glue.badc.rl.ac.uk/DEWS/MarineDataServer/AttributeAuthority 
     130uri = http://localhost:5050/AttributeAuthority 
    135131userAttCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml 
    136132 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/site-a.ini

    r4233 r4238  
    1313[DEFAULT] 
    1414#wsseCfgFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/wssecurity.cfg 
     15wsseCfgFilePath = %(here)s/site-a.ini 
    1516wsseCfgFileSection = WS-Security 
    1617 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/echoServer.cfg

    r4096 r4238  
    99[setUp] 
    1010hostname = localhost 
    11 port = 7100 
     11port = 7000 
    1212path = /Echo 
    1313wsseCfgFilePath = $NDGSEC_WSSESRV_UNITTEST_DIR/wssecurity.cfg 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/wssecurity.cfg

    r4096 r4238  
    2828 
    2929# ... or provide file path PEM encode cert here 
    30 signingCertFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/server.crt 
     30#signingCertFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/server.crt 
     31signingCertFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/java-ca-server.crt 
    3132 
    3233# Pass a list of certificates ',' separated PEM encoded certs constituting a  
     
    4041 
    4142# ... or provide file path to PEM encoded private key file 
    42 signingPriKeyFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/server.key 
     43#signingPriKeyFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/server.key 
     44signingPriKeyFilePath=$NDGSEC_WSSESRV_UNITTEST_DIR/java-ca-server.key 
    4345 
    4446# Password protecting private key.  Leave blank if there is no password. 
     
    9395# Provide a space separated list of file paths 
    9496# - NB, the two CA certificates are for the python and the java clients, respectively 
    95 caCertFilePathList=$NDGSEC_WSSESRV_UNITTEST_DIR/ndg-test-ca.crt $NDGSEC_WSSESRV_UNITTEST_DIR/cacert.pem 
     97caCertFilePathList=$NDGSEC_WSSESRV_UNITTEST_DIR/java-ca.crt $NDGSEC_WSSESRV_UNITTEST_DIR/ndg-test-ca.crt $NDGSEC_WSSESRV_UNITTEST_DIR/cacert.pem 
Note: See TracChangeset for help on using the changeset viewer.