Package ndg :: Package xacml :: Package core :: Package context :: Module pdpinterface
[hide private]

Source Code for Module ndg.xacml.core.context.pdpinterface

 1  """NDG Security Policy Decision Point interface definition 
 2   
 3  NERC DataGrid 
 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: pdpinterface.py 7087 2010-06-25 11:23:09Z pjkersha $" 
12  from abc import ABCMeta, abstractmethod 
13  from ndg.xacml.core.context.request import Request 
14 15 16 -class PDPInterface(object):
17 """Interface class for XACML Policy Enforcement Point""" 18 __metaclass__ = ABCMeta 19 __slots__ = () 20 21 @abstractmethod
22 - def evaluate(self, request):
23 '''evaluate the input request and return an access control decision 24 in the returned response 25 26 @param request: XACML context request 27 @type request: ndg.xacml.core.context.request.Request 28 @return: XACML context response 29 @rtype: None (this abstract method) expecting 30 ndg.xacml.core.context.response.Response type in implementations of this 31 class 32 ''' 33 if not isinstance(request, Request): 34 raise TypeError('Expecting %r type for input request; got %r ' 35 'instead' % (Request, type(request)))
36