Package ndg :: Package saml :: Package saml2 :: Package binding :: Package soap :: Package server :: Package wsgi :: Module queryinterface :: Class SOAPQueryInterfaceMiddleware
[hide private]

Class SOAPQueryInterfaceMiddleware

source code


Implementation of SAML 2.0 SOAP Binding for Query/Request Binding

Instance Methods [hide private]
 
__init__(self, app)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
initialise(self, global_conf, prefix='', **app_conf)
Set attributes from keyword dictionaries global and or app_conf
source code
 
_getSerialise(self) source code
 
_setSerialise(self, value) source code
 
_getDeserialise(self) source code
 
_setDeserialise(self, value) source code
 
_getDeserialiseXacmlProfile(self) source code
 
_setDeserialiseXacmlProfile(self, value) source code
 
_getIssuer(self) source code
 
_setIssuer(self, value) source code
 
_getIssuerFormat(self) source code
 
_setIssuerFormat(self, value) source code
 
_getIssuerName(self) source code
 
_setIssuerName(self, value) source code
 
_getVerifyTimeConditions(self) source code
 
_setVerifyTimeConditions(self, value) source code
 
_getVerifySAMLVersion(self) source code
 
_setVerifySAMLVersion(self, value) source code
 
_getClockSkewTolerance(self) source code
 
_setClockSkewTolerance(self, value) source code
 
_getSamlVersion(self) source code
 
_setSamlVersion(self, value) source code
 
_getMountPath(self) source code
 
_setMountPath(self, value) source code
 
_getQueryInterfaceKeyName(self) source code
 
_setQueryInterfaceKeyName(self, value) source code
 
__call__(self, environ, start_response)
Check for and parse a SOAP SAML Attribute Query and return a SAML Response
source code
 
_validateQuery(self, query, response)
Checking incoming query issue instant and version
source code
 
_verifyQueryTimeConditions(self, query, response)
Checking incoming query issue instant
source code
 
_verifyQuerySAMLVersion(self, query, response)
Checking incoming query issue SAML version
source code
ndg.saml.saml2.core.Response
_initResponse(self)
Create a SAML Response object with basic settings if any have been provided at initialisation of this class - see initialise
source code

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

Class Methods [hide private]
 
filter_app_factory(cls, app, global_conf, **app_conf)
Set-up using a Paste app factory pattern.
source code

Inherited from soap.server.wsgi.middleware.SOAPMiddleware: isSOAPFaultSet, isSOAPMessage

Static Methods [hide private]

Inherited from soap.server.wsgi.middleware.SOAPMiddleware: str2Bool

Class Variables [hide private]
  log = logging.getLogger('SOAPQueryInterfaceMiddleware')
