Changeset 5315


Ignore:
Timestamp:
20/05/09 14:00:53 (10 years ago)
Author:
pjkersha
Message:
  • Fix to logout in ndg.security.server.wsgi.authn
  • improved graphics with anti-aliasing to soften edges
  • added README files into integration test packages
Location:
TI12-security/trunk/python
Files:
2 added
52 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/Tests/openid-provider/op/op/public/layout/ndg2.css

    r4105 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.client/ndg/security/client/ssoclient/ssoclient/public/layout/ndg2.css

    r3752 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/paster_templates/default_deployment/openidprovider/layout/ndg2.css

    r4687 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/paster_templates/full_deployment/openidprovider/layout/ndg2.css

    r4773 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/public/layout/ndg2.css

    r3652 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/authn.py

    r5292 r5315  
    179179 
    180180class SessionHandlerMiddleware(NDGSecurityMiddlewareBase): 
    181     '''Middleware to redirect back to referrer URI following call to a logout 
     181    '''Middleware to handle: 
     182    - set user session details following redirect from OpenID Relying Party 
     183    signin 
     184    - redirect back to referrer URI following call to a logout 
    182185    URI as implemented in AuthKit''' 
    183186    prefix = 'sessionHandler.' 
    184187     
    185     logoutReturn2URIArgName = 'ndg.security.logout.r' 
     188    sessionKeyNames = ('username', 'sessionManagerURI', 'sessionId', 'pepCtx') 
     189     
    186190    propertyDefaults = { 
    187191        'signoutPath': None, 
     
    199203    @NDGSecurityMiddlewareBase.initCall 
    200204    def __call__(self, environ, start_response): 
    201          
     205        """Manage setting of session from AuthKit following OpenID Relying 
     206        Party sign in and manage logout 
     207         
     208        @type environ: dict 
     209        @param environ: WSGI environment variables dictionary 
     210        @type start_response: function 
     211        @param start_response: standard WSGI start response function 
     212 
     213        """ 
    202214        log.debug("SessionHandlerMiddleware.__call__ ...") 
    203215         
     
    208220                      self.signoutPath) 
    209221             
    210             referer = session.get(self.__class__.logoutReturn2URIArgName) 
    211             if referer is not None: 
     222            referrer = environ.get('HTTP_REFERER') 
     223            if referrer is not None: 
    212224                def _start_response(status, header, exc_info=None): 
    213                     header.extend([('Location', referer)]) 
     225                    """Alter the header to send a redirect to the logout 
     226                    referrer address""" 
     227                    header.extend([('Location', referrer)]) 
    214228                    return start_response(self.getStatusMessage(302),  
    215229                                          header, 
     
    221235                 
    222236            # Clear user details from beaker session 
    223             session.pop('username', None) 
    224             session.pop('sessionManagerURI', None) 
    225             session.pop('sessionId', None) 
    226             session.pop('pepCtx', None) 
     237            for keyName in self.__class__.sessionKeyNames: 
     238                session.pop(keyName, None) 
    227239            session.save() 
    228240        else: 
     
    260272                # Reset cookie removing user data 
    261273                environ['paste.auth_tkt.set_user'](session['username']) 
    262                  
    263             # Set a return to address for logout 
    264             session[self.__class__.logoutReturn2URIArgName] = self.pathInfo 
    265             session.save() 
    266                        
     274 
    267275            _start_response = start_response 
    268276             
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/provider/renderinginterface/buffet/layout/ndg2.css

    r4565 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/provider/renderinginterface/buffet/templates/ndg/security/ndgPage.kid

    r5067 r5315  
    6565                                ?> 
    6666                                Logged in as ${c.session['username']}.  
    67                                 [<a href="$logOutLink"> 
    68                                     Log out 
    69                                 </a>] 
     67                                [<a href="$logOutLink">Log out</a>] 
    7068                            </td></tr></tbody></table> 
    7169                        </div> 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/relyingparty/signin_interface/buffet/public/layout/ndg2.css

    r4863 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/authz/openidprovider/layout/ndg2.css

    r5087 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/authz/securedapp.ini

    r5254 r5315  
    4848authkit.cookie.signoutpath = /logout 
    4949 
     50# Disable inclusion of client IP address from cookie signature due to  
     51# suspected problem with AuthKit setting it when a HTTP Proxy is in place 
     52authkit.cookie.includeip = False 
     53 
    5054[filter:AuthorizationFilter] 
    5155paste.filter_app_factory=ndg.security.server.wsgi.authz:AuthorizationMiddleware.filter_app_factory 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/authz/securityservices.ini

    r5254 r5315  
    195195beaker.cache.data_dir = %(here)s/openidprovider/beaker/cache 
    196196beaker.session.data_dir = %(here)s/openidprovider/beaker/sessions 
     197beaker.session.cookie_expires = True 
    197198 
    198199[filter:OpenIDRelyingPartyFilter] 
     
    228229authkit.cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr 
    229230authkit.cookie.signoutpath = /logout 
     231 
     232# Disable inclusion of client IP address from cookie signature due to  
     233# suspected problem with AuthKit setting it when a HTTP Proxy is in place 
     234authkit.cookie.includeip = False 
     235 
    230236authkit.openid.path.signedin=/ 
    231237authkit.openid.store.type=file 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/combinedservices/openidprovider/layout/ndg2.css

    r4565 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/dap/layout/ndg2.css

    r5280 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/dap/server.ini

    r5293 r5315  
    5757beaker.cache.data_dir = %(here)s/authn/beaker/pki/cache 
    5858beaker.session.data_dir = %(here)s/authn/beaker/sessions 
     59beaker.session.cookie_expires = True 
    5960 
    6061# AuthKit Set-up 
    6162authkit.setup.method=cookie 
    6263 
    63 # This cookie name and secret MUST agree with the name used by the security web 
    64 # services app 
     64# This cookie name and secret MUST agree with the name used by the security  
     65# web services app 
    6566authkit.cookie.name=ndg.security.auth 
    6667authkit.cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr 
    6768authkit.cookie.signoutpath = /logout 
     69 
     70# Disable inclusion of client IP address from cookie signature due to  
     71# suspected problem with AuthKit setting it when a HTTP Proxy is in place 
     72authkit.cookie.includeip = False 
    6873 
    6974[filter:AuthorizationFilter] 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/dap/template/help.html

    r5293 r5315  
    3434                        </tbody></table> 
    3535                    </td> 
    36                     <td width="40%" align="center"> 
    37                         <div id="loginStatus"> 
    38                             <a href="/logout">logout</a> 
    39                         </div> 
    40                     </td> 
    41                      
    4236                    <td align="right"><span> 
    43                         <a href="http://www.stfc.ac.uk/"><image src="/stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
     37                        <a href="http://www.stfc.ac.uk/"><image src="stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
    4438                    </span></td> 
    4539                </tr> 
     
    4741        </div>    </body> 
    4842</html> 
    49  
    50 <!--! vim:ft=genshi 
    51 --> 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/dap/template/html.html

    r5293 r5315  
    124124                        </tbody></table> 
    125125                    </td> 
    126                     <td width="40%" align="center"> 
    127                         <div id="loginStatus"> 
    128                             <a href="/logout">logout</a> 
    129                         </div> 
    130                     </td> 
    131                      
    132126                    <td align="right"><span> 
    133                         <a href="http://www.stfc.ac.uk/"><image src="/stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
     127                        <a href="http://www.stfc.ac.uk/"><image src="stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
    134128                    </span></td> 
    135129                </tr> 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/dap/template/index.html

    r5293 r5315  
    6363                <tr> 
    6464                    <td width="60%" align="left"> 
    65                         <table><tbody> 
     65                        <table> 
     66                            <tbody> 
    6667                            <tr> 
    6768                                <td><span> 
     
    7273                                    This site is for test purposes only and is under active development.</td> 
    7374                            </tr> 
    74                         </tbody></table> 
     75                            </tbody> 
     76                        </table> 
    7577                    </td> 
    7678                    <td width="40%" align="center"> 
    7779                        <div id="loginStatus"> 
    78                             <a href="/logout">logout</a> 
     80                            <!--  
     81                                Ugly hack to derive SCRIPT_NAME from $title  
     82                                in order to set the logout URI 
     83                            --> 
     84                            <py:with vars="logoutURI=title.strip('Index of ').rstrip('/')+'/logout'"> 
     85                                <a href="$logoutURI">logout</a> 
     86                            </py:with> 
    7987                        </div> 
    8088                    </td> 
    8189                     
    8290                    <td align="right"><span> 
    83                         <a href="http://www.stfc.ac.uk/"><image src="/stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
     91                        <a href="http://www.stfc.ac.uk/"><image src="stfc-circle-sm.gif" alt="Hosted by the STFC CEDA" title="Hosted by the STFC CEDA"></image></a> 
    8492                    </span></td> 
    8593                </tr> 
     
    8896    </body> 
    8997</html> 
    90  
    91 <!--! vim:ft=genshi 
    92 --> 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/openid/openidprovider/layout/ndg2.css

    r5046 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/openidprovider/openidprovider/layout/ndg2.css

    r5067 r5315  
    2727 border: solid #333333; 
    2828 border-width: 0 0 2px 0; 
    29  background-image:url(/layout/neodc_logo4ndg.jpg);background-position:right; 
    3029 background-repeat:no-repeat; 
    3130 } 
Note: See TracChangeset for help on using the changeset viewer.