473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Python Digest authentication against MS MapPoint

Hi.

Is there anybody who have tried to use python to access Microsofts
MapPoint soap services? I am trying hard but I have run into a big
thick wall called md5 digest authentication. The MapPoint service uses
rfc2617 to authenticate the user. I have a working account for this
which works using C# dotnet and Borland Delphi 6.0. When I try to
authenticate using python it fail.

Here is what I do to provoke the rfc2617 challenge:
import urllib2
r=urllib2.Request('http://findv3.staging.mappoint.net/Find-30/FindService.asmx')
auth_handler = urllib2.HTTPDigestAuthHandler()
auth_handler.add_password('MapPoint','findv3.stagi ng.mappoint.net','user','passwd')
opener = urllib2.build_opener(auth_handler)
urllib2.install_opener(opener)
urllib2.urlopen(r)

I can see using ethereal to monitor the network trafic, that urllib2
resonds to the challenge in a way that seems reasenable, but
authorization is not granted:


Challenge:
HTTP/1.1 401 Unauthorized
Connection: close
Date: Mon, 05 Sep 2005 07:19:28 GMT
Server: Microsoft-IIS/6.0
P3P:CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
X-Powered-By: ASP.NET
WWW-Authenticate: Digest qop="auth", realm="MapPoint",
nonce="de28fc616ef19b278674095211006e1fcceb504c93d 76d242aa90491e640"
Content-Length: 0
Response:
GET /Find-30/FindService.asmx HTTP/1.1
Accept-Encoding: identity
Host: findv3.staging.mappoint.net
Connection: close
Authorization: Digest username="106288", realm="MapPoint",
nonce="de28fc616ef19b278674095211006e1fcceb504c93d 76d242aa90491e640",
uri="/Find-30/FindService.asmx",
response="2259380697df5b32a010a2d622415d10", qop=auth, nc=00000001,
cnonce="6a949f85f64abd0f"
User-agent: Python-urllib/2.4
Best regards Jakob Simon-Gaarde

Sep 5 '05 #1
2 2479
tr*********@gmail.com wrote:
[problem with digest auth]

sorry for giving such a generic advice, but I'd capture the headers of
the C# app and compare with the urllib version line by line. Try to
reproduce the exact header with python (except the response and cnonce
of course). Maybe IIS has its own "version" of rfc2617.

hth
Paul

Sep 5 '05 #2
Hi

The requests made by python and C# dotnet are strikingly similar. Thats
why I am putting my money on that it is the rfc2617 part that makes the
difference.

Since this posting was created, I have also tried gSoap. But again with
no luck. While python failed to authorize, gSoap stops with a "400 BAD
REQUEST" when authorizing probably meaning that the request has bad
syntax.

It would be nice if someone with expert knowledge on this matter (say
the maintainer) could give this a try just to see where the
communication goes wrong. I can provide authorized credtiels for the
realm to whoever would like to try.

Best regards Jakob Simon-Gaarde

Sep 6 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jp Calderone | last post by:
I've been trying to implement support for this authentication scheme for a little while now, and in the last couple days I've been completely stumped. I know about the digest authentication code...
3
by: John Reese | last post by:
Hello there. I've run into some missing functionality with HTTP Digest authentication in the 2.3 library and I was wondering if I'm just missing something. Missing functionality the first:...
2
by: john | last post by:
I'm trying to access the XML version of my Tivo now playing list with python. It uses auth digest HTTP authentication. I could really use some help! I'm able to get this page using curl: curl...
1
by: trapeze.jsg | last post by:
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to...
0
by: Wolfgang Meier | last post by:
I am using the following code to retrieve a document from my web server: HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://example.com/"); req.Method = "GET"; req.PreAuthenticate...
0
by: paul | last post by:
I must (as a client application) connect via HTTP, authenticate using DIGEST authentication, and then make subsequent HTTP requests. The Problem: If I use System.Net.WebClient or...
13
by: BartlebyScrivener | last post by:
New to Python and Programming. Trying to make scripts that will open sites and automatically log me on. The following example is from the urllib2 module. What are "realm" and "host" in this...
2
by: Dan Lenski | last post by:
Hi all, I've got a very simple HTML proxy server to access the web from my cell phone (based on this code: http://www.okisoft.co.jp/esc/python/proxy/). It's a very retarded phone that freezes if...
0
by: embeddedbob | last post by:
Hi there, I appreciate any help on the following issue. I can't seem to find any other similar topic. (CS4, ActionScript 3.0, Flash 10) I have a SWF embedded within a page that is protected by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.