Ignore:
Timestamp:
27/11/06 12:06:27 (14 years ago)
Author:
pjkersha
Message:

www/html/sessionMgr.wsdl: updated connect and reqAuthorisation input message args.
test/SessionMgrClientTest.py: added disconnect methods are started changes for doc/lit style WS
interface + use of WS-Security.
test/AttAuthority/AttAuthorityClientTest.py and common/AttAuthority/init.py: use URI instead of URL
throughout.
common/SessionMgr/init.py: changes for doc/lit style WS interface + use of WS-Security.
common/SessionCookie.py: added sessionID and encrSessionMgrURI read-only attributes.

File:
1 edited

Legend:

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

    r1752 r1770  
    8080        # Initialise the Session Manager client connection 
    8181        # Omit traceFile keyword to leave out SOAP debug info 
    82         self.sessClnt = SessionMgrClient(smURI=self.config['smWSDL'], 
     82        self.clnt = SessionMgrClient(smURI=self.config['smWSDL'], 
    8383                        smPubKeyFilePath=self.config['smPubKeyFilePath'], 
    8484                        clntPubKeyFilePath=clntPubKeyFilePath, 
     
    9595        # Note the pass-phrase is read from the file tmp.  To pass 
    9696        # explicitly as a string use the 'pPhrase' keyword instead 
    97         self.sessClnt.addUser(self.config['newUserName'],  
    98                               pPhraseFilePath="./tmp", 
    99                               clntPriKeyPwd=self.__clntPriKeyPwd) 
     97        self.clnt.addUser(self.config['newUserName'],  
     98                          pPhraseFilePath="./tmp", 
     99                          clntPriKeyPwd=self.__clntPriKeyPwd) 
    100100        print "Added user '%s'" % self.config['newUserName'] 
    101101         
     
    107107        # Note the pass-phrase is read from the file tmp.  To pass 
    108108        # explicitly as a string use the 'pPhrase' keyword instead 
    109         sSessCookie = self.sessClnt.connect(self.config['userName'],  
     109        sSessCookie = self.clnt.connect(self.config['userName'],  
    110110                                    pPhraseFilePath="./tmp", 
    111111                                    clntPriKeyPwd=self.__clntPriKeyPwd) 
     
    119119        a proxyCert is returned""" 
    120120              
    121         self.proxyCert = self.sessClnt.connect(self.config['userName'],  
     121        self.proxyCert = self.clnt.connect(self.config['userName'],  
    122122                                      pPhraseFilePath="./tmp", 
    123123                                      createServerSess=True, 
     
    126126        print "User '%s' connected to Session Manager:\n%s" % \ 
    127127            (self.config['userName'], self.proxyCert) 
     128             
     129 
     130    def testCookieDisconnect(self): 
     131        """testCookieDisconnect: disconnect as if acting as a browser client -  
     132        a cookie is returned""" 
     133         
     134        # Note the pass-phrase is read from the file tmp.  To pass 
     135        # explicitly as a string use the 'pPhrase' keyword instead 
     136        self.clnt.disconnect(self.sSessCookie) 
     137        print "User disconnected from Session Manager:\n%s" % \ 
     138            self.sSessCookie 
     139             
     140 
     141    def testProxyCertDisconnect(self): 
     142        """testProxyCertDisconnect: Connect as a command line client -  
     143        a proxyCert is returned""" 
     144              
     145        self.clnt.disconnect(self.proxyCert) 
     146        print "User '%s' connected to Session Manager:\n%s" % self.proxyCert 
    128147 
    129148 
     
    133152         
    134153        self.testCookieConnect() 
    135         authResp = self.sessClnt.reqAuthorisation(\ 
     154        authResp = self.clnt.reqAuthorisation(\ 
    136155                    sessID=self.sessCookie['NDG-ID1'].value,  
    137156                    aaWSDL=self.config['aaWSDL'], 
     
    157176        # Request an attribute certificate from an Attribute Authority  
    158177        # using the proxyCert returned from connect() 
    159         authResp = self.sessClnt.reqAuthorisation(\ 
     178        authResp = self.clnt.reqAuthorisation(\ 
    160179                                     proxyCert=self.proxyCert, 
    161180                                     aaWSDL=self.config['aaWSDL'], 
     
    175194    def testGetPubKey(self): 
    176195        "testGetPubKey: return the Session Manager's public key" 
    177         pubKey = self.sessClnt.getPubKey() 
     196        pubKey = self.clnt.getPubKey() 
    178197                                              
    179198        print "Public Key:\n" + pubKey 
     
    187206                  ( 
    188207                    "testAddUser", 
    189                     "testConnect", 
    190                     "testDisconnect", 
    191                     "testReqAuthorisation", 
     208                    "testCookieConnect", 
     209                    "testProxyCertConnect", 
     210                    "testCookieDisconnect", 
     211                    "testProxyCertDisconnect", 
     212                    "testCookieReqAuthorisation", 
     213                    "testProxyCertReqAuthorisation", 
    192214                    "testGetPubKey", 
    193215                  )) 
Note: See TracChangeset for help on using the changeset viewer.