source: TI12-security/trunk/python/ @ 2900

Subversion URL:
Revision 2900, 2.2 KB checked in by pjkersha, 13 years ago (diff) added *.conf for conf/ openssl.conf file

  • Use RotatingFileHandler? from logging package to enable store of ACs issued to be limited. Properties file attCertFileLogCnt sets maximum number of files created before rotation.
  • newAttCertFilePath() is replaced by rotating file handler functionality
  • added logging with some debug messages - more needed to complete

  • renamed to userIsRegistered should return bool,,

  • filled in default values for most attributes to ease installation config tasks
  • attCertFilePfx and attCertFileSfx replaced with attCertFileName and attCertFileLog attributes for new AC logging. removed debug calls. This module may now be surplus because of Pylons framework and plans for Java and PHP clients. added coapec for testing fix formatting altered settings for tests exptd with log config. Eventually change to be harness for SOAP log interface

Makefile: use default python + added force target.

1"""NDG Attribute Authority User Roles class - acts as an interface between
2the data centre's user roles configuration and the Attribute Authority
4NERC Data Grid Project
6@author P J Kershaw 29/07/05
8@copyright (C) 2006 CCLRC & NERC
10@licence: This software may be distributed under the terms of the Q Public
11License, version 1.0 or later.
13__revision__ = '$Id:$'
16from import AAUserRoles
19class UserRoles(AAUserRoles):
20    """User Roles class dynamic import for Attribute Authority.  Customize
21    according to your site's user role allocation system"""
23    def __init__(self, propertiesFilePath=None):
24        """Customize for example to initialise site user repository settings
26        @type propertiesFilePath: string
27        @keyword propertiesFilePath: file path to a properties from which
28        to initialise the user roles interface. e.g. the file could contain
29        user database settings.  The file path passed corresponds to the
30        userRolesPropFile element in the attAuthorityProperties.xml file.
31        """
32        pass
35    def userIsRegistered(self, userId):
36        """Convenience method NOT used by Attribute Authority API
38        @type userId: string
39        @param userId: identity of user to allocate roles to
40        @rtype: bool
41        @return: True if user is registered"""
42        return False
45    def getRoles(self, userId):
46        """Allocate required roles to user given by userId.  Default to safe
47        option of returning no user roles i.e. an empty list: []
49        @type userId: string
50        @param userId: identity of user to allocate roles to
51        @rtype: list
52        @return: roles to which user is entitled"""
54        # Put in HERE some conditional statement to allocate roles based on
55        # the userId input. e.g. database query
56        return [] 
Note: See TracBrowser for help on using the repository browser.