[Python-bugs-list] [ python-Feature Requests-538582 ] NTLM Authentication Using httplib

noreply@sourceforge.net noreply@sourceforge.net
Wed, 03 Apr 2002 09:01:55 -0800


Feature Requests item #538582, was opened at 2002-04-03 08:04
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=538582&group_id=5470

>Category: None
>Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Keyton Weissinger (keytonw)
Assigned to: Nobody/Anonymous (nobody)
Summary: NTLM Authentication Using httplib

Initial Comment:
Is there a way to use httplib to do NTLM 
authentication using the following URL format:

http://username:password@www.mydomain.com:80/start.py

???

If you attempt to do this it errors out (trying to 
make everything from ":password" over the port number).

Thank you in advance.

Keyton

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-03 19:01

Message:
Logged In: YES 
user_id=21627

Python does not support NTLM authentication; so this sounds
like a feature request (reclassifying it as such). urllib
supports Basic authentication.

I'm still not sure what you did  that was incorrectly
interpreted as a port number. Can you please provide a
precise sequence of Python statements, and report what the
precise error message is that you get?

----------------------------------------------------------------------

Comment By: Keyton Weissinger (keytonw)
Date: 2002-04-03 14:39

Message:
Logged In: YES 
user_id=396481

NTLM is the Windows NT authentication scheme for web 
applications. It is what triggers the 
domain/username/password input box that springs up on 
secure NT-based web applications.

To avoid the pop-up, people use a URL in the following 
format:

http://username:password@www.mydomain.com:80/myPage.htm

The bug:

When I enter a host string that looks like the above, the 
httplib code tries to make:

:password@www.mydomain.com:80/myPage.htm

into a port number and fails because it cannot convert the 
above to an integer.

That is the bug, but my guess is that there is more to it 
than that. 

The bigger question may be: Can I use httplib to 
authenticate into a secure NT-based web application?

Thank you!

Keyton

P.S. Here is a link to some more information. If it turns 
out to be a feature request and one you are interested in, 
I would be happy to help:

http://squid.sourceforge.net/ntlm/faq.html

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-04-03 11:41

Message:
Logged In: YES 
user_id=21627

What is NTLM? What is the bug you are reporting?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=355470&aid=538582&group_id=5470