Package ndg :: Package xacml :: Package core :: Module match :: Class MatchBase
[hide private]

Class MatchBase

source code

   object --+    
            |    
XacmlCoreBase --+
                |
               MatchBase
Known Subclasses:

Base class for representation of SubjectMatch, ResourceMatch, ActionMatch and EnvironmentMatch Target elements

Instance Methods [hide private]
 
__init__(self)
Initial attributes corresponding to the equivalent XACML schema type and also create a function map to map functions from MatchIds
source code
NoneType / basestring
_getMatchId(self)
Match identifier for match function
source code
 
_setMatchId(self, value)
Match identifier for match function
source code
 
setFunctionFromMap(self, functionMap)
Set the function from a function map - a dictionary of function ID to function mappings.
source code
bool
evaluate(self, context)
Evaluate the match object against the relevant element in the request context
source code

Inherited from XacmlCoreBase: __getstate__

Inherited from XacmlCoreBase (private): _getXmlns, _setXmlns

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
NoneType but implement as string in derived classes ELEMENT_LOCAL_NAME = None
XML element local name for the given type
string MATCH_ID_ATTRIB_NAME = 'MatchId'
XML attribute name for match ID
string ATTRIBUTE_VALUE_ELEMENT_LOCAL_NAME = 'AttributeValue'
XML Local Name of attribute value child element

Inherited from XacmlCoreBase: XACML_1_0_NS_PREFIX, XACML_2_0_NS_PREFIX, XMLNS

Instance Variables [hide private]
ndg.xacml.core.attributedesignator.AttributeDesignator __attributeDesignator
attribute designator - only a designator or selector may be set for a given instance not both
ndg.xacml.core.attributeselector.AttributeSelector __attributeSelector
attribute selector - only a designator or selector may be set for a given instance not both
ndg.xacml.core.attributevalue.AttributeValue __attributeValue
attribute value associated with this match
ndg.xacml.core.functions.AbstractFunction derived type __function
function to be applied
ndg.xacml.core.functions.FunctionMap __functionMap
function mapping object to map URNs to function class implementations
bool __loadFunctionFromId
boolean determines whether or not to load function classes for given function URN in functionId set property method
NoneType / basestring __matchId
match identifier
Properties [hide private]
ndg.xacml.core.attributevalue.Attribute attributeValue
Match attribute value
ndg.xacml.core.attributedesignator.AttributeDesignator attributeDesignator
ndg.xacml.core.attributeselector.AttributeSelector attributeSelector
  matchId
Match identifier for match function
bool loadFunctionFromId
Set to False to stop the functionId property set method automatically trying to load the corresponding function for the given functionId
ndg.xacml.core.functions.FunctionMap functionMap
functionMap object for PDP to retrieve functions from given XACML function URNs
ndg.xacml.core.functions.AbstractFunction derived type function
Function for this <Apply> instance

Inherited from XacmlCoreBase: elem, isValidXmlns, xmlns

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initial attributes corresponding to the equivalent XACML schema type and also create a function map to map functions from MatchIds

Raises:
  • NotImplementedError - derived classes must set ELEMENT_LOCAL_NAME to a string
Overrides: object.__init__

_getMatchId(self)

source code 

Match identifier for match function

Returns: NoneType / basestring
match identifier

_setMatchId(self, value)

source code 

Match identifier for match function

Parameters:
  • value (basestring) - match identifier
Raises:
  • TypeError - if incorrect input type

setFunctionFromMap(self, functionMap)

source code 

Set the function from a function map - a dictionary of function ID to function mappings. The function is looked up based on the "functionId" attribute. This method is automatically called when the functionId set property method is invoked. To switch off this behaviour set

loadFunctionFromId = False

Parameters:
  • functionMap (dict like object) - mapping of function URNs to function classes
Raises:

evaluate(self, context)

source code 

Evaluate the match object against the relevant element in the request context

Parameters:
  • context (ndg.xacml.core.context.request.Request) - the request context
Returns: bool
match status

Property Details [hide private]

attributeValue

Match attribute value

Get Method:
unreachable.attributeValue(self) - Match attribute value
Set Method:
unreachable.attributeValue(self, value) - Set match attribute value.
Type:
ndg.xacml.core.attributevalue.Attribute

attributeDesignator

Get Method:
unreachable.attributeDesignator(self) - Returns: attribute designator - only a designator or selector may be set for a given instance not both
Set Method:
unreachable.attributeDesignator(self, value) - Set match attribute designator.
Type:
ndg.xacml.core.attributedesignator.AttributeDesignator

attributeSelector

Get Method:
unreachable.attributeSelector(self) - Returns: attribute selector
Set Method:
unreachable.attributeSelector(self, value) - Set match attribute selector.
Type:
ndg.xacml.core.attributeselector.AttributeSelector

matchId

Match identifier for match function

Get Method:
_getMatchId(self) - Match identifier for match function
Set Method:
_setMatchId(self, value) - Match identifier for match function

loadFunctionFromId

Set to False to stop the functionId property set method automatically trying to load the corresponding function for the given functionId

Get Method:
unreachable.loadFunctionFromId(self) - Set to False to stop the functionId property set method automatically trying to load the corresponding function for the given functionId
Set Method:
unreachable.loadFunctionFromId(self, value)
Type:
bool

functionMap

functionMap object for PDP to retrieve functions from given XACML function URNs

Get Method:
unreachable.functionMap(self) - functionMap object for PDP to retrieve functions from given XACML function URNs
Set Method:
unreachable.functionMap(self, value) - functionMap object for PDP to retrieve functions from given XACML function URNs
Type:
ndg.xacml.core.functions.FunctionMap

function

Function for this <Apply> instance

Get Method:
unreachable.function(self) - Function for this <Apply> instance
Type:
ndg.xacml.core.functions.AbstractFunction derived type