#9710 closed defect (fixed)
JOSM doesn't support https for talking to the API
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | 14.02 |
Component: | Core | Version: | |
Keywords: | oauth | Cc: |
Description
Since today, OpenStreetMap supports SSL on the api calls[1]. Unfortunately it seems that josm doesn't support using SSL yet.
When entering https://api.openstreetmap.org/api as a custom API url, it trys to connect to https:/api.openstreetmap.org/api i.e. it somehow seems to drop the second "/" which then results in a connection refused error.
Tested with josm 6836
[1] http://blog.openstreetmap.org/2014/02/11/osm-enhances-user-privacy/
Attachments (0)
Change History (17)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Milestone: | → 14.02 |
---|
comment:3 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
There still seems to be some bugs with this. It seems that you can't upload from JOSM with OAuth when running HTTPS. I'm testing this with [6842].
When I test my OAuth access token from inside of JOSM, it claims it's valid. However when I attempt to upload, JOSM says I can't be authenticated. So, I go back to the 'Connection Settings > Authentication' section in the preferences and click the "Display Advanced OAuth Parameters" box. In that, it shows 3 URLs and they all are directed to the 'HTTP' version of OSM, even though the OSM Server URL above is 'HTTPS'. So, I go manually change them so that they all are 'HTTPS' and hit the 'OK' button to save the changes.
I then try to upload again and I still get the message that I can't be authenticated. So, I now go back to the 'Connection Settings > Authentication' section again and click the "Display Advanced OAuth Parameters" box. What do I find? Well, JOSM didn't save my changes in the URLs and still displays the 'HTTP' version instead of the 'HTTPS'.
So, as far as I can tell, the OAuth part of JOSM doesn't like the 'HTTPS' urls. Hope this can be easily fixed and is not a bug on the OSM server side (which I don't think it is because of the token validating when not uploading without any problems).
INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/20519132... INFO: OK INFO: POST https://api.openstreetmap.org/api/0.6/changeset/20519132/upload... INFO: Authorization Required ERROR: Error body: Couldn't authenticate you ERROR: org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Body=<Couldnt authenticate you> org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Body=<Couldnt authenticate you> at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:711) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:581) at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:525) at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesAsDiffUpload(OsmServerWriter.java:132) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:208) at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:250) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2014-02-12 09:36:32 Last Changed Author: akks Revision: 6842 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2014-02-12 09:49:07 +0100 (Wed, 12 Feb 2014) Last Changed Rev: 6842 Identification: JOSM/1.5 (6842 en) Windows 7 64-Bit Memory Usage: 321 MB / 1820 MB (175 MB allocated, but free) Java version: 1.7.0_51, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-Xmx2048M] Dataset consistency test: No problems found Plugin: ImageryCache (30277) Plugin: OpeningHoursEditor (30235) Plugin: buildings_tools (30277) Plugin: measurement (30277) Plugin: mirrored_download (30197) Plugin: notes (v0.9.1) Plugin: osmarender (30277) Plugin: reverter (30277) Plugin: turnrestrictions (30277) Plugin: undelete (30277) Plugin: utilsplugin2 (30277)
comment:4 by , 11 years ago
Keywords: | oauth added |
---|
follow-up: 8 comment:7 by , 11 years ago
One more fix, still does not work. I suspect a bug on OSM server side.
comment:11 by , 11 years ago
comment:14 by , 11 years ago
How do I trigger the debug messages to show up?
---
On a side note, with the changes that have been done in the last 24h, the error message did change a tad, but only one line.
INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/20570120... INFO: OK INFO: POST https://api.openstreetmap.org/api/0.6/changeset/20570120/upload... INFO: Authorization Required ERROR: Error body: Couldn't authenticate you ERROR: org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Body=<Couldnt authenticate you> org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Body=<Couldnt authenticate you> at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:715) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:581) at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:525) at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesAsDiffUpload(OsmServerWriter.java:132) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:208) at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:250) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Was:
at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:711)
Now:
at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:715)
comment:15 by , 11 years ago
Ticket #o5118 says it should be fixed on server side now.
P.S. we should fix the stripping of ' sign in error message.
comment:16 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:17 by , 11 years ago
Sorry, didn't get a chance to respond back sooner. But I've been having no problems with the https upload once the problem was fixed on the OSM server side.
In 6840/josm: