Package ndg :: Package xacml :: Package core :: Module policyset :: Class PolicySet
[hide private]

Class PolicySet

source code

       object --+        
                |        
    XacmlCoreBase --+    
                    |    
policybase.PolicyBase --+
                        |
                       PolicySet

XACML Policy Set

Nested Classes [hide private]

Inherited from policybase.PolicyBase: __metaclass__

Instance Methods [hide private]
 
__init__(self, policyCombiningAlgFactory=None)
Constructor
source code
NoneType / ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgClassFactory
_getPolicyCombiningAlgFactory(self)
Returns: policy combining algorithm factory
source code
 
_setPolicyCombiningAlgFactory(self, value) source code
NoneType / basestring
_getPolicySetId(self)
Returns: policy set id
source code
 
_setPolicySetId(self, value) source code
NoneType / basestring
_getVersion(self)
Returns: policy set version
source code
 
_setVersion(self, value) source code
NoneType / basestring
_getPolicyCombiningAlgId(self)
Returns: policy combining algorithm ID
source code
 
_setPolicyCombiningAlgId(self, value) source code
 
_setPolicyCombiningAlgFromId(self)
Set the policy combining algorithm implementation from the Id set in __policyCombiningAlgId the attribute
source code
NoneType / ndg.xacml.core.target.Target
_getTarget(self)
Returns: target element
source code
 
_setTarget(self, value) source code
NoneType / basestring
_getDescription(self)
Returns: policy description text
source code
 
_setDescription(self, value) source code
NoneType / ndg.xacml.core.policydefaults.PolicyDefaults
_getPolicySetDefaults(self)
Returns: policy set defaults
source code
 
_setPolicySetDefaults(self, value) source code
ndg.xacml.core.context.result.Decision
evaluateCombiningAlgorithm(self, context)
Evaluates the policy combining algorithm for this policy set.
source code

Inherited from policybase.PolicyBase: evaluate, evaluateResponse

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 Methods [hide private]
ndg.xacml.core.policy.Policy
fromSource(cls, source, readerFactory)
Create a new policy from the input source parsing it using a reader from the required reader factory e.g.
source code

Inherited from policybase.PolicyBase: fromNestedSource

Class Variables [hide private]
string DEFAULT_XACML_VERSION = '2.0'
default is 2.0
NoneType but implement as string in derived classes ELEMENT_LOCAL_NAME = 'PolicySet'
XML element local name for the given type
string POLICY_SET_ID_ATTRIB_NAME = 'PolicySetId'
policy set id XML attribute name
string POLICY_COMBINING_ALG_ID_ATTRIB_NAME = 'PolicyCombiningAlgId'
policy combining algorithm id XML attribute name
string VERSION_ATTRIB_NAME = 'Version'
version XML attribute name
string DESCRIPTION_LOCAL_NAME = 'Description'
description XML element local name
string POLICY_SET_DEFAULTS_LOCAL_NAME = 'PolicySetDefaults'
policy set defaults XML element local name
string COMBINER_PARAMETERS_LOCAL_NAME = 'CombinerParameters'
combiner parameter XML element local name
string POLICY_COMBINER_PARAMETERS_LOCAL_NAME = 'PolicyCombinerParamet...
policy combiner parameter XML element local name
string POLICY_SET_COMBINER_PARAMETERS_LOCAL_NAME = 'PolicySetCombiner...
policy set combiner parameter XML element local name
string OBLIGATIONS_LOCAL_NAME = 'Obligations'
obligations XML element local name
  POLICY_SET_ID_REFERENCE = 'PolicySetIdReference'
  __abstractmethods__ = frozenset([])

Inherited from XacmlCoreBase: XACML_1_0_NS_PREFIX, XACML_2_0_NS_PREFIX, XMLNS

Instance Variables [hide private]
NoneType / basestring __description
policy decription text
ndg.xacml.utils.TypedList __obligations
obligations
ndg.xacml.utils.TypedList __policies
list of policies and/or policy sets
NoneType / ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgInterface __policyCombiningAlg
policy combining algorithm
ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgClassFactory __policyCombiningAlgFactory
policy combining algorithm factory
NoneType / basestring __policyCombiningAlgId
policy combining algorithm ID
NoneType / basestring __policySetId
policy set id
NoneType / ndg.xacml.core.target.Target __target
target element
NoneType / basestring __version
policy version
Properties [hide private]
  policyCombiningAlgFactory
Policy Combining Algorithm Factory
ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgInterface derived type policyCombiningAlg
Policy Combining algorithm
  policySetId
Policy Set Id
  ident
Policy Set Id
  version
Policy Set Version
  policyCombiningAlgId
Policy Combining Algorithm Id
  combinerParameters
  policyCombinerParameters
  variableDefinitions
ndg.xacml.utils.TypedList policies
Return the list of policies / policy sets
ndg.xacml.utils.TypedList obligations
  target
list of Policy targets
  description
Policy Description text
  policySetDefaults
Policy Set PolicyDefaults element
  __policySetDefaults

Inherited from XacmlCoreBase: elem, isValidXmlns, xmlns

Inherited from object: __class__

Method Details [hide private]

__init__(self, policyCombiningAlgFactory=None)
(Constructor)

source code 

Constructor

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

fromSource(cls, source, readerFactory)
Class Method

