Ignore:
Timestamp:
24/09/08 16:25:09 (12 years ago)
Author:
pjkersha
Message:

More work on WSGI version of Attribute Authority unit tests. TODO: complete code to enable WS-Security config to be picked up from within the Paste ini file.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/site-a.ini

    r4195 r4233  
    1212 
    1313[DEFAULT] 
    14 wsseCfgFilePath = ./wssecurity.cfg 
     14#wsseCfgFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/wssecurity.cfg 
     15wsseCfgFileSection = WS-Security 
    1516 
    1617[server:main] 
     
    4445writeResponse = True 
    4546 
     47 
     48[WS-Security] 
     49# 
     50# OUTBOUND MESSAGE CONFIG 
     51 
     52# Signature of an outbound message 
     53 
     54# Certificate associated with private key used to sign a message.  The sign  
     55# method will add this to the BinarySecurityToken element of the WSSE header.   
     56signingCertFilePath=$NDGSEC_AACLNT_UNITTEST_DIR/siteA-aa.crt 
     57 
     58# PEM encoded private key file 
     59signingPriKeyFilePath=$NDGSEC_AACLNT_UNITTEST_DIR/siteA-aa.key 
     60 
     61# Set the ValueType for the BinarySecurityToken added to the WSSE header for a 
     62# signed message.  See __setReqBinSecTokValType method and binSecTokValType  
     63# class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or  
     64# give full namespace to alternative - see  
     65# ZSI.wstools.Namespaces.OASIS.X509TOKEN 
     66# 
     67# binSecTokValType determines whether signingCert or signingCertChain  
     68# attributes will be used. 
     69reqBinSecTokValType=X509v3 
     70 
     71# Add a timestamp element to an outbound message 
     72addTimestamp=True 
     73 
     74# For WSSE 1.1 - service returns signature confirmation containing signature  
     75# value sent by client 
     76applySignatureConfirmation=False 
     77 
     78# 
     79# INBOUND MESSAGE CONFIG 
     80 
     81# Provide a space separated list of file paths 
     82caCertFilePathList=$NDGSEC_AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt 
     83 
    4684# Logging configuration 
    4785[loggers] 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attAuthority/wsgi/siteAServerApp.py

    r4195 r4233  
    11#!/usr/bin/env python 
     2"""NDG Security Attribute Authority test harness for unit test site 'A' 
     3 
     4NERC Data Grid Project 
     5 
     6This software may be distributed under the terms of the Q Public License, 
     7version 1.0 or later. 
     8""" 
     9__author__ = "P J Kershaw" 
     10__date__ = "24/09/08" 
     11__copyright__ = "(C) 2008 STFC & NERC" 
     12__contact__ = "P.J.Kershaw@rl.ac.uk" 
     13__revision__ = "$Id$" 
    214import os 
    315 
     
    2032#                                     "siteAAttAuthority.cfg") 
    2133                                     "siteAAttAuthorityProperties.xml") 
    22     
    23 if 'NDGSEC_DIR' in os.environ: 
    24     tacFilePath=os.path.join(os.environ['NDGSEC_DIR'], 
    25                              "conf", 
    26                              "attAuthority.tac") 
    27 else: 
    28     import pkg_resources 
    29     eggConfigDir=pkg_resources.resource_filename('ndg.security.server','conf') 
    30     os.environ['NDGSEC_DIR'] = os.path.dirname(eggConfigDir) 
    3134 
    3235# To start the Site A Attribute Authority run  
     
    3538if __name__ == '__main__': 
    3639    import sys 
    37     if len(sys.argv) > 0: 
     40    if len(sys.argv) > 1: 
    3841        port = int(sys.argv[1]) 
    3942    else: 
     
    4144         
    4245    cfgFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
    43                                 'site-a.ini') 
     46                               'site-a.ini') 
    4447         
    4548    from paste.httpserver import serve 
Note: See TracChangeset for help on using the changeset viewer.