basestring PATH_OPTNAME = 'mountPath'
name of app_conf option for specifying a path or paths that this middleware will intercept and process
basestring QUERY_INTERFACE_KEYNAME_OPTNAME = 'queryInterfaceKeyName'
app_conf option name for key name used to reference the SAML query interface in environ
  DEFAULT_QUERY_INTERFACE_KEYNAME = 'ndg.security.server.wsgi.sa...
  REQUEST_ENVELOPE_CLASS_OPTNAME = 'requestEnvelopeClass'
  RESPONSE_ENVELOPE_CLASS_OPTNAME = 'responseEnvelopeClass'
  SERIALISE_OPTNAME = 'serialise'
  DESERIALISE_OPTNAME = 'deserialise'
  DESERIALISE_XACML_PROFILE_OPTNAME = 'deserialiseXacmlProfile'
  SAML_VERSION_OPTNAME = 'samlVersion'
  ISSUER_NAME_OPTNAME = 'issuerName'
  ISSUER_FORMAT_OPTNAME = 'issuerFormat'
  CLOCK_SKEW_TOLERANCE_OPTNAME = 'clockSkewTolerance'
  CONFIG_FILE_OPTNAMES = ('mountPath', 'queryInterfaceKeyName', ...

Inherited from soap.server.wsgi.middleware.SOAPMiddleware: SOAP_ACTION_ENVIRON_KEYNAME, SOAP_FAULT_SET_KEYNAME

Properties [hide private]
  serialise
callable to serialise request into XML type
  deserialise
callable to de-serialise response from XML type
  deserialiseXacmlProfile
callable to de-serialise response from XML type with XACML profile
  issuer
Name of issuing authority
  issuerFormat
Issuer format
  issuerName
Name of issuer of SAML Query Response
  verifyTimeConditions
Set to True to verify any time Conditions set in the returned response assertions
  verifySAMLVersion
Set to True to verify the SAML version set in the query against the SAML Version set in the "samlVersion" attribute
  clockSkewTolerance
Set a tolerance of +/- n seconds to allow for clock skew when checking the timestamps of client queries
  samlVersion
SAML Version to enforce for incoming queries.
  mountPath
URL path to mount this application equivalent to environ['PATH_INFO'] (Nb.
  queryInterfaceKeyName
environ key name for Attribute Query interface

Inherited from object: __class__

Method Details [hide private]

__init__(self, app)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • app (callable following WSGI interface) - next middleware application in the chain
  • DEFAULT_QUERY_INTERFACE_KEYNAME (basestring) - default key name for referencing SAML query interface in environ
Overrides: object.__init__

initialise(self, global_conf, prefix='', **app_conf)

source code 

Set attributes from keyword dictionaries global and or app_conf

Parameters:
  • global_conf (dict) - PasteDeploy global configuration dictionary
  • prefix (basestring) - prefix for configuration items
  • app_conf (dict) - PasteDeploy application specific configuration dictionary
Overrides: soap.server.wsgi.middleware.SOAPMiddleware.initialise

_setMountPath(self, value)

source code 
Parameters:
  • value (basestring) - URL paths to apply this middleware to. Paths are relative to the point at which this middleware is mounted as set in environ['PATH_INFO']
Raises:
  • TypeError - incorrect input type

filter_app_factory(cls, app, global_conf, **app_conf)
Class Method

source code 

Set-up using a Paste app factory pattern. Set this method to avoid possible conflicts from multiple inheritance

Parameters:
  • app (callable following WSGI interface) - next middleware application in the chain
  • global_conf (dict) - PasteDeploy global configuration dictionary
  • prefix (basestring) - prefix for configuration items
  • app_conf (dict) - PasteDeploy application specific configuration dictionary
Overrides: soap.server.wsgi.middleware.SOAPMiddleware.filter_app_factory

__call__(self, environ, start_response)
(Call operator)

source code 

Check for and parse a SOAP SAML Attribute Query and return a SAML Response

Parameters:
  • environ (dict) - WSGI environment variables dictionary
  • start_response (function) - standard WSGI start response function

_validateQuery(self, query, response)

source code 

Checking incoming query issue instant and version

Parameters:
  • query (saml.saml2.core.SubjectQuery) - SAML subject query to be checked

_verifyQueryTimeConditions(self, query, response)

source code 

Checking incoming query issue instant

Parameters:
  • query (saml.saml2.core.SubjectQuery) - SAML subject query to be checked
Raises:

_verifyQuerySAMLVersion(self, query, response)

source code 

Checking incoming query issue SAML version

Parameters:
  • query (saml.saml2.core.SubjectQuery) - SAML subject query to be checked

_initResponse(self)

source code 

Create a SAML Response object with basic settings if any have been provided at initialisation of this class - see initialise

Returns: ndg.saml.saml2.core.Response
SAML response object

Class Variable Details [hide private]

DEFAULT_QUERY_INTERFACE_KEYNAME

Value:
'ndg.security.server.wsgi.saml.SOAPQueryInterfaceMiddleware.queryInter\
face'

CONFIG_FILE_OPTNAMES

Value:
('mountPath',
 'queryInterfaceKeyName',
 'ndg.security.server.wsgi.saml.SOAPQueryInterfaceMiddleware.queryInte\
rface',
 'requestEnvelopeClass',
 'responseEnvelopeClass',
 'serialise',
 'deserialise',
...

Property Details [hide private]

serialise

callable to serialise request into XML type

Get Method:
_getSerialise(self)
Set Method:
_setSerialise(self, value)

deserialise

callable to de-serialise response from XML type

Get Method:
_getDeserialise(self)
Set Method:
_setDeserialise(self, value)

deserialiseXacmlProfile

callable to de-serialise response from XML type with XACML profile

Get Method:
_getDeserialiseXacmlProfile(self)
Set Method:
_setDeserialiseXacmlProfile(self, value)

issuer

Name of issuing authority

Get Method:
_getIssuer(self)
Set Method:
_setIssuer(self, value)

issuerFormat

Issuer format

Get Method:
_getIssuerFormat(self)
Set Method:
_setIssuerFormat(self, value)

issuerName

Name of issuer of SAML Query Response

Get Method:
_getIssuerName(self)
Set Method:
_setIssuerName(self, value)

verifyTimeConditions

Set to True to verify any time Conditions set in the returned response assertions

Get Method:
_getVerifyTimeConditions(self)
Set Method:
_setVerifyTimeConditions(self, value)

verifySAMLVersion

Set to True to verify the SAML version set in the query against the SAML Version set in the "samlVersion" attribute

Get Method:
_getVerifySAMLVersion(self)
Set Method:
_setVerifySAMLVersion(self, value)

clockSkewTolerance

Set a tolerance of +/- n seconds to allow for clock skew when checking the timestamps of client queries

Get Method:
_getClockSkewTolerance(self)
Set Method:
_setClockSkewTolerance(self, value)

samlVersion

SAML Version to enforce for incoming queries. Defaults to version 2.0

Get Method:
_getSamlVersion(self)
Set Method:
_setSamlVersion(self, value)

mountPath

URL path to mount this application equivalent to environ['PATH_INFO'] (Nb. doesn't include server domain name or environ['SCRIPT_NAME'] setting

Get Method:
_getMountPath(self)
Set Method:
_setMountPath(self, value)

queryInterfaceKeyName

environ key name for Attribute Query interface

Get Method:
_getQueryInterfaceKeyName(self)
Set Method:
_setQueryInterfaceKeyName(self, value)