Opened 10 years ago
Closed 10 years ago
#12236 closed defect (fixed)
OAuth broken
| Reported by: | malenki | Owned by: | team |
|---|---|---|---|
| Priority: | blocker | Milestone: | 15.12 |
| Component: | Core | Version: | |
| Keywords: | regression http oauth | Cc: |
Description
In r9176 OAuth doesn't work anymore. It tells the user so and asks that he should get a new authentication code - but after doing so Auth still fails.
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b01)
OpenJDK 64-Bit Server VM (build 25.66-b01, mixed mode
INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/create -> 200 INFO: OK INFO: POST https://api.openstreetmap.org/api/0.6/changeset/36190057/upload -> 401 INFO: Unauthorized Fehler: Error body: Couldn't authenticate you Fehler: 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:678) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:590) at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:533) at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesInChunks(OsmServerWriter.java:175) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:218) at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:250) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/36190057 -> 200 INFO: OK INFO: POST https://api.openstreetmap.org/api/0.6/changeset/36190057/upload -> 401 INFO: Unauthorized Fehler: Error body: Couldn't authenticate you Fehler: 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:678) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:590) at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:533) at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesInChunks(OsmServerWriter.java:175) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:218) at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:250) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Attachments (0)
Change History (9)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
| Milestone: | → 15.12 |
|---|
comment:4 by , 10 years ago
| Keywords: | http oauth added |
|---|
comment:5 by , 10 years ago
Strange, I tested before committing the changes (esp,. r9172) and right away – both times w/o problems:
// modified preference.xml and invalidated the oauth.access-token.key, oauth.access-token.secret entries by removing one character // clicked "Test Access Token" INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> 401 ERROR: org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Header=<Retrieving user details with Access Token Key [[invalid token]] was rejected.> org.openstreetmap.josm.io.OsmApiException: ResponseCode=401, Error Header=<Retrieving user details with Access Token Key [[invalid token]] was rejected.> at org.openstreetmap.josm.gui.oauth.TestAccessTokenTask.getUserDetails(TestAccessTokenTask.java:114) at org.openstreetmap.josm.gui.oauth.TestAccessTokenTask.realRun(TestAccessTokenTask.java:246) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/create (0 kB) ... INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/create -> 401 INFO: Unauthorized 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:683) at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:590) at org.openstreetmap.josm.io.OsmApi.openChangeset(OsmApi.java:420) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:205) at org.openstreetmap.josm.gui.io.UploadPrimitivesTask.realRun(UploadPrimitivesTask.java:250) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) // clicked "New Access Token" and performed the semi-automatic mode INFO: GET https://www.openstreetmap.org/oauth/request_token -> 200 INFO: Opening URL: https://www.openstreetmap.org/oauth/authorize?oauth_token=[[foobar]] INFO: GET https://www.openstreetmap.org/oauth/access_token -> 200 INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> 200 INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> 200 // upload some changes INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/create (0 kB) ... INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/create -> 200 INFO: OK INFO: POST https://api.openstreetmap.org/api/0.6/changeset/36206879/upload (2 kB) ... INFO: POST https://api.openstreetmap.org/api/0.6/changeset/36206879/upload -> 200 INFO: OK INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/36206879/close (0 kB) ... INFO: PUT https://api.openstreetmap.org/api/0.6/changeset/36206879/close -> 200 INFO: OK
Build-Date:2015-12-27 18:05:56 Revision:9181 Is-Local-Build:true Identification: JOSM/1.5 (9181 SVN en) Linux Arch Linux Memory Usage: 874 MB / 3504 MB (303 MB allocated, but free) Java version: 1.8.0_66, Oracle Corporation, OpenJDK 64-Bit Server VM VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:43813,suspend=y,server=n, -Djosm.home=/tmp/.josm, -javaagent:/usr/share/intellijidea-ce/plugins/Groovy/lib/agent/gragent.jar, -Dfile.encoding=UTF-8] Program arguments: [--set=expert=true, --set=remotecontrol.enabled=true, --set=dialog.dynamic.buttons=false] Dataset consistency test: No problems found
comment:6 by , 10 years ago
When I click on the test button it says that the test was succesful, however osm data upload fails.
comment:7 by , 10 years ago
Would you please test with r9182 (which can be downloaded from https://josm.openstreetmap.de/jenkins/view/JOSM/job/JOSM/lastCompletedBuild/jdk=JDK8/) and clean preferences?



same here