Ignore:
Timestamp:
11/03/10 14:55:42 (11 years ago)
Author:
pjkersha
Message:
  • Working Attribute Authority client unit tests. Configuration parameters such as issuer and flags to test query timestamp and SAML version string have now been moved out of the Attribute Authority to the generic SAML subject Query middleware interface ndg.security.server.wsgi.saml.SOAPQueryInterfaceMiddleware. This could be moved into the SAML egg at a later stage. The AuthzDecisionQuery? interface should be retested to allow for these changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/attributeauthorityclient/test_samlattributeauthorityclient.py

    r6720 r6721  
    298298         
    299299        self.assert_(response.status.statusCode.value==StatusCode.SUCCESS_URI) 
    300               
    301     def test08AuthzDecisionQuery(self): 
    302         _cfg = self.cfg['test02AuthzDecisionQuery'] 
    303          
    304         query = AuthzDecisionQuery() 
    305         query.version = SAMLVersion(SAMLVersion.VERSION_20) 
    306         query.id = str(uuid4()) 
    307         query.issueInstant = datetime.utcnow() 
    308          
    309         query.issuer = Issuer() 
    310         query.issuer.format = Issuer.X509_SUBJECT 
    311         query.issuer.value = str( 
    312                 AttributeAuthoritySAMLInterfaceTestCase.VALID_REQUESTOR_IDS[0]) 
    313                          
    314         query.subject = Subject()   
    315         query.subject.nameID = NameID() 
    316         query.subject.nameID.format = EsgSamlNamespaces.NAMEID_FORMAT 
    317         query.subject.nameID.value = _cfg['subject'] 
    318  
    319         binding = SOAPBinding() 
    320         binding.serialise = AuthzDecisionQueryElementTree.toXML 
    321         binding.deserialise = ResponseElementTree.fromXML 
    322         response = binding.send(query, _cfg['uri']) 
    323  
    324         samlResponseElem = ResponseElementTree.toXML(response) 
    325          
    326         print("SAML Response ...") 
    327         print(ElementTree.tostring(samlResponseElem)) 
    328         print("Pretty print SAML Response ...") 
    329         print(prettyPrint(samlResponseElem)) 
    330          
    331         self.assert_( 
    332             response.status.statusCode.value==StatusCode.REQUEST_DENIED_URI) 
    333300 
    334301        
Note: See TracChangeset for help on using the changeset viewer.