Ignore:
Timestamp:
22/02/10 16:37:10 (10 years ago)
Author:
pjkersha
Message:

Setting up tests for the SAML Authorisation Service.

Location:
TI12-security/trunk/NDGSecurity/python
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/.pydevproject

    r6604 r6605  
    1313<pydev_pathproperty name="org.python.pydev.PROJECT_EXTERNAL_SOURCE_PATH"> 
    1414<path>/home/pjkersha/workspace/ndg_security_saml</path> 
     15<path>/home/pjkersha/workspace/AuthKit/trunk</path> 
    1516</pydev_pathproperty> 
    1617</pydev_project> 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/authzservice.py

    r6604 r6605  
    104104                                         cls.AUTHZ_DECISION_QUERY_IFACE_OPTNAME 
    105105                                          
    106         self.authzDecisionFunc = app_conf.get( 
    107                                 authzDecisionQueryIfaceOptName, 
    108                                 cls.DEFAULT_AUTHZ_DECISION_QUERY_IFACE_KEYNAME) 
     106        authzDecisionFunc = app_conf.get(authzDecisionQueryIfaceOptName) 
     107        if authzDecisionFunc is not None: 
     108            # Use decision function set in config 
     109            self.authzDecisionFunc = authzDecisionFunc 
     110        else: 
     111            # Use default decision function 
     112            self.authzDecisionFunc = self.createAuthzDecisionFunc() 
    109113         
    110114    @classmethod 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/session.py

    r6604 r6605  
    292292                    SessionHandlerMiddleware.AUTH_TKT_SET_USER_ENVIRON_KEYNAME] 
    293293            setUser(session[SessionHandlerMiddleware.USERNAME_SESSION_KEYNAME]) 
     294             
     295            # Also reset the environment variable to prevent AuthKit from 
     296            # restoring the AX values in the cookie. 
     297            environ[SessionHandlerMiddleware.USERDATA_ENVIRON_KEYNAME] = ''       
    294298        else: 
    295299            log.debug("SessionHandlerMiddleware.__call__: REMOTE_USER_DATA " 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/authz_lite/securedapp.ini

    r6570 r6605  
    4949beaker.session.data_dir = %(here)s/authn/beaker/sessions 
    5050 
     51beaker.session.cookie_domain = .localhost 
    5152 
    5253[filter:AuthenticationFilter] 
     
    7172# suspected problem with AuthKit setting it when a HTTP Proxy is in place 
    7273authkit.cookie.includeip = False 
     74 
     75#authkit.cookie.params.expires = 2 
     76authkit.cookie.params.domain = .localhost 
    7377 
    7478# environ key name for beaker session 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservices.ini

    r6604 r6605  
    8282beaker.session.cookie_expires = True 
    8383 
     84beaker.session.cookie_domain = .localhost 
     85 
    8486# Key name for keying into environ dictionary 
    8587environ_key = %(beakerSessionKeyName)s 
     
    101103# suspected problem with AuthKit setting it when a HTTP Proxy is in place 
    102104cookie.includeip = False 
     105 
     106cookie.params.domain = .localhost 
    103107 
    104108# SSL Client Certificate based authentication is invoked if the client passed 
     
    160164authkit.cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr 
    161165authkit.cookie.signoutpath = /logout 
     166authkit.cookie.params.domain = .localhost 
    162167 
    163168# Disable inclusion of client IP address from cookie signature due to  
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/authz-decision-interface.ini

    r6578 r6605  
    11# 
    2 # SSL Client AuthN WSGI Testing environment configuration 
     2# INI file for testing the SAML Authorisation Query interface.  It uses a 
     3# test stub for the Authorisation Service rather than 
     4# ndg.security.server.wsgi.authzservice.AuthzServiceMiddleware.  See, 
     5# authz-service.ini to compare 
    36# 
    47# The %(here)s variable will be replaced with the parent directory of this file 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/test_soapauthzdecisioninterface.py

    r6578 r6605  
    187187        self.assert_(samlResponse.assertions[0].authzDecisionStatements[0 
    188188                                            ].decision == DecisionType.PERMIT) 
    189          
    190     def test02(self): 
    191         pass 
    192   
     189 
     190         
     191class SOAPAuthzServiceMiddlewareTestCase( 
     192                                SOAPAuthzDecisionInterfaceMiddlewareTestCase): 
     193    """Test the actual server side middleware  
     194    ndg.security.server.wsgi.authzservice.AuthzServiceMiddleware 
     195    rather than a test stub 
     196    """ 
     197    CONFIG_FILENAME = 'authz-service.ini' 
     198     
     199     
    193200if __name__ == "__main__": 
    194201    unittest.main() 
Note: See TracChangeset for help on using the changeset viewer.