Changeset 7131
- Timestamp:
- 30/06/10 14:37:48 (11 years ago)
- Location:
- TI12-security/trunk/NDGSoap/ndg/soap
- Files:
-
- 6 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSoap/ndg/soap/__init__.py
r6416 r7131 1 """NDG SOAP package contains WS-Security Signature Handler and SOAP WSGI 2 middleware 1 """SOAP common package for NDG SAML. 3 2 4 NERC DataGrid Project 3 Initially for use with SAML SOAP Bindings. This itself 4 uses ElementTree. This SOAP interface provides an ElementTree interface to 5 support it 6 7 NERC DataGrid Project 5 8 """ 6 9 __author__ = "P J Kershaw" 7 __date__ = "2 6/01/2010"10 __date__ = "24/07/09" 8 11 __copyright__ = "(C) 2009 Science and Technology Facilities Council" 9 __license__ = " BSD - see LICENSE file in top-level directory"12 __license__ = "http://www.apache.org/licenses/LICENSE-2.0" 10 13 __contact__ = "Philip.Kershaw@stfc.ac.uk" 11 __revision__ = '$Id: $' 14 __revision__ = '$Id: __init__.py 7130 2010-06-30 13:33:07Z pjkersha $' 15 import logging 16 log = logging.getLogger(__name__) 17 18 class SOAPException(Exception): 19 """Base SAOP Exception class""" 20 21 class SOAPFault(SOAPException): 22 """SOAP Fault""" 23 24 class SOAPObject(object): 25 """Base class for SOAP envelope, header and body elements""" 26 27 ELEMENT_PREFIX = "SOAP-ENV" 28 SOAP11_NS = "http://schemas.xmlsoap.org/soap/envelope/" 29 SOAP12_NS = "http://www.w3.org/2003/05/soap-envelope" 30 DEFAULT_NS = SOAP11_NS 31 32 def create(self): 33 raise NotImplementedError() 34 35 def parse(self): 36 raise NotImplementedError() 37 38 def serialize(self): 39 raise NotImplementedError() 40 41 def prettyPrint(self): 42 raise NotImplementedError() 43 44 45 class SOAPEnvelopeBase(SOAPObject): 46 """SOAP Envelope""" 47 48 DEFAULT_ELEMENT_LOCAL_NAME = "Envelope" 49 DEFAULT_ELEMENT_NS = SOAPObject.DEFAULT_NS 50 DEFAULT_ELEMENT_NS_PREFIX = SOAPObject.ELEMENT_PREFIX 51 52 soapHeader = property() 53 soapBody = property() 54 55 56 class SOAPHeaderBase(SOAPObject): 57 """SOAP Header base class""" 58 59 DEFAULT_ELEMENT_LOCAL_NAME = "Header" 60 DEFAULT_ELEMENT_NS = SOAPObject.DEFAULT_NS 61 DEFAULT_ELEMENT_NS_PREFIX = SOAPObject.ELEMENT_PREFIX 62 63 class SOAPBodyBase(SOAPObject): 64 """SOAP Body base class""" 65 66 DEFAULT_ELEMENT_LOCAL_NAME = "Body" 67 DEFAULT_ELEMENT_NS = SOAPObject.DEFAULT_NS 68 DEFAULT_ELEMENT_NS_PREFIX = SOAPObject.ELEMENT_PREFIX -
TI12-security/trunk/NDGSoap/ndg/soap/client.py
r7130 r7131 5 5 __author__ = "P J Kershaw" 6 6 __date__ = "27/07/09" 7 __copyright__ = " "7 __copyright__ = "(C) 2010 Science and Technology Facilities Council" 8 8 __license__ = "http://www.apache.org/licenses/LICENSE-2.0" 9 9 __contact__ = "Philip.Kershaw@stfc.ac.uk" -
TI12-security/trunk/NDGSoap/ndg/soap/etree.py
r7130 r7131 5 5 __author__ = "P J Kershaw" 6 6 __date__ = "27/07/09" 7 __copyright__ = " "7 __copyright__ = "(C) 2010 Science and Technology Facilities Council" 8 8 __license__ = "http://www.apache.org/licenses/LICENSE-2.0" 9 9 __contact__ = "Philip.Kershaw@stfc.ac.uk" -
TI12-security/trunk/NDGSoap/ndg/soap/utils/__init__.py
r6416 r7131 1 """NDG SOAP utilities package2 3 NERC DataGrid Project4 """5 __author__ = "Philip Kershaw"6 __date__ = "25/01/2010"7 __copyright__ = "(C) 2010 Science and Technology Facilities Council"8 __license__ = "BSD - see LICENSE file in top-level directory"9 __contact__ = "Philip.Kershaw@stfc.ac.uk"10 __revision__ = '$Id: $' -
TI12-security/trunk/NDGSoap/ndg/soap/utils/etree.py
r7130 r7131 5 5 __author__ = "P J Kershaw" 6 6 __date__ = "02/04/09" 7 __copyright__ = " "7 __copyright__ = "(C) 2010 Science and Technology Facilities Council" 8 8 __license__ = "http://www.apache.org/licenses/LICENSE-2.0" 9 9 __contact__ = "Philip.Kershaw@stfc.ac.uk" -
TI12-security/trunk/NDGSoap/ndg/soap/wssecurity/__init__.py
r6417 r7131 12 12 """For WS-Security generic exceptions not covered by other exception 13 13 classes in this module""" 14 14 15 15 16 class WSSecurityConfigError(WSSecurityError): 16 17 """Configuration error with WS-Security setting or settings""" 18 19 20 class InvalidCertChain(WSSecurityError): 21 """Raised from SignatureHandler.verify if the certificate submitted to 22 verify a signature is not from a known CA""" 23 17 24 18 25 class TimestampError(WSSecurityError): … … 20 27 the created or expiry times in an input message Timestamp""" 21 28 29 22 30 class MessageExpired(TimestampError): 23 31 """Raised from SignatureHandler._verifyTimestamp if the timestamp of 24 32 the message being processed is before the current time. Can be caught in 25 33 order to set a wsu:MessageExpired fault code""" 26 27 class InvalidCertChain(WSSecurityError):28 """Raised from SignatureHandler.verify if the certificate submitted to29 verify a signature is not from a known CA""" -
TI12-security/trunk/NDGSoap/ndg/soap/wssecurity/test/unit/signaturehandler/foursuite/client/echoClientTest.cfg
r6417 r7131 15 15 # - NB, the two CA certificates are for the python and the java clients, 16 16 # respectively 17 caCertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/ ndg-test-ca.crt17 caCertFilePathList = $NDGSEC_TEST_CONFIG_DIR/ca/d573507a.0 18 18 19 19 [test1Echo] -
TI12-security/trunk/NDGSoap/ndg/soap/wssecurity/test/unit/signaturehandler/foursuite/server/echoservice.ini
r6419 r7131 93 93 94 94 # Verify against known CAs - Provide a space separated list of file paths 95 wssecurity.caCertFilePathList=%(testConfigDir)s/ca/ ndg-test-ca.crt95 wssecurity.caCertFilePathList=%(testConfigDir)s/ca/d573507a.0 96 96 97 97 #______________________________________________________________________________ -
TI12-security/trunk/NDGSoap/ndg/soap/wssecurity/test/unit/signaturehandler/foursuite/server/wssecurity.cfg
r6399 r7131 93 93 # Provide a space separated list of file paths 94 94 # - NB, the two CA certificates are for the python and the java clients, respectively 95 #caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/java-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/ ndg-test-ca.crt96 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/ ndg-test-ca.crt95 #caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/java-ca.crt $NDGSEC_TEST_CONFIG_DIR/ca/d573507a.0 96 caCertFilePathList=$NDGSEC_TEST_CONFIG_DIR/ca/d573507a.0 97 97 98 98 # Force an exception if a client message doesn't contain a timestamp
Note: See TracChangeset
for help on using the changeset viewer.