Modify

Opened 14 years ago

Closed 13 years ago

#1641 closed defect (fixed)

JOSM doesn't allow for setting HTTP proxy user/password distrinct from OSM server user/password

Reported by: centocolli5526@… Owned by: framm
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc: Gubaer

Description

I am not able to use properly the http-proxy configuration parameters to work from my office (obviously non in the work time).
If I configure the username and password of the proxy (Edit - Preferences - Connection settings - Proxy settings), when I try to download or upload something to the OSM server JOSM use the OSM username/password to do the proxy authentication and not the correct one.

I noticed that I can work around this issue in this manner:

  • I set my proxy username/password into OSM username/password configuration, so the proxy authentication works fine
  • the first time I download something from OSM, JOSM tells to me that the specified user/password are invalid (because they are related to the proxy), so I can enter now the correct one and let JOSM connecto to OSM too

Attachments (1)

josm-httpauth.patch (2.9 KB) - added by Upliner 14 years ago.
hack to get http auth working

Download all attachments as: .zip

Change History (12)

comment:1 Changed 14 years ago by anonymous

Priority: minormajor
Version: latest

I have the same problem too.

But the work around does not work, because JOSM don't tell me that the specified user/password are invalid. so there is no way to connect to osm :-(

adding start parameters like this:
java -DproxySet=true -Dhttp.proxyHost=myproxy.mycompany.com -DproxyPort=8080 -DproxyUser=user -DproxyPassword=password -jar josm-latest.jar

won't work...

comment:2 Changed 14 years ago by stoecker

Ticket #1985 has been marked as a duplicate of this ticket.

comment:3 Changed 14 years ago by stoecker

Ticket #2397 has been marked as a duplicate of this ticket.

comment:4 Changed 14 years ago by anonymous

Ticket #2686 has been marked as a duplicate of this ticket.

comment:5 Changed 14 years ago by avarab@…

Summary: Http proxy settingsJOSM doesn't allow for setting HTTP proxy user/password distrinct from OSM server user/password

Changed the summary to something understandable.

comment:6 Changed 14 years ago by Upliner

Cc: Upliner added
Component: unspecifiedCore

I use this hack to get proxy authentication work. (see attachment)

Changed 14 years ago by Upliner

Attachment: josm-httpauth.patch added

hack to get http auth working

comment:7 Changed 14 years ago by Upliner

Cc: Upliner removed

comment:8 Changed 14 years ago by stoecker

Hmm, but when "Proxy-Authorization" is not understood, the password is passed through to the destination server. Sounds dangerous to me.

comment:9 Changed 14 years ago by Upliner

Is there another way to authenticate ISA proxy?

comment:10 in reply to:  8 Changed 14 years ago by Gubaer

Cc: Gubaer added

Replying to stoecker:

Hmm, but when "Proxy-Authorization" is not understood, the password is passed through to the destination server. Sounds dangerous to me.

I think it's the standard way to do it. But it should be included in a request only if an upstream proxy requires it by replying a 407 response code. In this case we can assume that "Proxy-Authorization" is understood and that the proxy consumes the respective credentials before passing on the request.

The patch only supports Basic Authentication. For Digest Authentication JOSM would have to process a challenge from the proxy.

Rather than implementing this on top of the bare java.net classes why don't we use a http client library like Apaches HTTP client in JOSM? Most likely, only OsmApi and it's parent classes would have to be touched.

comment:11 Changed 13 years ago by Gubaer

Resolution: fixed
Status: newclosed

(In [2641]) new: supports system defined proxies if JOSM is started with -Djava.net.useSystemProxies=true
fixed #1641: JOSM doesn't allow for setting HTTP proxy user/password distrinct from OSM server user/password
fixed #2865: SOCKS Proxy Support
fixed #4182: Proxy Authentication

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.