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

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

 1  """NDG Security Context handler interface definition 
 2   
 3  NERC DataGrid 
 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:$" 
12  from abc import ABCMeta, abstractmethod 
13 14 15 -class CtxHandlerInterface(object):
16 """Context Handler interface.""" 17 __metaclass__ = ABCMeta 18 __slots__ = () 19 20 @abstractmethod
21 - def handlePEPRequest(self, pepRequest):
22 """Handle request from Policy Enforcement Point 23 24 @param pepRequest: request from PEP, derived class determines its type 25 e.g. SAML AuthzDecisionQuery 26 @type pepRequest: type 27 @return: PEP response - derived class determines type 28 @rtype: None 29 """ 30 raise NotImplementedError()
31
32 - def pipQuery(self, request, designator):
33 """Query a Policy Information Point to retrieve the attribute values 34 corresponding to the specified input designator. Optionally, update the 35 requestCtx. This could be a subject, environment or resource. Matching 36 attributes values are returned 37 38 @param request: request context 39 @type request: ndg.xacml.core.context.request.Request 40 @param designator: designator requiring additional subject attribute 41 information 42 @type designator: ndg.xacml.core.expression.Expression derived type 43 @return: list of attribute values for subject corresponding to given 44 policy designator 45 @rtype: list 46 """ 47 return []
48