Ignore:
Timestamp:
16/03/10 11:56:31 (10 years ago)
Author:
pjkersha
Message:

Added XACML Target ElementTree based parser.

Location:
TI12-security/trunk/NDGSecurity/python
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/__init__.py

    r6730 r6734  
     1"""NDG Security XACML package  
     2 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
     12 
    113class XACMLError(Exception): 
    214    """Base class for XACML package exception types""" 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/action.py

    r6643 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security XACML Action type definition  
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import RequestPropertyBase 
    713from ndg.security.common.authz.xacml.match import ActionMatch 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/attribute.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security XACML attribute type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import PolicyComponent 
    713 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/combinerparameter.py

    r6731 r6734  
    1 ''' 
    2 Created on 16 Mar 2010 
     1"""NDG Security CombinerParameter type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612 
    7 class CombinerParameters(object): 
     13class CombinerParameter(object): 
    814    ''' 
    915    classdocs 
    1016    ''' 
    11     ELEMENT_LOCAL_NAME = "CombinerParameters" 
     17    ELEMENT_LOCAL_NAME = "CombinerParameter" 
    1218    __slots__ = () 
    1319 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/condition.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security Condition type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import PolicyComponent 
    713 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/environment.py

    r6731 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security Environment type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "24/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import RequestPropertyBase 
    713from ndg.security.common.authz.xacml.match import EnvironmentMatch 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/match.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security Match type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import PolicyComponent 
    713from ndg.security.common.authz.xacml.attribute import AttributeValue 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/obligation.py

    r6621 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security Obligation type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "24/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.utils import TypedList 
    713from ndg.security.common.authz.xacml import PolicyComponent 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/pap.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security Policy Access Point type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/__init__.py

    r6731 r6734  
     1"""NDG Security XACML parsers package  
     2 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "15/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
     12import logging 
     13log = logging.getLogger(__name__) 
     14from abc import ABCMeta, abstractmethod 
     15 
     16from xml.etree import ElementTree 
     17 
     18 
     19class AbstractReader: 
     20    """Abstract base class for ElementTree implementation of XACML reader""" 
     21    __metaclass__ = ABCMeta 
     22     
     23    @classmethod 
     24    def __subclasshook__(cls, C): 
     25        """Derived class must implement __call__""" 
     26        if cls is AbstractReader: 
     27            if any("__call__" in B.__dict__ for B in C.__mro__): 
     28                return True 
     29             
     30        return NotImplemented 
     31         
     32    @abstractmethod 
     33    def __call__(self, obj): 
     34        """Abstract Parse XACML method 
     35        @raise NotImplementedError:  
     36        """ 
     37        raise NotImplementedError() 
     38     
     39    @classmethod 
     40    def parse(cls, obj): 
     41        """Parse from input object and return new XACML object 
     42        @param obj: input source - file name, stream object or other 
     43        @type obj: string, stream or other 
     44        @return: new XACML object 
     45        @rtype: PolicyComponent sub type 
     46        """ 
     47        reader = cls() 
     48        return reader(obj) 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/etree/__init__.py

    r6733 r6734  
     1"""NDG Security XACML ElementTree parsers package  
     2 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
     12import logging 
     13log = logging.getLogger(__name__) 
     14 
    115from xml.etree import ElementTree 
    216 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/etree/policyreader.py

    r6733 r6734  
    1 ''' 
    2 Created on 16 Mar 2010 
     1"""NDG Security XACML ElementTree Policy Reader   
    32 
    4 @author: pjkersha 
    5 ''' 
    6 from ndg.security.common.authz.xacml.etree.reader import AbstractReader 
    7 from ndg.security.common.authz.xacml import PolicyComponent, XMLParseError 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
     12from ndg.security.common.authz.xacml.parsers.etree.reader import \ 
     13    EtreeAbstractReader 
     14from ndg.security.common.authz.xacml import XMLParseError 
    815from ndg.security.common.authz.xacml.policy import Policy 
    916from ndg.security.common.authz.xacml.variabledefinition import \ 
     
    1118from ndg.security.common.authz.xacml.rule import Rule 
    1219from ndg.security.common.authz.xacml.target import Target 
    13 from ndg.security.common.authz.xacml.etree import QName 
    14 from ndg.security.common.authz.xacml.etree.targetreader import TargetReader 
     20from ndg.security.common.authz.xacml.parsers.etree import QName 
     21from ndg.security.common.authz.xacml.parsers.etree.targetreader import \ 
     22    TargetReader 
    1523     
    1624     
    17 class PolicyReader(AbstractReader): 
     25class PolicyReader(EtreeAbstractReader): 
    1826    """Parse a Policy Document using ElementTree 
    1927    """ 
     
    6270                    
    6371            elif localName == Target.ELEMENT_LOCAL_NAME: 
    64                 target = TargetReader.parse(childElem) 
     72                policy.target = TargetReader.parse(childElem) 
    6573              
    6674            elif localName == cls.COMBINER_PARAMETERS_LOCAL_NAME: 
     
    7482                 
    7583            elif localName == Rule.ELEMENT_LOCAL_NAME: 
    76                 rule = RuleReader.parse(childElem) 
     84                policy.rules.append(RuleReader.parse(childElem)) 
    7785                    
    7886            elif localName == cls.OBLIGATIONS_LOCAL_NAME: 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/etree/reader.py

    r6733 r6734  
    66import logging 
    77log = logging.getLogger(__name__) 
    8 from abc import ABCMeta, abstractmethod 
     8"""NDG Security XACML ElementTree reader module containing reader base class  
    99 
     10NERC DataGrid Project 
     11""" 
     12__author__ = "P J Kershaw" 
     13__date__ = "16/03/10" 
     14__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     15__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     16__license__ = "BSD - see LICENSE file in top-level directory" 
     17__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     18__revision__ = "$Id: $" 
    1019from xml.etree import ElementTree 
    1120 
     21from ndg.security.common.authz.xacml import PolicyComponent 
     22from ndg.security.common.authz.xacml.parsers import AbstractReader 
    1223 
    13 class AbstractReader: 
    14     """Abstract base class for ElementTree implementation of XACML reader""" 
    15     __metaclass__ = ABCMeta 
     24 
     25class EtreeAbstractReader(AbstractReader): 
     26    """Base class for ElementTree implementation of XACML reader""" 
    1627      
    1728    def __init__(self): 
     
    2233        """Restore original global namespace map""" 
    2334        ElementTree._namespace_map = self.__namespace_map_backup 
    24          
    25     @classmethod 
    26     def __subclasshook__(cls, C): 
    27         """Derived class must implement __call__""" 
    28         if cls is AbstractReader: 
    29             if any("__call__" in B.__dict__ for B in C.__mro__): 
    30                 return True 
    31              
    32         return NotImplemented 
    33          
    34     @abstractmethod 
    35     def __call__(self, obj): 
    36         """Abstract Parse XACML method 
    37         @raise NotImplementedError:  
    38         """ 
    39         raise NotImplementedError() 
    40      
    41     @classmethod 
    42     def parse(cls, obj): 
    43         """Parse from input object and return new XACML object""" 
    44         reader = cls() 
    45         return reader(obj) 
    4635     
    4736    @staticmethod 
     
    6049             
    6150        return elem 
    62                      
    63      
    64 class RuleReader(object): 
    65     def __call__(self, obj): 
    66         pass 
     51          
     52# Set up new class as an abstract base itself              
     53AbstractReader.register(EtreeAbstractReader) 
    6754 
    68 #AbstractReader.register(RuleReader) 
    6955 
    7056class VariableDefinitionReader(object): 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/etree/targetreader.py

    r6733 r6734  
    1 ''' 
    2 Created on 16 Mar 2010 
     1"""NDG Security XACML ElementTree based Target Element reader  
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import XMLParseError 
     13from ndg.security.common.authz.xacml.target import Target 
    714from ndg.security.common.authz.xacml.action import Action 
    815from ndg.security.common.authz.xacml.resource import Resource 
    916from ndg.security.common.authz.xacml.subject import Subject 
    1017from ndg.security.common.authz.xacml.environment import Environment 
    11 from ndg.security.common.authz.xacml.etree.reader import AbstractReader 
     18from ndg.security.common.authz.xacml.parsers.etree import QName 
     19from ndg.security.common.authz.xacml.parsers.etree.reader import \ 
     20    EtreeAbstractReader 
    1221 
    1322 
    14 class TargetReader(AbstractReader): 
     23class TargetReader(EtreeAbstractReader): 
    1524    """ElementTree based parser for XACML Target elements""" 
    1625     
     
    4453            else: 
    4554                raise XMLParseError("XACML Target child element name %r not " 
    46                                     "recognised" % localName)        
     55                                    "recognised" % localName)       
     56                 
     57        return target  
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/parsers/etree/writer.py

    r6730 r6734  
    1 ''' 
    2 Created on 15 Mar 2010 
     1"""NDG Security XACML ElementTree writer base module  
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "16/03/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/pdp.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security Policy Decision Point type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
     12 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/pip.py

    r6643 r6734  
    1 ''' 
    2 Created on 25 Feb 2010 
     1"""NDG Security Policy Information Point type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/policy.py

    r6731 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
    3  
    4 @author: pjkersha 
    5 ''' 
     1"""NDG Security Policy type definition 
     2 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "24/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.utils import TypedList 
    713from ndg.security.common.authz.xacml import PolicyComponent 
     14from ndg.security.common.authz.xacml.target import Target 
    815from ndg.security.common.authz.xacml.rule import Rule 
    916from ndg.security.common.authz.xacml.obligation import Obligation 
     
    147154        return self.__obligations  
    148155 
    149     def _getTargets(self): 
    150         return self.__targets 
    151  
    152     def _setTargets(self, value): 
    153         if (not isinstance(value, TypedList) and  
    154             not issubclass(value.elementType, Target.__class__)): 
    155             raise TypeError('Expecting TypedList(Target) for "targets" ' 
    156                             'attribute; got %r' % type(value)) 
    157         self.__targets = value 
    158  
    159     targets = property(_getTargets, _setTargets,  
    160                        doc="list of Policy targets") 
     156    def _getTarget(self): 
     157        return self.__target 
     158 
     159    def _setTarget(self, value): 
     160        if not isinstance(value, Target): 
     161            raise TypeError('Expecting Target for "target" ' 
     162                            'attribute; got %r' % type(value)) 
     163        self.__target = value 
     164 
     165    target = property(_getTarget, _setTarget, doc="list of Policy targets") 
    161166 
    162167    def _getDescription(self): 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/resource.py

    r6731 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security Resource type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "24/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import RequestPropertyBase 
    713from ndg.security.common.authz.xacml.match import ResourceMatch 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/rule.py

    r6643 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security Rule type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.utils import TypedList 
    713from ndg.security.common.authz.xacml import PolicyComponent 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/subject.py

    r6731 r6734  
    1 ''' 
    2 Created on 24 Feb 2010 
     1"""NDG Security Subject type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "24/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612from ndg.security.common.authz.xacml import RequestPropertyBase 
    713from ndg.security.common.authz.xacml.match import SubjectMatch 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/target.py

    r6731 r6734  
    55''' 
    66from ndg.security.common.utils import TypedList 
     7"""NDG Security Target type definition 
     8 
     9NERC DataGrid Project 
     10""" 
     11__author__ = "P J Kershaw" 
     12__date__ = "25/02/10" 
     13__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     14__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     15__license__ = "BSD - see LICENSE file in top-level directory" 
     16__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     17__revision__ = "$Id: $" 
    718from ndg.security.common.authz.xacml import PolicyComponent 
    819from ndg.security.common.authz.xacml.action import Action 
     
    1526    ELEMENT_LOCAL_NAME = "Target" 
    1627     
    17     __slots__ = ('__actions', '_resources', '__actions', '__environments') 
     28    __slots__ = ('__actions', '__resources', '__actions', '__environments') 
    1829     
    1930    def __init__(self): 
    2031        self.__actions = TypedList(Subject) 
    2132        self.__resources = TypedList(Resource) 
    22         self.__actions = TypedList(Actions) 
     33        self.__actions = TypedList(Action) 
    2334        self.__environments = TypedList(Environment) 
    2435     
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/variabledefinition.py

    r6731 r6734  
    1 ''' 
    2 Created on 16 Mar 2010 
     1"""NDG Security Variable Definition type definition 
    32 
    4 @author: pjkersha 
    5 ''' 
     3NERC DataGrid Project 
     4""" 
     5__author__ = "P J Kershaw" 
     6__date__ = "25/02/10" 
     7__copyright__ = "(C) 2010 Science and Technology Facilities Council" 
     8__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     9__license__ = "BSD - see LICENSE file in top-level directory" 
     10__contact__ = "Philip.Kershaw@stfc.ac.uk" 
     11__revision__ = "$Id: $" 
    612 
    713class VariableDefinition(object): 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/authz/xacml/test_xacml.py

    r6731 r6734  
    77from os import path 
    88 
    9 from ndg.security.common.authz.xacml.etree.parsers.policyreader import PolicyReader 
     9from ndg.security.common.authz.xacml.parsers.etree.policyreader import \ 
     10    PolicyReader 
    1011 
    1112class XACMLTestCase(unittest.TestCase): 
Note: See TracChangeset for help on using the changeset viewer.