Package ndg :: Package xacml :: Package core :: Module target :: Class Target
[hide private]

Class Target

source code

   object --+    
            |    
XacmlCoreBase --+
                |
               Target

XACML Target element

Instance Methods [hide private]
 
__init__(self)
Initial attributes
source code
bool
match(self, request)
Generic method to match a <Target> element to the request context
source code
bool
_matchChild(self, targetChild, request)
Match a request child element (a <Subject>, <Resource>, <Action> or <Environment>) with the corresponding target's <Subject>, <Resource>, <Action> or <Environment>.
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 = 'Target'
XML element local name for the given type
string SUBJECTS_ELEMENT_LOCAL_NAME = 'Subjects'
XML local name for the subjects element
string ACTIONS_ELEMENT_LOCAL_NAME = 'Actions'
XML local name for the actions element
string RESOURCES_ELEMENT_LOCAL_NAME = 'Resources'
XML local name for the resources element
string ENVIRONMENTS_ELEMENT_LOCAL_NAME = 'Environments'
XML local name for the environments element
tuple CHILD_ATTRS = ('subjects', 'resources', 'actions', 'environmen...
list of the XML child element names for <Target/>

Inherited from XacmlCoreBase: XACML_1_0_NS_PREFIX, XACML_2_0_NS_PREFIX, XMLNS

Instance Variables [hide private]
ndg.xacml.utils.TypedList __actions
list of actions for this target
ndg.xacml.utils.TypedList __environments
list of environment settings for this target
ndg.xacml.utils.TypedList __resources
list of resources for this target
ndg.xacml.utils.TypedList __subjects
list of subjects for this target
Properties [hide private]
ndg.xacml.utils.TypedList subjects
Get subjects
ndg.xacml.utils.TypedList resources
Get resources
ndg.xacml.utils.TypedList actions
Get actions
ndg.xacml.utils.TypedList environments
Get environments

Inherited from XacmlCoreBase: elem, isValidXmlns, xmlns

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initial attributes

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

match(self, request)

source code 

Generic method to match a <Target> element to the request context

Parameters:
  • request (ndg.xacml.core.context.request.Request) - XACML request context
Returns: bool
True if request context matches the given target, False otherwise

_matchChild(self, targetChild, request)

source code 

Match a request child element (a <Subject>, <Resource>, <Action> or <Environment>) with the corresponding target's <Subject>, <Resource>, <Action> or <Environment>.

Parameters:
  • targetChild (ndg.xacml.core.TargetChildBase) - Target Subject, Resource, Action or Environment object
  • request (ndg.xacml.core.context.request.Request) - Request context object
Returns: bool
True if request context matches something in the target
Raises:

Class Variable Details [hide private]

CHILD_ATTRS

list of the XML child element names for <Target/>
Type:
tuple
Value:
('subjects', 'resources', 'actions', 'environments')

Property Details [hide private]

subjects

Get subjects

Get Method:
unreachable.subjects(self) - Get subjects
Type:
ndg.xacml.utils.TypedList

resources

Get resources

Get Method:
unreachable.resources(self) - Get resources
Type:
ndg.xacml.utils.TypedList

actions

Get actions

Get Method:
unreachable.actions(self) - Get actions
Type:
ndg.xacml.utils.TypedList

environments

Get environments

Get Method:
unreachable.environments(self) - Get environments
Type:
ndg.xacml.utils.TypedList