Ignore:
Timestamp:
02/12/08 14:20:07 (12 years ago)
Author:
pjkersha
Message:

Completed tests running Attribute Authority and Session Manager in the same WSGI stack:

  • ndg.security.server.wsgi.utils.attributeauthorityclient.WSGIAttributeAuthorityClient: completed this class and tested in combinedservices unit tests. This class enables WSGI apps to access an AttributeAuthority? WSGI app running in the same stack or else make a callout to a remote SOAP service.
  • ndg.security.server.wsgi.wssecurity: improved config set-up
Location:
TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/attributeauthority/AttributeAuthority_services_server.py

    r4513 r4521  
    9292        </xsd:complexType> 
    9393      </xsd:element> 
    94  
    95       <xsd:element name=\"getX509Cert\"> 
    96         <xsd:complexType/> 
    97       </xsd:element> 
    98        
    99       <xsd:element name=\"getX509CertResponse\"> 
    100         <xsd:complexType> 
    101           <xsd:sequence> 
    102             <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"x509Cert\" type=\"xsd:string\"/> 
    103           </xsd:sequence> 
    104         </xsd:complexType> 
    105       </xsd:element> 
    106  
    10794    </xsd:schema> 
    10895  </wsdl:types> 
     
    140127  </wsdl:message> 
    141128 
    142   <wsdl:message name=\"getX509CertInputMsg\"> 
    143     <wsdl:part element=\"tns:getX509Cert\" name=\"parameters\"/> 
    144   </wsdl:message> 
    145  
    146   <wsdl:message name=\"getX509CertOutputMsg\"> 
    147     <wsdl:part element=\"tns:getX509CertResponse\" name=\"parameters\"/> 
    148   </wsdl:message> 
    149  
    150129  <wsdl:portType name=\"AttributeAuthority\"> 
    151130    <wsdl:operation name=\"getAttCert\"> 
     
    169148    </wsdl:operation> 
    170149 
    171     <wsdl:operation name=\"getX509Cert\"> 
    172       <wsdl:input message=\"tns:getX509CertInputMsg\"/> 
    173       <wsdl:output message=\"tns:getX509CertOutputMsg\"/> 
    174     </wsdl:operation> 
    175150  </wsdl:portType> 
    176151 
     
    217192      </wsdl:output>  
    218193    </wsdl:operation> 
    219  
    220     <wsdl:operation name=\"getX509Cert\"> 
    221       <soap:operation soapAction=\"getX509Cert\"/> 
    222       <wsdl:input> 
    223         <soap:body use=\"literal\"/> 
    224       </wsdl:input> 
    225       <wsdl:output> 
    226         <soap:body use=\"literal\"/> 
    227       </wsdl:output>  
    228     </wsdl:operation>     
    229    
    230194  </wsdl:binding> 
    231195 
     
    325289    root[(getAllHostsInfoInputMsg.typecode.nspname,getAllHostsInfoInputMsg.typecode.pname)] = 'soap_getAllHostsInfo' 
    326290 
    327     def soap_getX509Cert(self, ps): 
    328         self.request = ps.Parse(getX509CertInputMsg.typecode) 
    329  
    330         # If we have an implementation object use it 
    331         if hasattr(self,'impl'): 
    332             parameters = self.impl.getX509Cert() 
    333  
    334         result = getX509CertOutputMsg() 
    335         # If we have an implementation object, copy the result  
    336         if hasattr(self,'impl'): 
    337             result._x509Cert = parameters 
    338         return result 
    339  
    340     soapAction['getX509Cert'] = 'soap_getX509Cert' 
    341     root[(getX509CertInputMsg.typecode.nspname,getX509CertInputMsg.typecode.pname)] = 'soap_getX509Cert' 
    342  
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/attributeauthority/__init__.py

    r4513 r4521  
    2020        getHostInfoInputMsg, getHostInfoOutputMsg, \ 
    2121        getTrustedHostInfoInputMsg, getTrustedHostInfoOutputMsg, \ 
    22         getAllHostsInfoInputMsg, getAllHostsInfoOutputMsg, \ 
    23         getX509CertInputMsg, getX509CertOutputMsg 
     22        getAllHostsInfoInputMsg, getAllHostsInfoOutputMsg 
    2423     
    25 from ndg.security.server.zsi.attributeauthority.AttributeAuthority_services_server \ 
     24from \ 
     25ndg.security.server.zsi.attributeauthority.AttributeAuthority_services_server \ 
    2626    import AttributeAuthorityService as _AttributeAuthorityService 
    2727 
     
    4444            import pdb 
    4545            pdb.set_trace() 
     46             
     47        # Extract local WS-Security signature verification filter 
     48        self.wsseSignatureVerificationFilterID = kw.pop( 
     49                                        'wsseSignatureVerificationFilterID',  
     50                                        None) 
    4651          
    4752        # Initialise Attribute Authority class - property file will be 
     
    6873        # on whether a reference to the signature filter was set in the  
    6974        # environment 
    70         signatureFilter = \ 
    71             self.referencedWSGIFilters.get('wsseSignatureVerificationFilter01') 
     75        signatureFilter = self.referencedWSGIFilters.get( 
     76                                        self.wsseSignatureVerificationFilterID) 
    7277        if signatureFilter is not None: 
    7378            # Get certificate corresponding to private key that signed the 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/__init__.py

    r4520 r4521  
    4949                                                 None) 
    5050         
     51        # ... and WS-Security signature verification filter 
     52        self.wsseSignatureVerificationFilterID = kw.pop( 
     53                                        'wsseSignatureVerificationFilterID',  
     54                                        None) 
     55         
    5156        # Initialise Attribute Authority class - property file will be 
    5257        # picked up from default location under $NDG_DIR directory 
     
    101106        # on whether a reference to the signature filter was set in the  
    102107        # environment 
    103         signatureFilter = \ 
    104             self.referencedWSGIFilters.get('wsseSignatureVerificationFilter01') 
     108        signatureFilter = self.referencedWSGIFilters.get( 
     109                                        self.wsseSignatureVerificationFilterID) 
    105110        if signatureFilter is not None: 
    106111            # Get certificate corresponding to private key that signed the 
     
    157162        # on whether a reference to the signature filter was set in the  
    158163        # environment 
    159         signatureFilter = \ 
    160             self.referencedWSGIFilters.get('wsseSignatureVerificationFilter01') 
     164        signatureFilter = self.referencedWSGIFilters.get( 
     165                                        self.wsseSignatureVerificationFilterID) 
    161166        if signatureFilter is not None: 
    162167            # Get certificate corresponding to private key that signed the 
Note: See TracChangeset for help on using the changeset viewer.