Ignore:
Timestamp:
31/10/08 16:52:34 (12 years ago)
Author:
pjkersha
Message:
  • Fix to Session Manager WSDL to allow nillable X.509 cert and ptrivate key return from connect operation
  • working session manager client unit tests up to test 4.
Location:
TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/SessionManager_services_server.py

    r4386 r4406  
    4646        <xsd:complexType> 
    4747                  <xsd:sequence> 
    48                     <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"userCert\" type=\"xsd:string\"/> 
    49                     <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"userPriKey\" type=\"xsd:string\"/> 
     48                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userX509Cert\" type=\"xsd:string\"/> 
     49                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userPriKey\" type=\"xsd:string\"/> 
    5050                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"issuingCert\" type=\"xsd:string\"/> 
    5151                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"sessID\" type=\"xsd:string\"/> 
     
    5757        <xsd:complexType> 
    5858                  <xsd:sequence> 
    59                     <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userCert\" type=\"xsd:string\"/> 
     59                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userX509Cert\" type=\"xsd:string\"/> 
    6060                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"sessID\" type=\"xsd:string\"/> 
    6161                  </xsd:sequence> 
     
    7070        <xsd:complexType> 
    7171                  <xsd:sequence> 
    72                     <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userCert\" type=\"xsd:string\"/> 
     72                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"userX509Cert\" type=\"xsd:string\"/> 
    7373                    <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"sessID\" type=\"xsd:string\"/> 
    7474                    <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"attAuthorityURI\" type=\"xsd:string\"/> 
     
    280280        if hasattr(self,'impl'): 
    281281            # Should have a tuple of 4 args 
    282             result._userCert = parameters[0] 
     282            result._userX509Cert = parameters[0] 
    283283            result._userPriKey = parameters[1] 
    284284            result._issuingCert = parameters[2] 
     
    291291    def soap_disconnect(self, ps): 
    292292        self.request = ps.Parse(disconnectInputMsg.typecode) 
    293         parameters = (self.request._userCert, self.request._sessID) 
     293        parameters = (self.request._userX509Cert, self.request._sessID) 
    294294 
    295295        # If we have an implementation object use it 
     
    305305    def soap_getAttCert(self, ps): 
    306306        self.request = ps.Parse(getAttCertInputMsg.typecode) 
    307         parameters = (self.request._userCert, self.request._sessID, self.request._attAuthorityURI, self.request._attAuthorityCert, self.request._reqRole, self.request._mapFromTrustedHosts, self.request._rtnExtAttCertList, self.request._extAttCert, self.request._extTrustedHost) 
     307        parameters = (self.request._userX509Cert, self.request._sessID, self.request._attAuthorityURI, self.request._attAuthorityCert, self.request._reqRole, self.request._mapFromTrustedHosts, self.request._rtnExtAttCertList, self.request._extAttCert, self.request._extTrustedHost) 
    308308 
    309309        # If we have an implementation object use it 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/__init__.py

    r4404 r4406  
    1818from ndg.security.server.zsi.sessionmanager.SessionManager_services_server \ 
    1919    import SessionManagerService as _SessionManagerService 
    20  
     20from ndg.security.common.zsi.sessionmanager.SessionManager_services import \ 
     21    connectInputMsg, disconnectInputMsg, getSessionStatusInputMsg, \ 
     22    getAttCertInputMsg 
     23     
     24     
    2125from ndg.security.server.sessionmanager import SessionManager 
    2226     
     
    5458            pdb.set_trace() 
    5559             
     60        request = ps.Parse(connectInputMsg.typecode)     
    5661        response = _SessionManagerService.soap_connect(self, ps) 
    5762         
     
    6065                                 createServerSess=request.CreateServerSess) 
    6166                     
    62         response.UserCert, response.UserPriKey, response.issuingCert, \ 
     67        response.UserX509Cert, response.UserPriKey, response.issuingCert, \ 
    6368            response.SessID = result 
    6469                  
     
    7681            import pdb 
    7782            pdb.set_trace() 
    78                          
     83            
     84        request = ps.Parse(disconnectInputMsg.typecode)              
    7985        response = _SessionManagerService.soap_disconnect(self, ps) 
    8086         
     
    9298            # Get certificate corresponding to private key that signed the 
    9399            # message - i.e. the user's proxy 
    94             userCert = signatureFilter.signatureHandler.verifyingCert 
     100            userX509Cert = signatureFilter.signatureHandler.verifyingCert 
    95101        else: 
    96102            # No signature from client - they must instead provide the 
    97             # designated holder cert via the UserCert input 
    98             userCert = request.UserCert 
    99         self.sm.deleteUserSession(sessID=sessID, userCert=userCert) 
     103            # designated holder cert via the UserX509Cert input 
     104            userX509Cert = request.UserX509Cert 
     105        self.sm.deleteUserSession(sessID=sessID, userX509Cert=userX509Cert) 
    100106        return response 
    101107 
     
    114120            pdb.set_trace() 
    115121             
     122        request = ps.Parse(getSessionStatusInputMsg.typecode)              
    116123        response = _SessionManagerService.soap_getSessionStatus(self, ps) 
    117124         
     
    134141            pdb.set_trace() 
    135142             
     143        request = ps.Parse(getAttCertInputMsg.typecode)              
    136144        response = _SessionManagerService.soap_getAttCert(self, ps) 
    137145 
     
    145153            # Get certificate corresponding to private key that signed the 
    146154            # message - i.e. the user's proxy 
    147             userCert = signatureFilter.signatureHandler.verifyingCert 
     155            userX509Cert = signatureFilter.signatureHandler.verifyingCert 
    148156        else: 
    149157            # No signature from client - they must instead provide the 
    150             # designated holder cert via the UserCert input 
    151             userCert = request.UserCert 
     158            # designated holder cert via the UserX509Cert input 
     159            userX509Cert = request.UserX509Cert 
    152160 
    153161         
    154         # Cert used in signature is prefered over userCert input element -  
    155         # userCert may have been omitted. 
     162        # Cert used in signature is prefered over userX509Cert input element -  
     163        # userX509Cert may have been omitted. 
    156164        result = self.sm.getAttCert( 
    157                             userCert=userCert or request.UserCert, 
     165                            userX509Cert=userX509Cert or request.UserX509Cert, 
    158166                            sessID=request.SessID, 
    159167                            aaURI=request.AttAuthorityURI, 
Note: See TracChangeset for help on using the changeset viewer.