Changeset 6586 for TI12-security/trunk/NDGSecurity
- Timestamp:
- 19/02/10 11:29:39 (11 years ago)
- Location:
- TI12-security/trunk/NDGSecurity/python
- Files:
-
- 1 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/msi.py
r6069 r6586 815 815 PIP = NdgPIP 816 816 817 817 818 818 class PDP(object): 819 819 """Policy Decision Point""" -
TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/__init__.py
r6069 r6586 689 689 id = None 690 690 691 691 692 class DenyOverrides(RuleCombiningAlg): 692 693 '''Deny-overrides: If any rule evaluates to Deny, then the final 693 694 authorization decision is also Deny.''' 694 695 id = 'Deny-overrides' 696 695 697 696 698 class OrderedDenyOverrides(RuleCombiningAlg): … … 700 702 id = 'Ordered-deny-overrides' 701 703 704 702 705 class PermitOverrides(RuleCombiningAlg): 703 706 '''Permit-overrides: If any rule evaluates to Permit, then the final 704 707 authorization decision is also Permit.''' 708 705 709 706 710 class OrderedPermitOverrides(RuleCombiningAlg): … … 710 714 id = 'Ordered-permit-overrides' 711 715 716 712 717 class FirstApplicable(RuleCombiningAlg): 713 718 '''First-applicable: The result of the first relevant rule encountered is … … 795 800 raise NotImplementedError() 796 801 797 def getSubjectAttribute(self, type, id, category): 798 '''Returns available subject attribute value(s) ignoring the issuer. 799 800 @param type the type of the attribute value(s) to find 801 @param id the id of the attribute value(s) to find 802 @param category the category the attribute value(s) must be in 803 804 @return a result containing a bag either empty because no values were 805 found or containing at least one value, or status associated with an 806 Indeterminate result''' 807 raise NotImplementedError() 808 809 def getSubjectAttribute(self, type, id, issuer, category): 802 def getSubjectAttribute(self, type, id, issuer=None, category=None): 810 803 '''Returns available subject attribute value(s). 811 804 -
TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/authz/xacml/cond/factory.py
r5395 r6586 294 294 self.functionMap[functionId] = function 295 295 296 297 296 def addAbstractFunction(self, proxy, functionId): 298 297 '''Adds the abstract function proxy to the factory. This is used for … … 330 329 return functions 331 330 332 333 331 def createFunction(self, identity): 334 332 '''Tries to get an instance of the specified function. … … 354 352 raise UnknownIdentifierException("functions of type [%s] are not " 355 353 "supported by this factory" % 356 identity) 357 354 identity) 358 355 359 356 def createAbstractFunction(self, identity, root): -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/attributeauthority.py
r6069 r6586 17 17 from ndg.security.server.wsgi.zsi import SOAPBindingMiddleware 18 18 19 19 20 class AttributeAuthorityMiddleware(NDGSecurityMiddlewareBase): 20 21 '''WSGI to add an NDG Security Attribute Authority in the environ. This 21 enables multiple WSG ifilters to access the same underlying Attribute22 enables multiple WSGI filters to access the same underlying Attribute 22 23 Authority instance e.g. provide SAML SOAP and WSDL SOAP based interfaces 23 24 to the same Attribute Authority -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/saml/__init__.py
r6584 r6586 215 215 'environ') 216 216 217 contentLength = int(contentLength) 217 contentLength = int(contentLength) 218 218 soapRequestTxt = soapRequestStream.read(contentLength) 219 219 -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/wssecurity.py
r6069 r6586 33 33 Overload pathMatch lambda so that it is more inclusive: the default is 34 34 for all paths to be processed by the handlers""" 35 pathMatch = lambda self, environ: environ['PATH_INFO'].startswith(self.path) 35 def pathMatch(self, environ): 36 if environ['PATH_INFO'].endswith('/'): 37 path == environ['PATH_INFO'] 38 else: 39 path = environ['PATH_INFO'] + '/' 40 41 return path == self.path 36 42 37 43 … … 189 195 def __call__(self, environ, start_response): 190 196 '''Verify message signature''' 191 if not SignatureVerificationFilter.isSOAPMessage(environ) or \192 not self.pathMatch(environ) :197 if (not SignatureVerificationFilter.isSOAPMessage(environ) or 198 not self.pathMatch(environ)): 193 199 log.debug("SignatureVerificationFilter.__call__: Non-SOAP " 194 200 "request or path doesn't match SOAP endpoint specified " -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/zsi.py
r6440 r6586 91 91 self._app = app 92 92 self.__charset = ZSIMiddleware.DEFAULT_CHARSET 93 self.__path = None93 self.__path = '/' 94 94 self.__referencedFilterKeys = None 95 95 self.__publishedURI = None … … 199 199 pathOptName = prefix + ZSIMiddleware.PATH_OPTNAME 200 200 if pathOptName in app_conf: 201 if app_conf[pathOptName] != '/':202 self.path = app_conf[pathOptName] .rstrip('/')201 if not app_conf[pathOptName].endswith('/'): 202 self.path = app_conf[pathOptName] + '/' 203 203 else: 204 204 self.path = app_conf[pathOptName] 205 else:206 self.path = '/'207 205 208 206 # This flag if set to True causes this handler to call the -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/config/attributeauthority/sitea/site-a.ini
r6584 r6586 13 13 attributeAuthorityEnvironKeyName = attribute-authority 14 14 attributeQueryInterfaceEnvironKeyName = attributeQueryInterface 15 attributeAuthoritySoapWsdlServicePath = /AttributeAuthority 15 16 16 17 [server:main] … … 93 94 94 95 service.soap.binding.referencedFilters = wsseSignatureVerificationFilter01 95 service.soap.binding.path = /AttributeAuthority96 service.soap.binding.path = %(attributeAuthoritySoapWsdlServicePath)s 96 97 service.soap.binding.enableWSDLQuery = True 97 98 service.soap.binding.charset = utf-8 … … 107 108 prefix = saml.soapbinding. 108 109 109 saml.soapbinding.serialise = saml.xml.etree:ResponseElementTree.toXML110 110 saml.soapbinding.deserialise = saml.xml.etree:AttributeQueryElementTree.fromXML 111 112 # Specialisation to incorporate ESG Group/Role type 113 saml.soapbinding.serialise = ndg.security.common.saml_utils.esg.xml.etree:EsgResponseElementTree.toXML 114 111 115 saml.soapbinding.pathMatchList = /AttributeAuthority/saml 112 116 saml.soapbinding.queryInterfaceKeyName = %(attributeQueryInterfaceEnvironKeyName)s … … 116 120 paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:SignatureVerificationFilter.filter_app_factory 117 121 filterID = wsseSignatureVerificationFilter01 122 path = %(attributeAuthoritySoapWsdlServicePath)s 118 123 119 124 # Settings for WS-Security SignatureHandler class used by this filter … … 125 130 [filter:wsseSignatureFilter] 126 131 paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:ApplySignatureFilter.filter_app_factory 132 path = %(attributeAuthoritySoapWsdlServicePath)s 127 133 128 134 # Reference the verification filter in order to be able to apply signature -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/myproxy/certificate_extapp/config.ini
r6584 r6586 12 12 connectionString = sqlite:///$NDGSEC_TEST_CONFIG_DIR/user.db 13 13 openIdSqlQuery = select openid from users where username = '${username}' 14 attributeAuthorityURI = https://localhost:5443/AttributeAuthority/saml 14 #attributeAuthorityURI = https://localhost:5443/AttributeAuthority/saml 15 attributeAuthorityURI = http://localhost:5000/AttributeAuthority/saml 15 16 attributeQuery.subjectIdFormat = urn:esg:openid 16 17 attributeQuery.issuerName = /O=Site A/CN=Authorisation Service
Note: See TracChangeset
for help on using the changeset viewer.