Changeset 4718 for TI12-security


Ignore:
Timestamp:
24/12/08 14:17:38 (11 years ago)
Author:
pjkersha
Message:

Refactored Attribute Authority client unit tests separating out AA services into the config dir.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test
Files:
44 added
5 deleted
6 edited

Legend:

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

    r4716 r4718  
    2424    '''Convenience base class from which other unit tests can extend.  Its 
    2525    sets the generic data directory path''' 
    26     dataDirEnvVarName = 'NDGSEC_UNITTEST_DATA_DIR' 
     26    configDirEnvVarName = 'NDGSEC_UNITTEST_CONFIG_DIR' 
    2727     
    2828    def setUp(self): 
    29         if BaseTestCase.dataDirEnvVarName not in os.environ: 
    30             os.environ[BaseTestCase.dataDirEnvVarName] = \ 
     29        if BaseTestCase.configDirEnvVarName not in os.environ: 
     30            os.environ[BaseTestCase.configDirEnvVarName] = \ 
    3131                os.path.join(os.path.abspath(os.path.dirname(__file__)), 
    3232                             'config') 
    3333 
    34 mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.dataDirEnvVarName], 
     34mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.configDirEnvVarName], 
    3535                                   file) 
    3636 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/AttCertTest.py

    r4680 r4718  
    2121from ConfigParser import SafeConfigParser 
    2222from ndg.security.common.AttCert import AttCert 
     23from ndg.security.test import BaseTestCase 
    2324 
    2425xpdVars = os.path.expandvars 
     
    2627mkPath = lambda file: jnPath(os.environ['NDGSEC_ATTCERT_UNITTEST_DIR'], file) 
    2728 
    28 class AttCertTestCase(unittest.TestCase): 
     29class AttCertTestCase(BaseTestCase): 
    2930     
    3031    def setUp(self): 
     32        super(AttCertTestCase, self).setUp() 
    3133         
    3234        if 'NDGSEC_INT_DEBUG' in os.environ: 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/ac.xml

    r3199 r4718  
    99        <userId>/O=NDG/OU=BADC/CN=pjkershaw</userId> 
    1010        <validity> 
    11             <notBefore>2008 01 10 15 26 32</notBefore>  
    12             <notAfter>2008 01 10 23 26 32</notAfter>  
     11            <notBefore>2008 12 24 13 04 58</notBefore>  
     12            <notAfter>2008 12 24 21 04 58</notAfter>  
    1313        </validity> 
    1414        <attributes> 
     
    2727        <provenance>original</provenance>  
    2828    </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>srClFxmtD9f6gOox0fewjJ+5VBg=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>Djy+IKg94DRZSmzbYD1CIudKzoiOKOVMxOQOF6un5+N1jgormdEUbS0FwiHBgCl2QgF59MuBPNHM 
    30 YtCOyuJX29+mIHlXATcMDZb7i62uXYKsIzBHDkN6wWlVaYlJvGFCmtWpJcSFpKlHigLfeO8GXEEg 
    31 A8iHfaoj9G/YMvxwL9WrxmrFOOq//kBeCPUyRBhwlmFf6ZRAEP/O/wh9BfBQZ0J99G8WETwpEznI 
    32 Ui20MJG7jjHmUD4GnK/h7MsajvrH9m48HHp/f9uVaAjGWJHTnDpVWBH4ueBGnsIsiyZHSgUz37pa 
    33 0FFB01OjNTeuS+OZ/4V/IScIWQrBFcDA6tOVkw==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAPcwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH 
    34 MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA4MDEwNDEwMTk0 
    35 N1oXDTA5MDEwMzEwMTk0N1owLDEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD 
     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>esXomhLkAv4tgd3USP9x7KbryTo=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>FPXml5l/mvHqBHJFUBhSp3SPu7dJGq9uvwEkjWXCmXbBBp6EE1hzYeCZ/JO0aV6zlmULI1qgP2ix 
     30tiXbi6SmXbqsbB08GY5hJ76mxis+9tsg/FMfDB34S6eS+CZDdLh3f1f4KnZ6uYhW5DyMJmsqKBj4 
     31af+1eTJmSchLoDnZcpOLBpsL9IqOJWXwbpmDUmGY0Bm5j7iJxXd2tcrhsODS09uisaNnVEaLoOWw 
     32h0lwKU4JIeCkhW/wAKum0qGAOnxHuwEz97GchTasxOazqvcwOi0p01M2Q7ls6bu5uiwUWnf9pl2A 
     33DmBEWcPeUsdgEd9iJdh1725O0zCRBcNG/26Obg==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIICazCCAdSgAwIBAgICAQEwDQYJKoZIhvcNAQEEBQAwLzEMMAoGA1UEChMDTkRH 
     34MQ0wCwYDVQQLEwRCQURDMRAwDgYDVQQDEwdUZXN0IENBMB4XDTA4MTIxNjE1MTE0 
     35OFoXDTEzMTIxNTE1MTE0OFowLDEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD 
    3636MQ0wCwYDVQQDEwR0ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 
    3737rpbuNUHWVRwhjHzhTOdym+fcZdmD7HbaeoFdef2V//Wj41xMieMZy9XQft2dFBDY 
     
    4141B0g11YOBgshZ0SpNwEEyhDzHUt3Ii2XmAh25/II08BR61fhMZvSJ/tVGJY4HfWG7 
    4242B4PZzYwo5vn/tYH1mk7w5QIDAQABoxUwEzARBglghkgBhvhCAQEEBAMCBPAwDQYJ 
    43 KoZIhvcNAQEEBQADgYEAFKEdr2FwlposAGRDHBMX9d48TKm1gXzOMEvReTYIaq46 
    44 aMpDDuApsbjpRqohvKIrngGa2e1p81tOTL5kbuusNjcNsagXkNgeO6qcGZCly/Bl 
    45 9Kxfynaned5jmgWgoxJP7VtOynvlLqJfrS/cEwOWDYpyPjJDRx2cZgEd3P4WfYI=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></attributeCertificate> 
     43KoZIhvcNAQEEBQADgYEAPC1EgoD9A+9O60P5Us3rDChvR2x2f8uX/7w+3GlNBc0A 
     447UD0ZUEEngUmnvkcm1YTOCwj3EINnvP6S6Alxj6s2X8tLWPUGTLVu2p93X5y7RnY 
     45k6isSEoYjzmw/LiayQHzrm/7hNR20TAE/axEW7rS6s7cRy5wVDUV0VNMQQuJcSg=</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></attributeCertificate> 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attCert/attCertTest.cfg

    r4680 r4718  
    2222 
    2323[test12IsValid] 
    24 certFilePathList: $NDGSEC_ATTCERT_UNITTEST_DIR/ndg-test-ca.crt 
     24certFilePathList: $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 
    2525 
    2626[test13IsValidStressTest] 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthority/test_attributeauthority.cfg

    r4717 r4718  
    99 
    1010[DEFAULT] 
    11 siteBPropFilePath=$NDGSEC_UNITTEST_DATA_DIR/attributeauthority/siteB/siteBAttAuthority.cfg 
     11siteBPropFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/attributeauthority/siteB/siteBAttAuthority.cfg 
    1212 
    1313[setUp] 
    1414# ! SiteBMapConfig.xml trusted site A aaURI setting must agree with this  
    1515# setting for test6GetMappedAttCert 
    16 propFilePath=$NDGSEC_UNITTEST_DATA_DIR/attributeauthority/siteA/siteAAttributeAuthority.cfg 
     16propFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/attributeauthority/siteA/siteAAttributeAuthority.cfg 
    1717 
    1818# For https connections only.  !Omit ssl* settings if using http! 
     
    2020# same as peer hostname.  
    2121sslPeerCertCN = AttributeAuthority 
    22 sslCACertFilePathList = $NDGSEC_UNITTEST_DATA_DIR/ca/ndg-test-ca.crt 
     22sslCACertFilePathList = $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 
    2323 
    2424[test02GetTrustedHostInfo] 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthorityclient/attAuthorityClientTest.cfg

    r4680 r4718  
    2020# same as peer hostname.  
    2121sslPeerCertCN = AttributeAuthority 
    22 sslCACertFilePathList = $NDGSEC_AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt 
     22sslCACertFilePathList = $NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 
    2323 
    2424[test02GetTrustedHostInfo] 
     
    3030  
    3131[test06GetAttCert] 
    32 # If clntcertfilepath is a proxy set this cert as the one that issued the  
    33 # proxy.  Comment out if clntcertfilepath is a standard X.509 cert. 
    34 #issuingclntcertfilepath = $NDGSEC_AACLNT_UNITTEST_DIR/user-cert.pem 
    35  
    36 # Test with no digital signature applied 
    37 #issuingclntcertfilepath = $NDGSEC_AACLNT_UNITTEST_DIR/proxy-cert.pem 
    38  
    3932# Setup for use by test08GetMappedAttCert test 
    4033attCertFilePath = $NDGSEC_AACLNT_UNITTEST_DIR/ac-clnt.xml 
     
    6255# Certificate associated with private key used to sign a message.  The sign  
    6356# method will add this to the BinarySecurityToken element of the WSSE header.   
    64 signingCertFilePath=$NDGSEC_AACLNT_UNITTEST_DIR/test.crt 
     57signingCertFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/pki/wsse-clnt.crt 
    6558 
    6659# PEM encoded private key file 
    67 signingPriKeyFilePath=$NDGSEC_AACLNT_UNITTEST_DIR/test.key 
     60signingPriKeyFilePath=$NDGSEC_UNITTEST_CONFIG_DIR/pki/wsse-clnt.key 
    6861 
    6962# Set the ValueType for the BinarySecurityToken added to the WSSE header for a 
     
    8881 
    8982# Provide a space separated list of file paths 
    90 caCertFilePathList=$NDGSEC_AACLNT_UNITTEST_DIR/ca/ndg-test-ca.crt 
     83caCertFilePathList=$NDGSEC_UNITTEST_CONFIG_DIR/ca/ndg-test-ca.crt 
    9184 
Note: See TracChangeset for help on using the changeset viewer.