Changeset 2287


Ignore:
Timestamp:
15/03/07 18:25:46 (12 years ago)
Author:
pjkersha
Message:

ndg.security.server/setup.py: added share/ files

ndg.security.test/setup.py: added test xml and config files

ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py: added option to input private key
password from the command line.

ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg: alter uri for tests.

Location:
TI12-security/trunk/python
Files:
4 edited

Legend:

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

    r2283 r2287  
    7979    packages =                      find_packages(), 
    8080    namespace_packages =        ['ndg', 'ndg.security'], 
    81     package_data =          {'ndg.security.server.conf': ['*.xml']}, 
     81    package_data =          {'ndg.security.server.conf': ['*.xml'], 
     82                             'ndg.security.server.share': ['*']}, 
    8283#    data_files =            [('share',  
    8384#                              [os.path.join('share', 'ndg-aa'),  
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py

    r2270 r2287  
    2323 
    2424class AttAuthorityClientTestCase(unittest.TestCase): 
     25    userPriKeyPwd = None 
    2526     
    2627    def setUp(self): 
     
    3435 
    3536        tracefile = sys.stderr 
     37 
     38        if self.userPriKeyPwd is None: 
     39            try: 
     40                if self.cfg['setUp'].get('userprikeypwd') is None: 
     41                    self.userPriKeyPwd = getpass.getpass(\ 
     42                            prompt="\nsetUp - client private key password: ") 
     43                else: 
     44                    self.userPriKeyPwd=self.cfg['setUp'].get('clntprikeypwd') 
     45            except KeyboardInterrupt: 
     46                sys.exit(0) 
    3647 
    3748        # Instantiate WS proxy 
     
    3950               signingCertFilePath=self.cfg['setUp']['usercertfilepath'], 
    4051               signingPriKeyFilePath=self.cfg['setUp']['userprikeyfilepath'], 
     52               signingPriKeyPwd=self.userPriKeyPwd, 
    4153               tracefile=sys.stderr) 
    4254             
     
    150162            raise "Error reading attribute certificate file \"%s\": %s" %\ 
    151163                                    (ioErr.filename, ioErr.strerror) 
    152          
     164 
     165        try: 
     166            if self.cfg['test7GetMappedAttCert'].get('userprikeypwd') is None: 
     167                userPriKeyPwd = getpass.getpass(\ 
     168                            prompt="\nsetUp - client private key password: ") 
     169            else: 
     170                userPriKeyPwd = self.cfg['setUp'].get('userprikeypwd') 
     171        except KeyboardInterrupt: 
     172            sys.exit(0) 
     173        
    153174        # Make client to site B Attribute Authority     
    154175        clnt = AttAuthorityClient( 
     
    156177signingCertFilePath=self.cfg['test7GetMappedAttCert']['usercertfilepath'], 
    157178signingPriKeyFilePath=self.cfg['test7GetMappedAttCert']['userprikeyfilepath'], 
     179signingPriKeyPwd=userPriKeyPwd, 
    158180tracefile=sys.stderr) 
    159181     
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg

    r2251 r2287  
    1111# setting for test6GetMappedAttCert 
    1212#uri = http://localhost:5000/AttributeAuthority 
    13 uri = https://localhost:5000/AttributeAuthority 
     13#uri = https://localhost:5000/AttributeAuthority 
     14uri = http://glue.badc.rl.ac.uk/DEWS/Portal/AttributeAuthority 
    1415 
    1516# X.509 certificate for Attribute Authority - to verify the signature of 
  • TI12-security/trunk/python/ndg.security.test/setup.py

    r2279 r2287  
    2222__revision__ = "$Id:$" 
    2323 
    24      
     24_pkgData = { 
     25    'ndg.security.test.AttAuthority': ['*.xml', '*.cfg', '*.sh'], 
     26    'ndg.security.test.AttCert': ['*.cfg'], 
     27    'ndg.security.test.ca': ['*.xml', '*.cfg'], 
     28    'ndg.security.test.MyProxy': ['*.xml', '*.cfg', 'Makefile'], 
     29    'ndg.security.test.SessionMgr': ['*.xml', '*.cfg', '*.sh'], 
     30    'ndg.security.test.XMLSecDoc': ['*.cfg'] 
     31    }     
     32 
    2533setup( 
    2634    name =                      'ndg_security_test', 
     
    3644    packages =                      find_packages(), 
    3745    namespace_packages =        ['ndg', 'ndg.security'], 
     46    package_data =          _pkgData,                              
    3847    zip_safe =              False 
    3948) 
Note: See TracChangeset for help on using the changeset viewer.