Ignore:
Timestamp:
10/12/08 15:37:16 (11 years ago)
Author:
pjkersha
Message:
  • Completed integration work for common WSGI/SOAP client based interfaces (ndg.security.server.wsgi.utils.sessionmanagerclient and ndg.security.server.wsgi.utils.attributeauthorityclient) with Pylons Single Sign On package (ndg.security.server.sso)
  • Integrated Single Sign On service into Combined Services Paste service as a Pylons app. This also includes Session Manager, Attribute Authority, OpenID. SSO Service will eventually be removed replaced with OpenID based SSO.
Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices/serverapp.py

    r4565 r4587  
    5858    } 
    5959    httpBasicAuthentication = HTTPBasicAuthentication() 
    60      
     60 
     61    def __init__(self, app, globalConfig, **localConfig): 
     62        self.app = app 
     63         
    6164    def __call__(self, environ, start_response): 
    6265         
     
    6568            action = getattr(self, methodName) 
    6669            return action(environ, start_response) 
     70        elif self.app is not None: 
     71            return self.app(environ, start_response) 
    6772        else: 
    6873            start_response('404 Not Found', [('Content-type', 'text/plain')]) 
     
    138143        start_response('200 OK', [('Content-type', 'text/xml')]) 
    139144        return str(attCert) 
    140          
    141          
    142 def app_factory(global_config, **local_conf): 
    143     return CombinedServicesWSGI() 
    144145 
     146def app_factory(globalConfig, **localConfig): 
     147    return CombinedServicesWSGI(None, globalConfig, **localConfig) 
     148 
     149def filter_app_factory(app, globalConfig, **localConfig): 
     150    return CombinedServicesWSGI(app, globalConfig, **localConfig) 
    145151 
    146152# Initialize environment for unit tests 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices/services.ini

    r4573 r4587  
    148148 
    149149[app:mainApp] 
    150 paste.app_factory = ndg.security.test.combinedservices.serverapp:app_factory 
     150paste.app_factory = ndg.security.server.sso.sso.config.middleware:make_app 
     151cache_dir = %(here)s/data 
     152beaker.session.key = sso 
     153beaker.session.secret = somesecret 
     154 
     155# If you'd like to fine-tune the individual locations of the cache data dirs 
     156# for the Cache data, or the Session saves, un-comment the desired settings 
     157# here: 
     158#beaker.cache.data_dir = %(here)s/data/cache 
     159#beaker.session.data_dir = %(here)s/data/sessions 
     160 
     161# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* 
     162# Debug mode will enable the interactive debugging tool, allowing ANYONE to 
     163# execute malicious code after an exception is raised. 
     164set debug = false 
     165 
     166configfile = %(here)s/singleSignOnService/sso.cfg 
     167#configfile = /home/pjkersha/workspace/security/python/ndg.security.server/ndg/security/server/sso/sso.cfg 
     168 
     169# AuthKit Set-up 
     170authkit.setup.method=openid, cookie 
     171authkit.cookie.secret=secret encryption string 
     172authkit.cookie.signoutpath = /logout 
     173authkit.openid.path.signedin=/ 
     174authkit.openid.store.type=file 
     175authkit.openid.store.config=%(here)s/data/openid 
     176authkit.openid.session.key = authkit_openid 
     177authkit.openid.session.secret = random string 
     178 
     179authkit.openid.baseurl = http://localhost 
     180 
     181# Template for signin 
     182authkit.openid.template.obj = ndg.security.server.sso.sso.lib.openid_util:make_template 
     183 
     184# Handler for parsing OpenID and creating a session from it 
     185authkit.openid.urltouser = ndg.security.server.sso.sso.lib.openid_util:url2user 
    151186 
    152187# Chain of SOAP Middleware filters 
     
    159194           SessionMiddlewareFilter 
    160195           OpenIDProviderFilter 
     196           testHarnessFilter 
    161197           mainApp 
     198 
     199[filter:testHarnessFilter] 
     200paste.filter_app_factory =  
     201        ndg.security.test.combinedservices.serverapp:filter_app_factory 
     202 
    162203 
    163204#______________________________________________________________________________ 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/combinedservices/siteAAttributeAuthority/siteAMapConfig.xml

    r4584 r4587  
    55        <loginURI>https://localhost/sso/login</loginURI> 
    66            <aaDN>/O=NDG/OU=Site A/CN=AttributeAuthority</aaDN> 
     7<!-- 
    78            <loginServerDN>/C=UK/ST=Oxfordshire/O=STFC/OU=BADC/CN=localhost</loginServerDN> 
    89            <loginRequestServerDN>/C=UK/ST=Oxfordshire/O=STFC/OU=BADC/CN=localhost</loginRequestServerDN> 
    9     </thisHost> 
     10--> 
     11                <loginServerDN>/C=UK/CN=gabriel.badc.rl.ac.uk/O=RAL/ST=Oxfordshire/OU=BADC</loginServerDN> 
     12                <loginRequestServerDN>/C=UK/CN=gabriel.badc.rl.ac.uk/O=RAL/ST=Oxfordshire/OU=BADC</loginRequestServerDN> 
     13                </thisHost> 
    1014    <trusted name="Site C"> 
    1115        <aaURI>http://aa.sitec.blah</aaURI> 
Note: See TracChangeset for help on using the changeset viewer.