Ignore:
Timestamp:
25/05/06 16:14:18 (13 years ago)
Author:
pjkersha
Message:

Tests/SecurityClientTest?.py: mods to run on gabriel.

Tests/security.py: added functionality to get trusted host info.

dist/NDG-Security-0.66.tar.gz: new distro for testing on gabriel.

conf/mapConfig.xml: added loginURI tag for each trusted host - indicate URI for user login useful for forwarding of
login page from remote site.

NDG/AttAuthorityIO.py: include loginURI tag in trusted host info response message.

NDG/SecurityCGI.py: include functionality to get trusted host info from an AttAuthority?

NDG/AttAuthority.py: added loginURI tag for getTrustedHostInfo call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/Tests/security.py

    r1007 r1018  
    1717class TestSecurityCGI(SecurityCGI): 
    1818    """CGI interface test class for NDG Security""" 
     19     
    1920    #_________________________________________________________________________ 
    20     def showLogin(self, 
    21                   returnURI=None, 
    22                   **junk): 
     21    def showLogin(self, returnURI=None, **kwargs): 
    2322        """Display initial NDG login form""" 
    2423     
     
    159158     
    160159     
    161     def showHomeSiteSelect(self, trustedHosts=None): 
    162  
    163         if trustedHosts: 
    164             self.trustedHosts = trustedHosts             
     160    def showHomeSiteSelect(self, **kwargs): 
     161 
     162        if not self.trustedHostInfo: 
     163            self.getTrustedHostInfo()    
    165164                 
    166165        print """Content-type: text/html 
     
    194193          <option value="">Select your home site...""" % self.scriptName 
    195194           
    196         for hostname, uri in trustedHosts.items(): 
     195        for hostname, uri in self.trustedHostInfo.items(): 
    197196            print "<option value=\"%s\">%s" % (uri, hostname) 
    198197                 
     
    211210        # end of showHomeSiteSelect() 
    212211 
     212         
     213         
    213214if __name__ == "__main__": 
    214     securityCGI = TestSecurityCGI() 
     215     
     216    smWSDL = "http://gabriel.bnsc.rl.ac.uk/sessionMgr.wsdl" 
     217    aaWSDL = 'http://gabriel.bnsc.rl.ac.uk/attAuthority.wsdl' 
     218     
     219    smPubKeyFilePath = "/usr/local/NDG/conf/certs/gabriel-sm-cert.pem" 
     220    aaPubKeyFilePath = "/usr/local/NDG/conf/certs/gabriel-aa-cert.pem" 
     221     
     222    clntPubKeyFilePath = "../certs/GabrielCGI-cert.pem" 
     223    clntPriKeyFilePath = "../certs/GabrielCGI-key.pem" 
     224     
     225    returnURI = "https://gabriel.bnsc.rl.ac.uk/cgi-bin/security.py" 
     226     
     227    securityCGI = SecurityCGI(smWSDL, 
     228                              aaWSDL, 
     229                              smPubKeyFilePath=smPubKeyFilePath, 
     230                              aaPubKeyFilePath=aaPubKeyFilePath, 
     231                              clntPubKeyFilePath=clntPubKeyFilePath, 
     232                              clntPriKeyFilePath=clntPriKeyFilePath, 
     233                              returnURI=returnURI) 
    215234    securityCGI() 
Note: See TracChangeset for help on using the changeset viewer.