mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.89k stars 587 forks source link

ENH: Expose the security settings of defusexml in Client.__init__ #391

Open dr-leo opened 7 years ago

dr-leo commented 7 years ago

Using zeep v1.3.0, Win7x32, Python 3.5, the following script yields an Entities Forbidden error from defusexml:

import zeep wcf = 'http://dataservices.imf.org/sdmx21/SDMX_WCF_Service21.svc' url = 'http://dataservices.imf.org/sdmx21/SDMX_WCF_Service21.wsdl' c = zeep.Client(wsdl=url)

To allow the user to adjust the security Level of defusexml if needed, I propose to expose and propagate the corresponding defusexml kwargs. The existing Default values should remain unchanged so as to make any relaxed security Settings transparent and maintain the paranoid behavior by Default. #567 seems to implement this partially. The defusexml Settings should be stored in the Client instance and propagated to defusexml on each request. Ideally there should be properties to Change the defusexml security Settings of an existing Client instance.

DrJackilD commented 7 years ago

@dr-leo @mvantellingen I created PR for this feature, and would like to know your opinion about it. Thanks!