Comments (3)
Can you go through this doc https://suds-py3.readthedocs.io/en/latest/#windows-ntlm
If you could share a simple NET WCF service with NTML auth enabled, i could test and fix if possible. Have a look at examples
folder and submit a pull request.
from suds-py3.
@cackharot
I am having the same issue. Below is my code and logs
code:
from suds.client import Client
from suds.transport.https import WindowsHttpAuthenticated
ntlm = WindowsHttpAuthenticated(username="domain\\"+username,password=password)
client = Client(url,transport=ntlm)
error logs:
HTTP Error 401: Unauthorized
Traceback (most recent call last):
File "c:\Python3\lib\site-packages\suds\transport\http.py", line 63, in open
return self.u2open(u2request)
File "c:\Python3\lib\site-packages\suds\transport\http.py", line 119, in u2open
return url.open(u2request, timeout=tm)
File "c:\Python3\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "c:\Python3\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "c:\Python3\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "c:\Python3\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "c:\Python3\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Development\github\fdoc-buildscripts\pythonLibs\Symbols.py", line 51, in uploadCer
client = Client(self.cerServer["url"],transport=ntlm)
File "c:\Python3\lib\site-packages\suds\client.py", line 110, in __init__
self.wsdl = reader.open(url)
File "c:\Python3\lib\site-packages\suds\reader.py", line 151, in open
d = self.fn(url, self.options)
File "c:\Python3\lib\site-packages\suds\wsdl.py", line 135, in __init__
d = reader.open(url)
File "c:\Python3\lib\site-packages\suds\reader.py", line 78, in open
d = self.download(url)
File "c:\Python3\lib\site-packages\suds\reader.py", line 94, in download
fp = self.options.transport.open(Request(url))
File "c:\Python3\lib\site-packages\suds\transport\https.py", line 61, in open
return HttpTransport.open(self, request)
File "c:\Python3\lib\site-packages\suds\transport\http.py", line 65, in open
raise TransportError(str(e), e.code, e.fp)
suds.transport.TransportError: HTTP Error 401: Unauthorized
Note:
- same code works for python2.7 (suds==0.4 and python-ntlm==1.1.0)
- Fails in python3.6 (suds-py3==1.3.3.0 and python-ntlm3==1.0.2)
from suds-py3.
@cackharot seems the issue is with https://github.com/trustrachel/python-ntlm3. where the auth_header_value
supposed to be a list. The fixes are here in https://github.com/mullender/python-ntlm/blob/master/python30/ntlm/HTTPNtlmAuthHandler.py.
from suds-py3.
Related Issues (20)
- Deprecation warning due to invalid escape sequences in Python 3.7
- Why not use FIPS-compliant algorithm instead of MD5 HOT 5
- importing `suds.Object` class in mx.literal results in `TypeNotFound` later
- Exception: No ports defined: Service - wdsl without binding, how to handle?
- how to use import doctor to load schema from a local file
- cannot process href in build_catalog in multiref.py HOT 1
- Missing git tag for 1.4.1.0 release HOT 1
- suds-py3: Headers passed into suds.client.Client() are not used in WSDL and XSD requests HOT 2
- suds-py3 still vulnerable to CVE-2013-2217? HOT 5
- managing security with Handlerchain
- suds-py3: Exception: (BaseObjects, None, ), must be qref
- "suds.TypeNotFound: Type not found: 'BVDefs'" error when trying to call service
- Datetime Object formatting default
- HTTP error 415: content type error HOT 1
- release a wheel on pypi HOT 3
- Connection Pooling support? HOT 1
- nosend attribute for Client is documented, but doesn't appear to be implemented
- Is suds-py3 v1.4.5.0 is compatible with python3.11
- When recieves WebFault the recieved function in the message plugin is not called
- Omit __pycache__ directories from wheels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suds-py3.