Changeset 5223


Ignore:
Timestamp:
24/04/09 10:25:49 (10 years ago)
Author:
pjkersha
Message:

Updates following initial release on ndg3beta - release is now 1.0.1rc1:

  • Added additional test authN interface class for OpenID Provider BasicSessionManagerOpenIDAuthNInterface. This links to a session manager for authN but uses a simple look-up in the ini file to resolve usernames to OpenID identifiers. This is useful for testing. The production version SessionManagerOpenIDAuthNInterface uses a table in a database to do the same function.
  • improved ndg.security.server.wsgi.authn.AuthenticationRedirectMiddleware? log messaging for checker intercept method.
Location:
TI12-security/trunk/python
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.client/setup.cfg

    r5220 r5223  
    1717 
    1818[egg_info] 
    19 #tag_build =  
     19tag_build = rc1 
    2020tag_svn_revision = true 
    2121 
  • TI12-security/trunk/python/ndg.security.common/setup.cfg

    r5220 r5223  
    1717 
    1818[egg_info] 
    19 #tag_build =  
     19tag_build = rc1 
    2020tag_svn_revision = true 
    2121 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/authn.py

    r5181 r5223  
    146146        HTTP 401 Unauthorized response detected in the middleware chain 
    147147        """ 
    148         log.debug("AuthNMiddleware.checker received status %r, " 
    149                   "headers %r", status, headers) 
     148        log.debug("%s.checker received status %r, " 
     149                  "headers %r", cls.__name__, status, headers) 
    150150         
    151151        if status.startswith(cls.triggerStatus): 
    152             log.debug("%s.checker returning True" % cls.__name__) 
     152            log.debug("%s.checker caught status %s: invoking authentication " 
     153                      "handler", cls.__name__, cls.triggerStatus) 
    153154            return True 
    154155        else: 
    155             log.debug("%s.checker returning False" % cls.__name__) 
     156            log.debug("%s.checker skipping status %s", cls.__name__, status) 
    156157            return False 
    157158 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/provider/authninterface/basic.py

    r5222 r5223  
    139139        @raise AuthNInterfaceConfigError: error with configuration 
    140140        """ 
    141         super(BasicSessionManagerOpenIDAuthNInterface, self).__init__(**prop) 
    142          
    143         # Filter out BasicAuthNInterface properties ready for call to Session 
    144         # Manager client 
    145         for p in prop.keys(): 
    146             if p in BasicAuthNInterface.propertyKeyNames: 
    147                 prop.pop(p) 
     141        user2Identifier = prop.pop('username2UserIdentifiers') 
     142        if user2Identifier: 
     143            self._username2Identifier = {} 
     144            for i in user2Identifier.split(): 
     145                username, identifierStr = i.strip().split(':') 
     146                identifiers = tuple(identifierStr.split(',')) 
     147                self._username2Identifier[username] = identifiers 
     148        else: 
     149            raise AuthNInterfaceConfigError('No "user2Identifier" config ' 
     150                                            'option found') 
    148151 
    149152        self._client = WSGISessionManagerClient(**prop) 
  • TI12-security/trunk/python/ndg.security.server/setup.cfg

    r5220 r5223  
    1616 
    1717[egg_info] 
    18 #tag_build =  
     18tag_build = rc1 
    1919tag_svn_revision = true 
    2020 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/integration/authz/securedapp.py

    r5186 r5223  
    88__date__ = "20/11/08" 
    99__copyright__ = "(C) 2009 Science and Technology Facilities Council" 
     10__license__ = "BSD - See top-level directory for LICENSE file" 
    1011__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1112__revision__ = "$Id$" 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sslclientauthnmiddleware/ndgsecurity.wsgi

    r4611 r5223  
    2828 
    2929 
    30 NERC Data Grid Project 
    31  
    32 This software may be distributed under the terms of the Q Public License, 
    33 version 1.0 or later. 
     30NERC DataGrid Project 
    3431""" 
    3532__author__ = "P J Kershaw" 
    3633__date__ = "11/12/08" 
    37 __copyright__ = "(C) 2008 STFC & NERC" 
     34__copyright__ = "(C) 2009 STFC & NERC" 
     35__license__ = "BSD - see LICENSE file in top-level directory" 
    3836__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    3937__revision__ = "$Id$" 
  • TI12-security/trunk/python/ndg.security.test/setup.cfg

    r5220 r5223  
    1010# version 1.0 or later. 
    1111[egg_info] 
    12 #tag_build =  
     12tag_build = rc1 
    1313tag_svn_revision = true 
    1414 
  • TI12-security/trunk/python/ndg.security/setup.cfg

    r5220 r5223  
    1919 
    2020[egg_info] 
    21 #tag_build =  
     21tag_build = rc1 
    2222tag_svn_revision = true 
    2323 
Note: See TracChangeset for help on using the changeset viewer.