Ignore:
Timestamp:
28/11/08 12:22:42 (11 years ago)
Author:
pjkersha
Message:

Added local Session Manager call test to combined services unit tests.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/sessionMgrTest.cfg

    r4447 r4513  
    2222propFilePath = $NDGSEC_SM_UNITTEST_DIR/sessionMgr.cfg 
    2323 
    24 [test01Connect2AuthNServiceWithNoUserCertReturned] 
     24[test01Connect2AuthNServiceWithNoUserX509CertReturned] 
    2525# Alter username according to the MyProxy credentials you wish to test.  If 
    2626# passphrase is commented out you will be prompted for it on the command line. 
     
    2929passphrase = testpassword 
    3030 
    31 [test02Connect2AuthNServiceReturningAUserCert] 
     31[test02Connect2AuthNServiceReturningAUserX509Cert] 
    3232outputCredsFilePath = user.creds 
    3333 
     
    5151extACFilePath = $NDGSEC_SM_UNITTEST_DIR/ac-out.xml 
    5252 
    53 [test11GetAttCertWithUserCert] 
     53[test11GetAttCertWithUserX509Cert] 
    5454aaURI = http://localhost:5000/AttributeAuthority 
    5555 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/test_sessionmanager.py

    r4447 r4513  
    8787        print("Finished setting up connection") 
    8888 
    89     def _connect2UserCertAuthNService(self): 
     89    def _connect2UserX509CertAuthNService(self): 
    9090        '''Same as _connect but Session Manager is using an Authentication  
    9191        Service that returns PKI credentials i.e. like MyProxy''' 
     
    103103        self.sm['authNService'] = { 
    104104            'moduleFilePath': os.environ['NDGSEC_SM_UNITTEST_DIR'], 
    105             'moduleName': 'usercertauthn', 
    106             'className': 'UserCertAuthN', 
     105            'moduleName': 'userx509certauthn', 
     106            'className': 'UserX509CertAuthN', 
    107107            'userX509CertFilePath': userX509CertFilePath, 
    108108            'userPriKeyFilePath': userPriKeyFilePath 
     
    131131        print("Finished setting up connection") 
    132132    
    133     def test01Connect2AuthNServiceWithNoUserCertReturned(self): 
    134          
    135         thisSection = 'test01Connect2AuthNServiceWithNoUserCertReturned' 
     133    def test01Connect2AuthNServiceWithNoUserX509CertReturned(self): 
     134         
     135        thisSection = 'test01Connect2AuthNServiceWithNoUserX509CertReturned' 
    136136        username = self.cfg.get(thisSection, 'username') 
    137137        if SessionManagerTestCase.passphrase is None and \ 
     
    154154        print("User '%s' connected to Session Manager:\n%s"%(username, sessID))      
    155155                                   
    156     def test02Connect2AuthNServiceReturningAUserCert(self): 
    157          
    158         section = 'test02Connect2AuthNServiceReturningAUserCert' 
     156    def test02Connect2AuthNServiceReturningAUserX509Cert(self): 
     157         
     158        section = 'test02Connect2AuthNServiceReturningAUserX509Cert' 
    159159         
    160160        # Change to alternative authentication service 
     
    166166        self.sm['authNService'] = { 
    167167            'moduleFilePath': os.environ['NDGSEC_SM_UNITTEST_DIR'], 
    168             'moduleName': 'usercertauthn', 
    169             'className': 'UserCertAuthN', 
     168            'moduleName': 'userX509certauthn', 
     169            'className': 'UserX509CertAuthN', 
    170170            'userX509CertFilePath': userX509CertFilePath, 
    171171            'userPriKeyFilePath': userPriKeyFilePath 
     
    211211        self.sm['authNService'] = { 
    212212            'moduleFilePath': os.environ['NDGSEC_SM_UNITTEST_DIR'], 
    213             'moduleName': 'usercertauthn', 
    214             'className': 'UserCertAuthN', 
     213            'moduleName': 'userX509certauthn', 
     214            'className': 'UserX509CertAuthN', 
    215215            'userX509CertFilePath': userX509CertFilePath, 
    216216            'userPriKeyFilePath': userPriKeyFilePath 
     
    255255             
    256256 
    257     def test06DisconnectWithUserCert(self): 
    258         """test5DisconnectWithUserCert: Disconnect based on a user X.509 
     257    def test06DisconnectWithUserX509Cert(self): 
     258        """test5DisconnectWithUserX509Cert: Disconnect based on a user X.509 
    259259        cert. credential from an earlier call to connect  
    260260        """ 
    261261         
    262         self._connect2UserCertAuthNService() 
     262        self._connect2UserX509CertAuthNService() 
    263263         
    264264        # User cert DN determines ID of session to delete 
     
    347347 
    348348 
    349     def test11GetAttCertWithUserCert(self): 
    350         """test11GetAttCertWithUserCert: make an attribute request using 
     349    def test11GetAttCertWithUserX509Cert(self): 
     350        """test11GetAttCertWithUserX509Cert: make an attribute request using 
    351351        a user cert as authentication credential""" 
    352         self._connect2UserCertAuthNService() 
     352        self._connect2UserX509CertAuthNService() 
    353353 
    354354        # Request an attribute certificate from an Attribute Authority  
    355355        # using the userX509Cert returned from connect() 
    356356         
    357         aaURI = self.cfg.get('test11GetAttCertWithUserCert', 'aaURI') 
     357        aaURI = self.cfg.get('test11GetAttCertWithUserX509Cert', 'aaURI') 
    358358        attCert, errMsg, extAttCertList = self.sm.getAttCert( 
    359359                                     userX509Cert=self.userX509Cert,  
     
    392392        smTestCaseMap = map(SessionManagerTestCase, 
    393393                          ( 
    394                             "test01Connect2AuthNServiceWithNoUserCertReturned", 
    395                             "test02Connect2AuthNServiceReturningAUserCert", 
     394                            "test01Connect2AuthNServiceWithNoUserX509CertReturned", 
     395                            "test02Connect2AuthNServiceReturningAUserX509Cert", 
    396396                            "test03GetSessionStatus", 
    397397                            "test04ConnectNoCreateServerSess", 
    398398                            "test05DisconnectWithSessID", 
    399                             "test06DisconnectWithUserCert", 
     399                            "test06DisconnectWithUserX509Cert", 
    400400                            "test07GetAttCertWithSessID", 
    401401                            "test08GetAttCertRefusedWithSessID", 
    402402                            "test09GetMappedAttCertWithSessID", 
    403403                            "test10GetAttCertWithExtAttCertListWithSessID", 
    404                             "test11GetAttCertWithUserCert", 
     404                            "test11GetAttCertWithUserX509Cert", 
    405405                            "test12GetAttCertFromLocalAAInstance", 
    406406                          )) 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/usercertauthn.py

    r4404 r4513  
    2121from ndg.security.common.myproxy import MyProxyClient 
    2222 
    23 class UserCertAuthN(AbstractAuthNService): 
     23class UserX509CertAuthN(AbstractAuthNService): 
    2424    '''Test Authentication interface to the Session Manager  
    2525    returning a certificate and private key 
Note: See TracChangeset for help on using the changeset viewer.