Changeset 4573 for TI12-security/trunk/python/ndg.security.test/ndg
- Timestamp:
- 09/12/08 13:26:58 (12 years ago)
- Location:
- TI12-security/trunk/python/ndg.security.test/ndg/security/test
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/attAuthorityClientTest.cfg
r4318 r4573 11 11 # ! SiteBMapConfig.xml trusted site A aaURI setting must agree with this 12 12 # setting for test6GetMappedAttCert 13 uri = http://localhost:5000/AttributeAuthority 13 14 # With TCP Mon: 15 uri = http://localhost:4999/AttributeAuthority 16 #uri = http://localhost:5000/AttributeAuthority 14 17 15 18 # For https connections only. !Omit ssl* settings if using http! … … 19 22 sslCACertFilePathList = $NDGSEC_AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt 20 23 21 [test 3GetTrustedHostInfo]24 [test02GetTrustedHostInfo] 22 25 role = postgrad 23 26 24 [test 3aGetTrustedHostInfoWithNoMatchingRoleFound]27 [test03GetTrustedHostInfoWithNoMatchingRoleFound] 25 28 # Set an alternative role to test no matching role found exception 26 29 role = blah 27 30 28 [test 5GetAttCert]31 [test06GetAttCert] 29 32 # If clntcertfilepath is a proxy set this cert as the one that issued the 30 33 # proxy. Comment out if clntcertfilepath is a standard X.509 cert. … … 34 37 #issuingclntcertfilepath = $NDGSEC_AACLNT_UNITTEST_DIR/proxy-cert.pem 35 38 36 # Setup for use by test 7GetMappedAttCert test39 # Setup for use by test08GetMappedAttCert test 37 40 attCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml 38 41 39 [test 6GetAttCertWithUserIdSet]42 [test07GetAttCertWithUserIdSet] 40 43 userId = system 41 44 attCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt-test6.xml 42 45 43 [test 7GetMappedAttCert]46 [test08GetMappedAttCert] 44 47 uri = http://localhost:5100/AttributeAuthority 45 48 userAttCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml 46 49 mappedAttCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/mapped-ac.xml 47 50 48 [test 8GetMappedAttCertStressTest]51 [test09GetMappedAttCertStressTest] 49 52 uri = http://localhost:5100/AttributeAuthority 50 53 userAttCertFilePathList = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/siteA/site-a.ini
r4462 r4573 62 62 # Chain of SOAP Middleware filters 63 63 [pipeline:main] 64 pipeline = wsseSignatureVerificationFilter AttributeAuthorityFilter wsseSignatureFilter mainApp 64 pipeline = wsseSignatureVerificationFilter 65 AttributeAuthorityFilter 66 wsseSignatureFilter 67 mainApp 65 68 66 69 … … 71 74 AttributeAuthority.propPrefix = attributeAuthority 72 75 AttributeAuthority.propFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/siteA/site-a.ini 76 AttributeAuthority.wsseSignatureVerificationFilterID = wsseSignatureVerificationFilter01 73 77 referencedFilters = wsseSignatureVerificationFilter01 74 78 path = /AttributeAuthority … … 86 90 # confirmation 87 91 referencedFilters = wsseSignatureVerificationFilter01 92 wsseSignatureVerificationFilterID = wsseSignatureVerificationFilter01 88 93 89 94 # Last filter in chain SOAP handlers writes the response -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/siteB/site-b.ini
r4462 r4573 71 71 AttributeAuthority.propPrefix = attributeAuthority 72 72 AttributeAuthority.propFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/siteB/site-b.ini 73 AttributeAuthority.wsseSignatureVerificationFilterID = wsseSignatureVerificationFilter01 73 74 referencedFilters = wsseSignatureVerificationFilter01 74 75 path = /AttributeAuthority … … 82 83 [filter:wsseSignatureFilter] 83 84 paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:ApplySignatureFilter 85 86 # Reference the verification filter in order to be able to apply signature 87 # confirmation - not needed if applySignatureConfirmation is set to False - see 88 # WS-Security section below... 89 #referencedFilters = wsseSignatureVerificationFilter01 90 #wsseSignatureVerificationFilterID = wsseSignatureVerificationFilter01 91 84 92 # Last filter in chain SOAP handlers writes the response 85 93 writeResponse = True -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/test_attributeauthorityclient.py
r4513 r4573 22 22 from ndg.security.common.AttCert import AttCertRead 23 23 from ndg.security.common.X509 import X509CertParse, X509CertRead 24 from ndg.security.common.utils. ConfigFileParsers import \24 from ndg.security.common.utils.configfileparsers import \ 25 25 CaseSensitiveConfigParser 26 26 … … 83 83 cfgFileSection='wsse', 84 84 cfg=self.cfgParser) 85 86 def test1GetX509Cert(self): 87 '''test1GetX509Cert: retrieve Attribute Authority's X.509 cert.''' 88 resp = self.siteAClnt.getX509Cert() 89 print "Attribute Authority X.509 cert.:\n" + resp 90 91 def test2GetHostInfo(self): 92 """test2GetHostInfo: retrieve info for AA host""" 85 86 def test01GetHostInfo(self): 87 """test01GetHostInfo: retrieve info for AA host""" 93 88 hostInfo = self.siteAClnt.getHostInfo() 94 89 print "Host Info:\n %s" % hostInfo 95 90 96 def test 3GetTrustedHostInfo(self):97 """test 3GetTrustedHostInfo: retrieve trusted host info matching a91 def test02GetTrustedHostInfo(self): 92 """test02GetTrustedHostInfo: retrieve trusted host info matching a 98 93 given role""" 99 94 trustedHostInfo = self.siteAClnt.getTrustedHostInfo(\ 100 self.cfg['test 3GetTrustedHostInfo']['role'])95 self.cfg['test02GetTrustedHostInfo']['role']) 101 96 for hostname, hostInfo in trustedHostInfo.items(): 102 97 assert hostname, "Hostname not set" … … 106 101 print "Trusted Host Info:\n %s" % trustedHostInfo 107 102 108 def test 3aGetTrustedHostInfoWithNoMatchingRoleFound(self):109 """test 3aGetTrustedHostInfoWithNoMatchingRoleFound: test the case103 def test03GetTrustedHostInfoWithNoMatchingRoleFound(self): 104 """test03GetTrustedHostInfoWithNoMatchingRoleFound: test the case 110 105 where the input role doesn't match any roles in the target AA's map 111 106 config file""" 112 _cfg = self.cfg['test 3aGetTrustedHostInfoWithNoMatchingRoleFound']107 _cfg = self.cfg['test03GetTrustedHostInfoWithNoMatchingRoleFound'] 113 108 try: 114 109 trustedHostInfo = self.siteAClnt.getTrustedHostInfo(_cfg['role']) … … 120 115 121 116 122 def test 4GetTrustedHostInfoWithNoRole(self):123 """test 4GetTrustedHostInfoWithNoRole: retrieve trusted host info117 def test04GetTrustedHostInfoWithNoRole(self): 118 """test04GetTrustedHostInfoWithNoRole: retrieve trusted host info 124 119 irrespective of role""" 125 120 trustedHostInfo = self.siteAClnt.getTrustedHostInfo() … … 133 128 134 129 135 def test 4aGetAllHostsInfo(self):136 """test 4aGetAllHostsInfo: retrieve info for all hosts"""130 def test05GetAllHostsInfo(self): 131 """test05GetAllHostsInfo: retrieve info for all hosts""" 137 132 allHostInfo = self.siteAClnt.getAllHostsInfo() 138 133 for hostname, hostInfo in allHostInfo.items(): … … 144 139 145 140 146 def test 5GetAttCert(self):147 """test 5GetAttCert: Request attribute certificate from NDG Attribute141 def test06GetAttCert(self): 142 """test06GetAttCert: Request attribute certificate from NDG Attribute 148 143 Authority Web Service.""" 149 _cfg = self.cfg['test 5GetAttCert']144 _cfg = self.cfg['test06GetAttCert'] 150 145 151 146 # Read user Certificate into a string ready for passing via WS … … 171 166 172 167 173 def test 6GetAttCertWithUserIdSet(self):174 """test 6GetAttCertWithUserIdSet: Request attribute certificate from168 def test07GetAttCertWithUserIdSet(self): 169 """test07GetAttCertWithUserIdSet: Request attribute certificate from 175 170 NDG Attribute Authority Web Service setting a specific user Id 176 171 independent of the signer of the SOAP request.""" 177 _cfg = self.cfg['test 6GetAttCertWithUserIdSet']172 _cfg = self.cfg['test07GetAttCertWithUserIdSet'] 178 173 179 174 # Read user Certificate into a string ready for passing via WS … … 201 196 202 197 203 def test 7GetMappedAttCert(self):204 """test 7GetMappedAttCert: Request mapped attribute certificate from198 def test08GetMappedAttCert(self): 199 """test08GetMappedAttCert: Request mapped attribute certificate from 205 200 NDG Attribute Authority Web Service.""" 206 _cfg = self.cfg['test 7GetMappedAttCert']201 _cfg = self.cfg['test08GetMappedAttCert'] 207 202 208 203 # Read user Certificate into a string ready for passing via WS … … 241 236 242 237 243 def test 8GetMappedAttCertStressTest(self):244 """test 8GetMappedAttCertStressTest: Request mapped attribute238 def test09GetMappedAttCertStressTest(self): 239 """test09GetMappedAttCertStressTest: Request mapped attribute 245 240 certificate from NDG Attribute Authority Web Service.""" 246 _cfg = self.cfg['test 8GetMappedAttCertStressTest']241 _cfg = self.cfg['test09GetMappedAttCertStressTest'] 247 242 248 243 # Read user Certificate into a string ready for passing via WS … … 280 275 userAttCert=userAttCert) 281 276 except Exception, e: 282 outFilePfx = 'test 8GetMappedAttCertStressTest-%s' % \277 outFilePfx = 'test09GetMappedAttCertStressTest-%s' % \ 283 278 os.path.basename(acFilePath) 284 279 msgFile = open(outFilePfx+".msg", 'w') … … 286 281 287 282 288 #_____________________________________________________________________________289 283 class AttributeAuthorityClientTestSuite(unittest.TestSuite): 290 284 def __init__(self): 291 285 map = map(AttributeAuthorityClientTestCase, 292 286 ( 293 "test1GetX509Cert", 294 "test2GetHostInfo", 295 "test3GetTrustedHostInfo", 296 "test4GetTrustedHostInfoWithNoRole", 297 "test5GetAttCert", 298 "test6GetAttCertWithUserIdSet", 299 "test7GetMappedAttCert", 300 "test8GetMappedAttCertStressTest", 287 "test01GetHostInfo", 288 "test02GetTrustedHostInfo", 289 "test03GetTrustedHostInfoWithNoMatchingRoleFound", 290 "test04GetTrustedHostInfoWithNoRole", 291 "test05GetAllHostsInfo", 292 "test06GetAttCert", 293 "test07GetAttCertWithUserIdSet", 294 "test08GetMappedAttCert", 295 "test09GetMappedAttCertStressTest", 301 296 )) 302 297 unittest.TestSuite.__init__(self, map) -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices/services.ini
r4565 r4573 181 181 AttributeAuthority.propPrefix = attributeAuthority 182 182 AttributeAuthority.propFilePath = $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/services.ini 183 AttributeAuthority.wsseSignatureVerificationFilterID = ndg.security.server.wsgi.wsseSignatureVerificationFilter01 183 184 184 185 # Provide an identifier for this filter so that main WSGI app -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices/test_combinedservices.py
r4545 r4573 36 36 from ndg.security.common.X509 import X509CertParse, X509CertRead 37 37 from ndg.security.common.wssecurity.dom import SignatureHandler as SigHdlr 38 from ndg.security.common.utils. ConfigFileParsers import \38 from ndg.security.common.utils.configfileparsers import \ 39 39 CaseSensitiveConfigParser 40 40 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/configfileparsers/test.cfg
r4319 r4573 1 # Test Configuration file for ConfigFileParsers unit tests1 # Test Configuration file for configfileparsers unit tests 2 2 # 3 3 # NERC Data Grid Project -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/configfileparsers/test_configfileparsers.py
r4404 r4573 17 17 import traceback 18 18 19 from ndg.security.common.utils. ConfigFileParsers import \19 from ndg.security.common.utils.configfileparsers import \ 20 20 CaseSensitiveConfigParser, INIPropertyFile, readAndValidateProperties 21 21 from ConfigParser import SafeConfigParser … … 31 31 32 32 class ConfigFileParsersTestCase(unittest.TestCase): 33 """Unit test case for ndg.security.common.utils. ConfigFileParsers33 """Unit test case for ndg.security.common.utils.configfileparsers 34 34 module. 35 35 """ -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/credentialwallet/test_credentialwallet.py
r4513 r4573 17 17 import traceback 18 18 19 from ndg.security.common.utils. ConfigFileParsers import \19 from ndg.security.common.utils.configfileparsers import \ 20 20 CaseSensitiveConfigParser 21 21 from ndg.security.common.X509 import X509CertParse -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/test_sessionmanager.py
r4516 r4573 20 20 import traceback 21 21 22 from ndg.security.common.utils. ConfigFileParsers import \22 from ndg.security.common.utils.configfileparsers import \ 23 23 CaseSensitiveConfigParser 24 24 from ndg.security.common.X509 import X509CertParse -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanagerclient/test_sessionmanagerclient.py
r4513 r4573 31 31 from ndg.security.common.X509 import X509CertParse, X509CertRead 32 32 from ndg.security.common.wssecurity.dom import SignatureHandler as SigHdlr 33 from ndg.security.common.utils. ConfigFileParsers import \33 from ndg.security.common.utils.configfileparsers import \ 34 34 CaseSensitiveConfigParser 35 35 -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/utils/testConfigFileParsers.py
r4384 r4573 6 6 ''' 7 7 import unittest, os 8 from ndg.security.common.utils. ConfigFileParsers import readProperties, readAndValidateProperties8 from ndg.security.common.utils.configfileparsers import readProperties, readAndValidateProperties 9 9 from ndg.security.server.attributeauthority import AttributeAuthority 10 10 from ndg.security.server.sessionmanager import SessionManager
Note: See TracChangeset
for help on using the changeset viewer.