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

401 error #61

Open
trezorg opened this issue Aug 14, 2015 · 13 comments
Open

401 error #61

trezorg opened this issue Aug 14, 2015 · 13 comments

Comments

@trezorg
Copy link

trezorg commented Aug 14, 2015

I am authentification against https://east.exch029.serverdata.net/EWS/Exchange.asmx server. I've got 401 error. When I tried with curl --ntlm then I've got 200 response.
What could be different in curl and requests_ntml NTLM protocol realization?
I can give additional information and creadentials if needed.

@Lukasa
Copy link
Member

Lukasa commented Aug 14, 2015

The most likely issue is surrounding connection pooling. Can you tell me what versions of requests and requests_ntlm you're using?

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

requests==2.7.0
requests-ntlm==0.2.0

@Lukasa
Copy link
Member

Lukasa commented Aug 14, 2015

Hmm, that's weird. Are you familiar with tcpdump?

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

I can start some simple command. I am not sure how to decode https session.

@Lukasa
Copy link
Member

Lukasa commented Aug 14, 2015

We don't need to decode the session, I just need to see how many TCP connections are created.

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

This is output.
23:10:21.214700 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [S], seq 983701046, win 29200, options [mss 1460,sackOK,TS val 10704584 ecr 0,nop,wscale 7], length 0
23:10:21.398004 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [S.], seq 356261063, ack 983701047, win 8192, options [mss 1380], length 0
23:10:21.398098 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [.], ack 1, win 29200, length 0
23:10:21.409757 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [P.], seq 1:272, ack 1, win 29200, length 271
23:10:21.594903 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [.], seq 1:1381, ack 272, win 64860, length 1380
23:10:21.595046 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [.], ack 1381, win 31740, length 0
23:10:22.246666 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [P.], seq 1381:2618, ack 272, win 64860, length 1237
23:10:22.246790 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [.], ack 2618, win 34500, length 0
23:10:22.248608 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [P.], seq 272:630, ack 2618, win 34500, length 358
23:10:22.435689 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [P.], seq 2618:2709, ack 630, win 64502, length 91
23:10:22.436666 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [P.], seq 630:907, ack 2709, win 34500, length 277
23:10:22.620921 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [P.], seq 2709:3130, ack 907, win 64225, length 421
23:10:22.622677 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [P.], seq 907:1296, ack 3130, win 37260, length 389
23:10:22.805834 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [P.], seq 3130:3951, ack 1296, win 63836, length 821
23:10:22.837201 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [P.], seq 1296:1941, ack 3951, win 40020, length 645
23:10:23.021850 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [P.], seq 3951:4260, ack 1941, win 64860, length 309
23:10:23.026536 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [F.], seq 1941, ack 4260, win 42780, length 0
23:10:23.215106 IP 199.193.200.203.443 > 192.168.100.100.33306: Flags [F.], seq 4260, ack 1942, win 64860, length 0
23:10:23.215185 IP 192.168.100.100.33306 > 199.193.200.203.443: Flags [.], ack 4261, win 42780, length 0

@Lukasa
Copy link
Member

Lukasa commented Aug 14, 2015

Hmm that looks like an entirely reasonable flow. Do you have any backslashes in your username or password?

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

There are no any backslashes at all. As far as I know there is Exchange 2010.

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

I can provide code I use and test account credentials, if you are interested.

@Lukasa
Copy link
Member

Lukasa commented Aug 14, 2015

Hmm, that's not a bad idea, though it's hard for me to test at the moment (no access to a Windows machine).

@trezorg
Copy link
Author

trezorg commented Aug 14, 2015

I also cannot provide rigth now, I am not at computet, but as soon ad possible I will do.

@Lukasa
Copy link
Member

Lukasa commented Aug 15, 2015

I recommend you wipe out sensitive information right now, and mail it to me instead at [email protected]. I won't get a chance to look at this for a few days.

@trezorg
Copy link
Author

trezorg commented Aug 15, 2015

Thanks you. I sent email message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants