Changeset 5290
- Timestamp:
- 14/05/09 16:42:36 (12 years ago)
- Location:
- TI12-security/trunk/python
- Files:
-
- 3 added
- 52 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/__init__.py
r5280 r5290 125 125 [('Content-type', contentType), 126 126 ('Content-Length', str(len(response)))]) 127 return response127 return [response] 128 128 129 129 @staticmethod -
TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/authn.py
r5285 r5290 119 119 120 120 else: 121 # Retrieve OpenID response parameters and set a Forbidden response122 # t o trigger the PEP to check to see if the requested URI is a123 # secured one124 125 def set403Response(status, header, exc_info=None): 126 return start_response(self.getStatusMessage(403),127 header, 128 exc_info) 129 130 return self._ app(environ, set403Response)121 # Set a Forbidden response to trigger the PEP to check to see if 122 # the requested URI is a secured one 123 124 # def set403Response(status, header, exc_info=None): 125 # return start_response(self.getStatusMessage(403), 126 # header, 127 # exc_info) 128 # 129 # return self._app(environ, set403Response) 130 return self._setErrorResponse(code=403) 131 131 132 132 def _setRedirectURI(self, uri): -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/__init__.py
r4840 r5290 1 """NDG Security Unittest package1 """NDG Security test package 2 2 3 3 NERC Data Grid Project … … 9 9 __contact__ = "Philip.Kershaw@stfc.ac.uk" 10 10 __revision__ = '$Id$' 11 12 import unittest13 import logging14 logging.basicConfig()15 16 import os17 from os.path import expandvars as xpdVars18 from os.path import join as jnPath19 20 21 class BaseTestCase(unittest.TestCase):22 '''Convenience base class from which other unit tests can extend. Its23 sets the generic data directory path'''24 configDirEnvVarName = 'NDGSEC_UNITTEST_CONFIG_DIR'25 26 def setUp(self):27 if BaseTestCase.configDirEnvVarName not in os.environ:28 os.environ[BaseTestCase.configDirEnvVarName] = \29 os.path.join(os.path.abspath(os.path.dirname(__file__)),30 'config')31 32 mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.configDirEnvVarName],33 file)34 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/README
r4692 r5290 1 This folder contains data used for the unit tests. 1 This folder contains data and services used for the unit and integration 2 tests. 3 - attributeauthority/ - two attribute authority test services: 4 sitea/ 5 siteb/ 2 6 - pki/ - X.509 certificates and private keys used to secure services 3 7 ca/ - CA certificates 8 - sessionmanager/ - Session Manager test service 4 9 5 10 P J Kershaw 19/12/08 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/sitea/site-a.ini
r4777 r5290 50 50 attributeAuthority.signingPriKeyFilePath: %(here)s/siteA-aa.key 51 51 attributeAuthority.signingCertFilePath: %(here)s/siteA-aa.crt 52 attributeAuthority.caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt52 attributeAuthority.caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 53 53 54 54 [server:main] … … 132 132 133 133 # Provide a space separated list of file paths 134 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt135 #caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_UNITTEST_CONFIG_DIR/ca/java-ca.crt134 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 135 #caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/java-ca.crt 136 136 137 137 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/sitea/siteAAttributeAuthority.cfg
r4777 r5290 35 35 signingPriKeyFilePath: %(here)s/siteA-aa.key 36 36 signingCertFilePath: %(here)s/siteA-aa.crt 37 caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt37 caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 38 38 39 39 # Location of role mapping file -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/sitea/siteAServerApp.py
r4855 r5290 20 20 return infoApp 21 21 22 from ndg.security.test import BaseTestCase22 from ndg.security.test.unit import BaseTestCase 23 23 24 24 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/siteb/site-b.ini
r4777 r5290 50 50 attributeAuthority.signingPriKeyFilePath: %(here)s/siteB-aa.key 51 51 attributeAuthority.signingCertFilePath: %(here)s/siteB-aa.crt 52 attributeAuthority.caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt52 attributeAuthority.caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 53 53 54 54 [server:main] … … 128 128 129 129 # Provide a space separated list of file paths 130 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt130 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 131 131 132 132 # Logging configuration -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/siteb/siteBAttAuthority.cfg
r4777 r5290 31 31 signingPriKeyFilePath: %(here)s/siteB-aa.key 32 32 signingCertFilePath: %(here)s/siteB-aa.crt 33 caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt33 caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 34 34 35 35 # Location of role mapping file … … 53 53 # The CA certificates of other NDG trusted sites should go here. NB, multiple 54 54 # values should be delimited by a space 55 caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_UNITTEST_CONFIG_DIR/ca/cacert.pem55 caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/cacert.pem 56 56 57 57 # Signature of an outbound message -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/attributeauthority/siteb/siteBServerApp.py
r4855 r5290 20 20 return infoApp 21 21 22 from ndg.security.test import BaseTestCase22 from ndg.security.test.unit import BaseTestCase 23 23 24 24 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/sessionmanager/session-manager.ini
r4777 r5290 32 32 # Directory containing CA cert.s to verify SSL peer cert against - ignored if 33 33 # useSSL is blank 34 #sessionManager.sslCACertDir: $NDGSEC_ UNITTEST_CONFIG_DIR/ca34 #sessionManager.sslCACertDir: $NDGSEC_TEST_CONFIG_DIR/ca 35 35 36 36 # Credential Wallet Settings - global to all user sessions 37 37 # 38 38 # CA certificates for Attribute Certificate signature validation 39 sessionManager.credentialWallet.caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt39 sessionManager.credentialWallet.caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 40 40 41 41 # CA certificates for SSL connection peer cert. validation - required if 42 42 # connecting to an Attribute Authority over SSL 43 sessionManager.credentialWallet.sslCACertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt43 sessionManager.credentialWallet.sslCACertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 44 44 45 45 # Allow Get Attribute Certificate calls to try to get a mapped certificate … … 70 70 # The CA certificates of other NDG trusted sites should go here. NB, multiple 71 71 # values should be delimited by a space 72 sessionManager.credentialWallet.wssecurity.caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt72 sessionManager.credentialWallet.wssecurity.caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 73 73 74 74 # Signature of an outbound message … … 105 105 # Specific settings for UserCertAuthN Session Manager authentication plugin 106 106 # This sets up PKI credentials for a single test account 107 sessionManager.authNService.userX509CertFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt108 sessionManager.authNService.userPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.key107 sessionManager.authNService.userX509CertFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 108 sessionManager.authNService.userPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/user.key 109 109 sessionManager.authNService.userPriKeyPwd: testpassword 110 110 … … 195 195 196 196 # Provide a space separated list of file paths 197 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt198 #caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_UNITTEST_CONFIG_DIR/ca/java-ca.crt197 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 198 #caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/java-ca.crt 199 199 200 200 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/config/sessionmanager/sessionManagerServerApp.py
r4855 r5290 20 20 return infoApp 21 21 22 from ndg.security.test import BaseTestCase22 from ndg.security.test.unit import BaseTestCase 23 23 24 24 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/combinedservices/serverapp.py
r5181 r5290 168 168 169 169 170 from ndg.security.test import BaseTestCase170 from ndg.security.test.unit import BaseTestCase 171 171 172 172 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/combinedservices/singlesignonservice/sso.cfg
r4909 r5290 35 35 # must verify against at least one of these otherwise the connection is 36 36 # dropped. 37 sslCACertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt37 sslCACertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 38 38 39 39 # Web Services HTTP Proxy fine tuning … … 77 77 78 78 # file path PEM encoded cert 79 signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt79 signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.crt 80 80 81 81 # file path to PEM encoded private key file 82 signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.key82 signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.key 83 83 84 84 # Password protecting private key. Leave blank if there is no password. … … 93 93 # Provide a space separated list of file paths. CA Certs should be included 94 94 # for all the sites this installation trusts 95 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt95 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 96 96 97 97 # Set the ValueType for the BinarySecurityToken added to the WSSE header for a -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/combinedservices/test_combinedservices.cfg
r4770 r5290 22 22 # For https only - List of CA certificates to enable this client to verify 23 23 # the server's SSL X.509 certificate 24 sslCACertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt24 sslCACertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 25 25 26 26 [test01Connect] … … 83 83 # Certificate associated with private key used to sign a message. The sign 84 84 # method will add this to the BinarySecurityToken element of the WSSE header. 85 signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt85 signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/test.crt 86 86 87 87 # PEM encoded private key file 88 signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key88 signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/test.key 89 89 90 90 # Set the ValueType for the BinarySecurityToken added to the WSSE header for a … … 109 109 110 110 # Provide a space separated list of file paths 111 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt111 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/combinedservices/test_combinedservices.py
r5063 r5290 32 32 AttributeRequestDenied 33 33 34 from ndg.security.test import BaseTestCase34 from ndg.security.test.unit import BaseTestCase 35 35 from ndg.security.common.X509 import X509CertParse, X509CertRead 36 36 from ndg.security.common.wssecurity.signaturehandler.dom import SignatureHandler as SigHdlr -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/__init__.py
r5285 r5290 1 """NDG Security unit test package 2 3 NERC Data Grid Project 4 """ 5 __author__ = "P J Kershaw" 6 __date__ = "14/05/09" 7 __copyright__ = "(C) 2009 Science and Technology Facilities Council" 8 __license__ = "BSD - see LICENSE file in top-level directory" 9 __contact__ = "Philip.Kershaw@stfc.ac.uk" 10 __revision__ = '$Id: __init__.py 4840 2009-01-19 13:59:08Z pjkersha $' 11 12 import unittest 13 import logging 14 logging.basicConfig() 15 16 import os 17 from os.path import expandvars, join, dirname, abspath 18 19 20 class BaseTestCase(unittest.TestCase): 21 '''Convenience base class from which other unit tests can extend. Its 22 sets the generic data directory path''' 23 configDirEnvVarName = 'NDGSEC_TEST_CONFIG_DIR' 24 25 def setUp(self): 26 if BaseTestCase.configDirEnvVarName not in os.environ: 27 os.environ[BaseTestCase.configDirEnvVarName] = \ 28 join(abspath(dirname(dirname(__file__))), 'config') 29 30 mkDataDirPath = lambda file:join(os.environ[BaseTestCase.configDirEnvVarName], 31 file) 32 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attCert/AttCertTest.py
r4840 r5290 19 19 from ConfigParser import SafeConfigParser 20 20 from ndg.security.common.AttCert import AttCert 21 from ndg.security.test import BaseTestCase21 from ndg.security.test.unit import BaseTestCase 22 22 23 23 xpdVars = os.path.expandvars -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attCert/ac.xml
r4739 r5290 9 9 <userId>/O=NDG/OU=BADC/CN=pjkershaw</userId> 10 10 <validity> 11 <notBefore>2009 0 1 05 13 58 26</notBefore>12 <notAfter>2009 0 1 05 21 58 26</notAfter>11 <notBefore>2009 05 14 11 18 00</notBefore> 12 <notAfter>2009 05 14 19 18 00</notAfter> 13 13 </validity> 14 14 <attributes> … … 27 27 <provenance>original</provenance> 28 28 </acInfo> 29 <ds:Signature><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="ds"></ec:InclusiveNamespaces></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="xmlns"></ec:InclusiveNamespaces></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue> 5YtRRY+NdjH4yZo6ZuNC0eca6ZM=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>iHrz8Tu5mSW3K0gV8yiswTrDHZZVUVuGvUG/pPDCceEHXgmohhWKJZ43LNiVF9gSnSxoh+kIXyMK30 FaIqqgtHG52fiVZFA8XqWc/ucBpGrQJpNQRruaLCJElEv01F0ltQ+f+d+KRP2Keg1EEJf30NNgLR 31 LIM4WV+8OyL2o1hOjDdeFfxZa/B2AvkRingybqIO100p7hkY2lyhJPwSR3GIbc57Lnw+e1Y6gKgp 32 tV+0eAKtvXp3NTlXv1pXNi7FalRyHGCOXYZymVGR52dPsbFjRrxwgf8CARcd4T7nO2RGwu9Ba/U1 33 wLQ1e/daMeIdz3ZHAX4eVVmTmb3J6KUswORGVA==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAQEwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH29 <ds:Signature><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="ds"></ec:InclusiveNamespaces></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="xmlns"></ec:InclusiveNamespaces></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>sPx/VQ+W/6ImQpzpVyqNN4SRi94=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>lvYk1Pjb7lDkkkZBrF8PhlT5krZWReU1l6X1vjDUPPkthV2ASVwj3NHCLJIFwrp3PCD8TLUERbhN 30 7MBO/IhQ9AM2qHZDScc+QxJ1iCdXgIGiV5Bb98Gyex3ZxBE+Kj7HlD2NCwzLswKUTEHfdstMlWWI 31 FuDlalmEJ2pyGdyi+DaA7b1g2rUxapJneqvH94SNQCaS7RqiThy5JyI/u43cMeZXgxCeGzDUZmWo 32 UQb4jbLe+oQn7PhYV15jf3MwksLqfiLYO9iyjKZhfXQpn+mOW5dY3+00NTb5v6wup+f3l7uGNHkU 33 U+AfrdIAp52UPM15kWd9aYjQQgdwDegzAz/mBA==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAQEwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH 34 34 MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA4MTIxNjE1MTE0 35 35 OFoXDTEzMTIxNTE1MTE0OFowLDEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attCert/attCertTest.cfg
r4770 r5290 10 10 11 11 [test9Sign] 12 signingCertFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt13 signingPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key12 signingCertFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.crt 13 signingPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.key 14 14 filePath: $NDGSEC_ATTCERT_UNITTEST_DIR/ac-signed.xml 15 15 signingPriKeyPwd: … … 22 22 23 23 [test12IsValid] 24 certFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt24 certFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 25 25 26 26 [test13IsValidStressTest] 27 27 # First cert is added to the signature, both certs are used in the 28 28 # verification 29 certFilepathlist: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt30 signingPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key29 certFilepathlist: $NDGSEC_TEST_CONFIG_DIR/pki/test.crt $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 30 signingPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.key 31 31 signingPriKeyPwd: 32 32 nruns: 10 33 33 34 34 [test14IsValidSignature] 35 certFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt35 certFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 36 36 filePath: $NDGSEC_ATTCERT_UNITTEST_DIR/ac.xml 37 37 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attributeauthority/test_attributeauthority.cfg
r4770 r5290 9 9 10 10 [DEFAULT] 11 siteBPropFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/attributeauthority/siteb/siteBAttAuthority.cfg11 siteBPropFilePath=$NDGSEC_TEST_CONFIG_DIR/attributeauthority/siteb/siteBAttAuthority.cfg 12 12 13 13 [setUp] 14 14 # ! SiteBMapConfig.xml trusted site A aaURI setting must agree with this 15 15 # setting for test6GetMappedAttCert 16 propFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg16 propFilePath=$NDGSEC_TEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg 17 17 18 18 # For https connections only. !Omit ssl* settings if using http! … … 20 20 # same as peer hostname. 21 21 sslPeerCertCN = AttributeAuthority 22 sslCACertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt22 sslCACertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 23 23 24 24 [test02GetTrustedHostInfo] 25 role = postgrad25 role = urn:siteA:security:authz:1.0:attr:postgrad 26 26 27 27 [test03GetTrustedHostInfoWithNoMatchingRoleFound] … … 30 30 31 31 [test05GetAttCert] 32 issuingClntCertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt32 issuingClntCertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 33 33 34 34 # Setup for use by test08GetMappedAttCert test … … 40 40 41 41 [test07GetMappedAttCert] 42 issuingClntCertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt42 issuingClntCertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 43 43 userAttCertFilePath = $NDGSEC_AA_UNITTEST_DIR/ac-clnt.xml 44 44 mappedAttCertFilePath = $NDGSEC_AA_UNITTEST_DIR/mapped-ac.xml 45 45 46 46 [test08GetMappedAttCertStressTest] 47 issuingClntCertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt47 issuingClntCertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 48 48 userAttCertFilePathList = $NDGSEC_AA_UNITTEST_DIR/ac-clnt.xml -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attributeauthority/test_attributeauthority.py
r4840 r5290 23 23 mkPath = lambda file:jnPath(os.environ['NDGSEC_AA_UNITTEST_DIR'], file) 24 24 25 from ndg.security.test import BaseTestCase25 from ndg.security.test.unit import BaseTestCase 26 26 27 27 from ndg.security.common.utils.configfileparsers import \ … … 56 56 57 57 self.aa = AttributeAuthority( 58 58 propFilePath=self.cfg['setUp']['propFilePath']) 59 59 60 60 _mkSiteBAttributeAuthority = lambda self: AttributeAuthority(\ … … 83 83 where the input role doesn't match any roles in the target AA's map 84 84 config file""" 85 thisSection=self.cfg['test03GetTrustedHostInfoWithNoMatchingRoleFound'] 85 thisSection = self.cfg[ 86 'test03GetTrustedHostInfoWithNoMatchingRoleFound'] 86 87 try: 87 88 trustedHostInfo = self.aa.getTrustedHostInfo(thisSection['role']) -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attributeauthorityclient/README
r4732 r5290 10 10 in this directory and run: 11 11 12 $ python ../ config/attributeauthority/sitea/siteAServerApp.py12 $ python ../../config/attributeauthority/sitea/siteAServerApp.py 13 13 14 14 ...and in a separate terminal: 15 15 16 $ python ../ config/attributeauthority/siteb/siteBServerApp.py16 $ python ../../config/attributeauthority/siteb/siteBServerApp.py 17 17 18 18 Configuration for these services is held in the files 19 19 20 ../ config/attributeauthority/sitea/site-a.ini and21 ../ config/attributeauthority/siteb/site-b.ini20 ../../config/attributeauthority/sitea/site-a.ini and 21 ../../config/attributeauthority/siteb/site-b.ini 22 22 23 23 respectively. -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attributeauthorityclient/attAuthorityClientTest.cfg
r4855 r5290 11 11 # ! SiteBMapConfig.xml trusted site A aaURI setting must agree with this 12 12 # setting for test6GetMappedAttCert 13 #uri = http://localhost:5000/AttributeAuthority13 uri = http://localhost:5000/AttributeAuthority 14 14 15 15 # With TCP Mon: … … 23 23 # same as peer hostname. 24 24 sslPeerCertCN = 25 sslCACertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt25 sslCACertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 26 26 27 27 [test02GetTrustedHostInfo] 28 role = postgrad28 role = urn:siteA:security:authz:1.0:attr:postgrad 29 29 30 30 [test03GetTrustedHostInfoWithNoMatchingRoleFound] … … 58 58 # Certificate associated with private key used to sign a message. The sign 59 59 # method will add this to the BinarySecurityToken element of the WSSE header. 60 signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt60 signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.crt 61 61 62 62 # PEM encoded private key file 63 signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.key63 signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.key 64 64 65 65 # Set the ValueType for the BinarySecurityToken added to the WSSE header for a … … 84 84 85 85 # Provide a space separated list of file paths 86 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt86 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 87 87 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/attributeauthorityclient/test_attributeauthorityclient.py
r4840 r5290 16 16 logging.basicConfig() 17 17 18 from ndg.security.test import BaseTestCase18 from ndg.security.test.unit import BaseTestCase 19 19 20 20 from ndg.security.common.attributeauthority import AttributeAuthorityClient, \ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/credentialwallet/README
r4734 r5290 7 7 run: 8 8 9 $ python ../ config/attributeauthority/sitea/siteAServerApp.py9 $ python ../../config/attributeauthority/sitea/siteAServerApp.py 10 10 11 11 ...and in a separate terminal: 12 12 13 $ python ../ config/attributeauthority/siteb/siteBServerApp.py13 $ python ../../config/attributeauthority/siteb/siteBServerApp.py 14 14 15 15 Configuration for these services is held in the files 16 16 17 ../ config/attributeauthority/sitea/site-a.ini and18 ../ config/attributeauthority/siteb/site-b.ini17 ../../config/attributeauthority/sitea/site-a.ini and 18 ../../config/attributeauthority/siteb/site-b.ini 19 19 20 20 respectively. -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/credentialwallet/credWallet.cfg
r4770 r5290 16 16 17 17 # CA certificates for Attribute Certificate signature validation 18 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt18 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 19 19 20 20 # CA certificates for SSL connection peer cert. validation 21 sslCACertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt21 sslCACertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 22 22 23 23 # See attAuthority unit tests to get this service running … … 51 51 # method will add this to the BinarySecurityToken element of the WSSE header. 52 52 # binSecTokValType attribute must be set to 'X509' or 'X509v3' ValueType. 53 wssecurity.signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt53 wssecurity.signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.crt 54 54 55 55 # ... or provide file path to PEM encoded private key file 56 wssecurity.signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.key56 wssecurity.signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.key 57 57 58 58 # Password protecting private key. Leave blank if there is no password. … … 80 80 81 81 # Provide a space separated list of file paths 82 wssecurity.caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt82 wssecurity.caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/credentialwallet/credWalletTest.cfg
r4770 r5290 17 17 # Test with tcpmon 18 18 #attributeAuthorityURI=http://localhost:5099/AttributeAuthority 19 userX509CertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt20 userPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key19 userX509CertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/test.crt 20 userPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/test.key 21 21 22 22 [test07GetAttCertFromLocalAAInstance] 23 attributeAuthorityPropFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg23 attributeAuthorityPropFilePath=$NDGSEC_TEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/credentialwallet/test_credentialwallet.py
r4840 r5290 15 15 import traceback 16 16 17 from ndg.security.test import BaseTestCase17 from ndg.security.test.unit import BaseTestCase 18 18 19 19 from ndg.security.common.utils.configfileparsers import \ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanager/README
r4479 r5290 6 6 7 7 1) Two test Attribute Authority services are required. These can be run from 8 the Attribute Authority Client unit test directory. It's path relative to this9 directory is ../attributeauthorityclient/. Run each service in a separate10 window so that the output canbe monitored:8 the config test directory. It's path relative to this directory is 9 ../../config/. Run each service in a separate window so that the output can 10 be monitored: 11 11 12 $ ../attributeauthorityclient/siteA/siteAServerApp.py 13 $ ../attributeauthorityclient/siteB/siteBServerApp.py 12 $ python ../../config/attributeauthority/sitea/siteAServerApp.py 13 14 ...and in a separate terminal: 15 16 $ python ../../config/attributeauthority/siteb/siteBServerApp.py 17 18 Configuration for these services is held in the files 19 20 ../../config/attributeauthority/sitea/site-a.ini and 21 ../../config/attributeauthority/siteb/site-b.ini 22 23 respectively. 14 24 15 25 2) Run the tests with the command: -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanager/sessionMgr.cfg
r4770 r5290 25 25 26 26 # X.509 certificate for SSL connections - ignored if useSSL is blank - Nb. 27 sslCertFile: $NDGSEC_ UNITTEST_CONFIG_DIR/sessionmanager/sm.crt27 sslCertFile: $NDGSEC_TEST_CONFIG_DIR/sessionmanager/sm.crt 28 28 29 29 # Private key file for SSL - ignored if useSSL is blank 30 sslKeyFile: $NDGSEC_ UNITTEST_CONFIG_DIR/sessionmanager/sm.key30 sslKeyFile: $NDGSEC_TEST_CONFIG_DIR/sessionmanager/sm.key 31 31 32 32 # Directory containing CA cert.s to verify SSL peer cert against - ignored if 33 33 # useSSL is blank 34 sslCACertDir: $NDGSEC_ UNITTEST_CONFIG_DIR/ca34 sslCACertDir: $NDGSEC_TEST_CONFIG_DIR/ca 35 35 36 36 # Credential Wallet Settings - global to all user sessions 37 37 # 38 38 # CA certificates for Attribute Certificate signature validation 39 credentialWallet.caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt39 credentialWallet.caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 40 40 41 41 # CA certificates for SSL connection peer cert. validation - required if 42 42 # connecting to an Attribute Authority over SSL 43 credentialWallet.sslCACertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt43 credentialWallet.sslCACertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 44 44 45 45 # Allow Get Attribute Certificate calls to try to get a mapped certificate … … 65 65 # The CA certificates of other NDG trusted sites should go here. NB, multiple 66 66 # values should be delimited by a space 67 credentialWallet.wssecurity.caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt67 credentialWallet.wssecurity.caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 68 68 69 69 # Signature of an outbound message … … 75 75 76 76 # PEM encoded cert 77 credentialWallet.wssecurity.signingCertFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/sessionmanager/sm.crt77 credentialWallet.wssecurity.signingCertFilePath: $NDGSEC_TEST_CONFIG_DIR/sessionmanager/sm.crt 78 78 79 79 # ... or provide file path to PEM encoded private key file 80 credentialWallet.wssecurity.signingPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/sessionmanager/sm.key80 credentialWallet.wssecurity.signingPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/sessionmanager/sm.key 81 81 82 82 # Set the ValueType for the BinarySecurityToken added to the WSSE header for a -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanager/sessionMgrTest.cfg
r4770 r5290 13 13 username = testuser 14 14 passphrase = testpassword 15 userX509CertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt16 userPriKeyFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.key15 userX509CertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 16 userPriKeyFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/user.key 17 17 userPriKeyPwd = testpassword 18 18 … … 54 54 55 55 [test12GetAttCertFromLocalAAInstance] 56 aaPropFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg56 aaPropFilePath = $NDGSEC_TEST_CONFIG_DIR/attributeauthority/sitea/siteAAttributeAuthority.cfg 57 57 acOutputFilePath = $NDGSEC_SM_UNITTEST_DIR/test12-ac-out.xml -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanager/test_sessionmanager.py
r4840 r5290 23 23 mkPath = lambda file: jnPath(os.environ['NDGSEC_SM_UNITTEST_DIR'], file) 24 24 25 from ndg.security.test import BaseTestCase25 from ndg.security.test.unit import BaseTestCase 26 26 27 27 from ndg.security.common.utils.configfileparsers import \ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanagerclient/README
r4737 r5290 3 3 This is the most complicated unit test suite and requires a number of services 4 4 to be running: 5 * Test Session Manager web service run from this directory 6 * Two test Attribute Authorities run from the Attribute Authority unit test 7 directory ../attributeauthority 5 * Test Session Manager web service and 6 * Two test Attribute Authorities 7 8 These are run from the config test directory ../../config 8 9 9 10 It is worthwhile trying out the Attribute Authority … … 20 21 terminal: 21 22 22 $ python ../ config/sessionmanager/sessionManagerServerApp.py23 $ python ../../config/sessionmanager/sessionManagerServerApp.py 23 24 24 25 2) Two test Attribute Authority services are required. These can be run from … … 27 28 window so that the output can be monitored: 28 29 29 $ python ../ config/attributeauthority/sitea/siteAServerApp.py30 $ python ../../config/attributeauthority/sitea/siteAServerApp.py 30 31 31 32 ...and in a separate terminal: 32 33 33 $ python ../ config/attributeauthority/siteb/siteBServerApp.py34 $ python ../../config/attributeauthority/siteb/siteBServerApp.py 34 35 35 36 Configuration for these services is held in the files 36 37 37 ../ config/sessionmanager/session-manager.ini38 ../ config/attributeauthority/sitea/site-a.ini39 ../ config/attributeauthority/siteb/site-b.ini38 ../../config/sessionmanager/session-manager.ini 39 ../../config/attributeauthority/sitea/site-a.ini 40 ../../config/attributeauthority/siteb/site-b.ini 40 41 41 42 respectively. -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanagerclient/sessionMgrClientTest.cfg
r4855 r5290 19 19 # For https only - List of CA certificates to enable this client to verify 20 20 # the server's SSL X.509 certificate 21 sslCACertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt21 sslCACertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 22 22 23 23 [test01Connect] … … 89 89 90 90 # Provide a space separated list of file paths 91 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt91 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sessionmanagerclient/test_sessionmanagerclient.py
r5063 r5290 27 27 mkPath = lambda file: jnPath(os.environ['NDGSEC_SMCLNT_UNITTEST_DIR'], file) 28 28 29 from ndg.security.test import BaseTestCase29 from ndg.security.test.unit import BaseTestCase 30 30 31 31 from ndg.security.common.sessionmanager import SessionManagerClient, \ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sslclientauthnmiddleware/sslclientauthnapp.py
r4738 r5290 19 19 return application 20 20 21 from ndg.security.test import BaseTestCase21 from ndg.security.test.unit import BaseTestCase 22 22 23 23 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sslclientauthnmiddleware/test.ini
r4863 r5290 28 28 errorResponseCode: 401 29 29 pathMatchList: /secure1 /secure2 30 caCertFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt30 caCertFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 31 31 32 32 # Logging configuration -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/sslclientauthnmiddleware/test_sslclientauthn.py
r4840 r5290 22 22 file) 23 23 24 from ndg.security.test import BaseTestCase24 from ndg.security.test.unit import BaseTestCase 25 25 from ndg.security.common.utils.configfileparsers import \ 26 26 CaseSensitiveConfigParser … … 54 54 thisSection = 'test01CheckAccessSecuredURLSucceeds' 55 55 56 clntCertFilePath = xpdVars(os.path.join('$NDGSEC_ UNITTEST_CONFIG_DIR',56 clntCertFilePath = xpdVars(os.path.join('$NDGSEC_TEST_CONFIG_DIR', 57 57 'pki', 58 58 'test.crt')) 59 clntPriKeyFilePath=xpdVars(os.path.join('$NDGSEC_ UNITTEST_CONFIG_DIR',59 clntPriKeyFilePath=xpdVars(os.path.join('$NDGSEC_TEST_CONFIG_DIR', 60 60 'pki', 61 61 'test.key')) -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wsgi/authn/test.ini
r5037 r5290 12 12 13 13 [pipeline:main] 14 pipeline = AuthNRedirectFilter 15 TestApp 14 pipeline = AuthNRedirectFilter TestApp 16 15 17 16 [app:TestApp] 18 paste.app_factory = ndg.security.test. wsgi.authn.test_authn:TestAuthNMiddleware17 paste.app_factory = ndg.security.test.unit.wsgi.authn.test_authn:TestAuthNMiddleware 19 18 20 19 [filter:AuthNRedirectFilter] 21 paste.filter_app_factory = ndg.security.server.wsgi.authn:Auth NRedirectHandlerMiddleware20 paste.filter_app_factory = ndg.security.server.wsgi.authn:AuthenticationRedirectMiddleware 22 21 prefix = authN. 23 #authN.redirectURI = /redirect2here24 authN.redirectURI = http://localhost:5800/verify22 authN.redirectURI = /redirect2here 23 #authN.redirectURI = http://localhost:5800/verify -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wsgi/authn/test_authn.py
r5037 r5290 2 2 """Unit tests for WSGI Authentication redirect handler 3 3 4 NERC Data 4 NERC DataGrid Project 5 5 """ 6 6 __author__ = "P J Kershaw" … … 43 43 elif environ['PATH_INFO'] == '/test_401WithLoggedIn': 44 44 status = "401 Unauthorized" 45 environ['REMOTE_USER'] = 'testuser'46 45 47 46 elif environ['PATH_INFO'] == '/test_200WithNotLoggedIn': … … 73 72 def test01Catch401WithNotLoggedIn(self): 74 73 response = self.app.get('/test_401WithNotLoggedIn') 74 self.assert_(response.status == 302) 75 75 76 try: 76 77 redirectResponse = response.follow() … … 80 81 81 82 def test02Skip200WithLoggedIn(self): 82 response = self.app.get('/test_200WithLoggedIn') 83 self.assert_(TestAuthNMiddleware.response in response) 83 response = self.app.get('/test_200WithLoggedIn', 84 extra_environ={'REMOTE_USER': 'testuser'}, 85 status=403) 86 self.assert_(response.status == 403) 84 87 85 88 def test03Catch401WithLoggedIn(self): … … 93 96 def test04Catch200WithNotLoggedIn(self): 94 97 response = self.app.get('/test_200WithNotLoggedIn') 95 self.assert_(TestAuthNMiddleware.response in response) 98 self.assert_(response.status == 302) 99 100 try: 101 redirectResponse = response.follow() 102 except paste.fixture.AppError, e: 103 self.failIf('404 Not found' not in str(e), 104 "Expecting 404 Not found") 96 105 97 106 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/dom/client/echoClientTest.cfg
r5054 r5290 9 9 [setUp] 10 10 uri = http://localhost:7500/Echo 11 signingPriKeyFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.key11 signingPriKeyFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.key 12 12 signingPriKeyPwd = 13 signingCertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt13 signingCertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.crt 14 14 15 15 # - NB, the two CA certificates are for the python and the java clients, respectively 16 caCertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_WSSECLNT_UNITTEST_DIR/cacert.pem16 caCertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_WSSECLNT_UNITTEST_DIR/cacert.pem 17 17 18 18 [test1Echo] -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/dom/client/test_echoclient.py
r5063 r5290 26 26 from EchoService_services import EchoServiceLocator 27 27 28 from ndg.security.test import BaseTestCase28 from ndg.security.test.unit import BaseTestCase 29 29 from ndg.security.common.wssecurity.signaturehandler.dom import SignatureHandler 30 30 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/dom/server/echoServer.py
r5063 r5290 27 27 28 28 29 from ndg.security.test import BaseTestCase29 from ndg.security.test.unit import BaseTestCase 30 30 31 31 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/dom/server/wssecurity.cfg
r5054 r5290 28 28 29 29 # ... or provide file path PEM encode cert here 30 signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-server.crt31 #signingCertFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/java-ca-server.crt30 signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-server.crt 31 #signingCertFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/java-ca-server.crt 32 32 33 33 # Pass a list of certificates ',' separated PEM encoded certs constituting a … … 41 41 42 42 # ... or provide file path to PEM encoded private key file 43 signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-server.key44 #signingPriKeyFilePath=$NDGSEC_ UNITTEST_CONFIG_DIR/pki/java-ca-server.key43 signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/wsse-server.key 44 #signingPriKeyFilePath=$NDGSEC_TEST_CONFIG_DIR/pki/java-ca-server.key 45 45 46 46 # Password protecting private key. Leave blank if there is no password. … … 95 95 # Provide a space separated list of file paths 96 96 # - NB, the two CA certificates are for the python and the java clients, respectively 97 caCertFilePathList=$NDGSEC_ UNITTEST_CONFIG_DIR/ca/java-ca.crt $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt97 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/java-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/foursuite/client/echoClientTest.cfg
r5053 r5290 9 9 [setUp] 10 10 uri = http://localhost:7500/Echo 11 signingPriKeyFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.key11 signingPriKeyFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.key 12 12 signingPriKeyPwd = 13 signingCertFilePath = $NDGSEC_ UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt13 signingCertFilePath = $NDGSEC_TEST_CONFIG_DIR/pki/wsse-clnt.crt 14 14 15 15 # - NB, the two CA certificates are for the python and the java clients, respectively 16 caCertFilePathList = $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_WSSECLNT_UNITTEST_DIR/cacert.pem16 caCertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt $NDGSEC_WSSECLNT_UNITTEST_DIR/cacert.pem 17 17 18 18 [test1Echo] -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/foursuite/client/test_echoclient.py
r5063 r5290 27 27 from EchoService_services import EchoServiceLocator 28 28 29 from ndg.security.test import BaseTestCase29 from ndg.security.test.unit import BaseTestCase 30 30 from ndg.security.common.wssecurity.signaturehandler.foursuite import SignatureHandler 31 31 from ndg.security.common.wssecurity.utils import DomletteReader, \ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/wssecurity/foursuite/server/echoServer.py
r5063 r5290 28 28 29 29 30 from ndg.security.test import BaseTestCase30 from ndg.security.test.unit import BaseTestCase 31 31 32 32 # Initialize environment for unit tests -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/x509/test_x509.py
r4840 r5290 25 25 26 26 from ConfigParser import SafeConfigParser 27 from ndg.security.test import BaseTestCase27 from ndg.security.test.unit import BaseTestCase 28 28 from ndg.security.common.X509 import X509CertRead, X509CertParse, X500DN, \ 29 29 X509Stack, X509StackEmptyError, SelfSignedCert, X509CertIssuerNotFound -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/x509/x509Test.cfg
r4770 r5290 10 10 11 11 [test1X509CertRead] 12 certfile: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt12 certfile: $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 13 13 14 14 [test8X509StackVerifyCertChain] 15 certfile: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/user.crt15 certfile: $NDGSEC_TEST_CONFIG_DIR/pki/user.crt 16 16 proxycertfile: $NDGSEC_X509_UNITTEST_DIR/proxy.crt 17 cacertfile: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt17 cacertfile: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 18 18 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/xmlsec/etree/etree.cfg
r4770 r5290 12 12 13 13 [test2SignWithInclC14N] 14 signingCertFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt15 signingPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key14 signingCertFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.crt 15 signingPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.key 16 16 filePath: $NDGSEC_XMLSEC_ETREE_UNITTEST_DIR/test-incl-c14n-signed.xml 17 17 signingPriKeyPwd: 18 18 19 19 [test3SignWithExclC14N] 20 signingCertFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.crt21 signingPriKeyFilePath: $NDGSEC_ UNITTEST_CONFIG_DIR/pki/test.key20 signingCertFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.crt 21 signingPriKeyFilePath: $NDGSEC_TEST_CONFIG_DIR/pki/test.key 22 22 filePath: $NDGSEC_XMLSEC_ETREE_UNITTEST_DIR/test-excl-c14n-signed.xml 23 23 signingPriKeyPwd: … … 30 30 31 31 [test6VerifyInclC14nDoc] 32 certFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt32 certFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 33 33 filePath: $NDGSEC_XMLSEC_ETREE_UNITTEST_DIR/test-incl-c14n-signed.xml 34 34 35 35 [test7VerifyExclC14nDoc] 36 certFilePathList: $NDGSEC_ UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt36 certFilePathList: $NDGSEC_TEST_CONFIG_DIR/ca/ndg-test-ca.crt 37 37 filePath: $NDGSEC_XMLSEC_ETREE_UNITTEST_DIR/test-excl-c14n-signed.xml 38 38 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/unit/xmlsec/etree/test_etree.py
r4840 r5290 25 25 26 26 from ConfigParser import SafeConfigParser 27 from ndg.security.test import BaseTestCase27 from ndg.security.test.unit import BaseTestCase 28 28 from ndg.security.common.xmlsec.etree import XMLSecDoc 29 29
Note: See TracChangeset
for help on using the changeset viewer.