Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On-premesis Windows-mode authentication fails #31

Open
adyekjaer opened this issue Aug 23, 2018 · 2 comments
Open

On-premesis Windows-mode authentication fails #31

adyekjaer opened this issue Aug 23, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@adyekjaer
Copy link

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

@mtalexan mtalexan changed the title Unable to authenticate On-premesis Windows-mode authentication fails Dec 17, 2018
@mtalexan mtalexan added the bug Something isn't working label Dec 17, 2018
@fahrenberger
Copy link

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. :-)

@mtalexan
Copy link
Owner

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...

s31db pushed a commit to s31db/VersionOne.SDK.Python that referenced this issue Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants