On-premesis Windows-mode authentication fails
adyekjaer opened this issue · 2 comments
My setup is an on-premise installation with "Windows Integrated Authentication Mode". I do not have access to the server so can't check specifics.
When trying to authenticate using tokens I get the dreaded:
ValueError: AbstractBasicAuthHandler does not support the following scheme: 'Negotiate'
I believe it's because the webserver (IIS) is throwing NTLM auth headers at me which apparently is not fully supported. I did have the ntlm module installed.
This article better explains what is going on: https://community.versionone.com/VersionOne_Connect/Developer_Library/Getting_Started/API_Authentication/API_Authentication_Methods
Basically the token based authentication is not supported with on-premise installation when "Windows Integrated Authentication Mode" is on. In this case you need to communicate with a different endpoint: rest-1.oauth.v1 instead of rest-1.v1.
I've opened up a pull request with a possible solution: #30
If others come across this strange behavior there is a workaround that worked for me but it might be installation specific. Basically you add '/v1' or any other random string to the instance like this:
with V1Meta(
address = '<server name>',
instance = 'VersionOne/v1',
password = '<your token>',
scheme = 'https',
use_password_as_token=True
) as v1:
Cheers
Out of curiosity... will this get pushed to the official pypi repositories anytime soon? I agree with the problem and the solution and would love to avoid patching. :-)
I'm not actively working the project anymore, and I've never been deploying onto Windows systems myself, but if you submit a pull request for the change...