WS-Security (WSSE)

WS-Security incorporates security features in the header of a SOAP message.

UsernameToken

The UsernameToken supports both the passwordText and passwordDigest methods:

>>> from zeep import Client
>>> from zeep.wsse.username import UsernameToken
>>> client = Client(
...     'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
...     wsse=UsernameToken('username', 'password'))

To use the passwordDigest method you need to supply use_digest=True to the UsernameToken class.

Signature (x509)

To use the wsse.Signature() plugin you will need to install the xmlsec module. See the README for xmlsec for the required dependencies on your platform.

Example usage:

>>> from zeep import Client
>>> from zeep.wsse.signature import Signature
>>> client = Client(
...     'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
...     wsse=Signature(
...         private_key_filename, public_key_filename,
...         optional_password))