source code 

Create a new policy from the input source parsing it using a reader from the required reader factory e.g. ETreeReaderFactory to use ElementTree based parsing

Parameters:
  • source (string, file, XML node type) - source from which to read the policy - file path, file object, XML node or other dependent on the reader factory selected
  • readerFactory (ndg.xacml.parsers.AbstractReaderFactory) - factory class returns reader class used to parse the policy
Returns: ndg.xacml.core.policy.Policy
new policy instance
Overrides: policybase.PolicyBase.fromSource

_getPolicyCombiningAlgFactory(self)

source code 
Returns: NoneType / ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgClassFactory
policy combining algorithm factory

_setPolicyCombiningAlgFactory(self, value)

source code 
Parameters:
  • value (ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgClassFactory) - policy combining algorithm factory
Raises:
  • TypeError - incorrect input type

_getPolicySetId(self)

source code 
Returns: NoneType / basestring
policy set id

_setPolicySetId(self, value)

source code 
Parameters:
  • value (basestring) - policy set id
Raises:
  • TypeError - incorrect input type

_getVersion(self)

source code 
Returns: NoneType / basestring
policy set version

_setVersion(self, value)

source code 
Parameters:
  • value (basestring) - policy set version
Raises:
  • TypeError - incorrect input type

_getPolicyCombiningAlgId(self)

source code 
Returns: NoneType / basestring
policy combining algorithm ID

_setPolicyCombiningAlgId(self, value)

source code 
Parameters:
  • value (NoneType / basestring) - policy combining algorithm ID
Raises:
  • TypeError - incorrect input type

_setPolicyCombiningAlgFromId(self)

source code 

Set the policy combining algorithm implementation from the Id set in __policyCombiningAlgId the attribute

Raises:

_getTarget(self)

source code 
Returns: NoneType / ndg.xacml.core.target.Target
target element

_setTarget(self, value)

source code 
Parameters:
  • value (ndg.xacml.core.target.Target) - target element
Raises:
  • TypeError - incorrect input type

_getDescription(self)

source code 
Returns: NoneType / basestring
policy description text

_setDescription(self, value)

source code 
Parameters:
  • value (basestring) - policy description text
Raises:
  • TypeError - incorrect input type

_getPolicySetDefaults(self)

source code 
Returns: NoneType / ndg.xacml.core.policydefaults.PolicyDefaults
policy set defaults

_setPolicySetDefaults(self, value)

source code 
Parameters:
  • value (ndg.xacml.core.policydefaults.PolicyDefaults) - policy set defaults
Raises:
  • TypeError - incorrect input type

evaluateCombiningAlgorithm(self, context)

source code 

Evaluates the policy combining algorithm for this policy set.

Parameters:
  • context (ndg.xacml.core.request.Request) - the request context
Returns: ndg.xacml.core.context.result.Decision
result of the evaluation - the decision for this policy set
Overrides: policybase.PolicyBase.evaluateCombiningAlgorithm

Class Variable Details [hide private]

POLICY_COMBINER_PARAMETERS_LOCAL_NAME

policy combiner parameter XML element local name
Type:
string
Value:
'PolicyCombinerParameters'

POLICY_SET_COMBINER_PARAMETERS_LOCAL_NAME

policy set combiner parameter XML element local name
Type:
string
Value:
'PolicySetCombinerParameters'

Property Details [hide private]

policyCombiningAlgFactory

Policy Combining Algorithm Factory

Get Method:
_getPolicyCombiningAlgFactory(self) - Returns: policy combining algorithm factory
Set Method:
_setPolicyCombiningAlgFactory(self, value)

policyCombiningAlg

Policy Combining algorithm

Get Method:
unreachable.policyCombiningAlg(self) - Policy Combining algorithm
Type:
ndg.xacml.core.policy_combining_alg.PolicyCombiningAlgInterface derived type

policySetId

Policy Set Id

Get Method:
_getPolicySetId(self) - Returns: policy set id
Set Method:
_setPolicySetId(self, value)

ident

Policy Set Id

Get Method:
_getPolicySetId(self) - Returns: policy set id

version

Policy Set Version

Get Method:
_getVersion(self) - Returns: policy set version
Set Method:
_setVersion(self, value)

policyCombiningAlgId

Policy Combining Algorithm Id

Get Method:
_getPolicyCombiningAlgId(self) - Returns: policy combining algorithm ID
Set Method:
_setPolicyCombiningAlgId(self, value)

combinerParameters

Get Method:
unreachable.combinerParameters(self)

policyCombinerParameters

Get Method:
unreachable.policyCombinerParameters(self)

variableDefinitions

Get Method:
unreachable.variableDefinitions(self)

policies

Return the list of policies / policy sets

Get Method:
unreachable.policies(self) - Return the list of policies / policy sets
Type:
ndg.xacml.utils.TypedList

obligations

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

target

list of Policy targets

Get Method:
_getTarget(self) - Returns: target element
Set Method:
_setTarget(self, value)

description

Policy Description text

Get Method:
_getDescription(self) - Returns: policy description text
Set Method:
_setDescription(self, value)

policySetDefaults

Policy Set PolicyDefaults element

Get Method:
_getPolicySetDefaults(self) - Returns: policy set defaults
Set Method:
_setPolicySetDefaults(self, value)