15 | | {{{ |
16 | | #!html |
17 | | <p style="background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid; border-width: 1px;"> |
18 | | <strong>Warning!</strong><br/> |
19 | | Currently, the OSM server doesn't offer a secure communication channel. Even if you use OAuth your password is therefore transferred <strong>once in clear text</strong> over the Internet. <strong>Do not use a valuable password</strong> until the OSM server provides a secure communication channel (HTTPS). |
20 | | </p> |
21 | | }}} |
22 | | |
23 | | In OAuth terminology, a JOSM user authorises JOSM to access the OSM server on the user's behalf. During the authorisation process the OSM password never needs to be entered into a JOSM dialog if the user doesn't fully trust JOSM (unless wanting to for convenience reasons [wiki:/Help/Dialog/OAuthAuthorisationWizard#FullyAutomaticAuthorisation see here]). Rather, the OSM server issues an Access Token which JOSM presents to the OSM server when it uploads data on behalf of the user. Access Tokens don't reveal the user's password and they can be revoked at any time. |
| 16 | In OAuth terminology, a JOSM user authorizes JOSM to access the OSM server on the user's behalf. During the authorization process the OSM password never needs to be entered into a JOSM dialog if the user doesn't fully trust JOSM (unless wanting to for convenience reasons [wikitr:/Help/Dialog/OAuthAuthorisationWizard#FullyAutomaticAuthorisation see here]). Rather, the OSM server issues an Access Token which JOSM presents to the OSM server when it uploads data on behalf of the user. Access Tokens don't reveal the user's password and they can be revoked at any time. |
33 | | === What does authentication/authorisation mean? === |
34 | | When you upload geodata to the OSM server you have to tell the server who you are. The OSM server will '''identify''' every uploading mapper by asking for an OSM username. The OSM server furthermore needs to '''authenticate''' this identity, i.e. to reliably determine whether the mapper is indeed the claimed user. For this purpose, it asks for a password in addition to the username. The server's assumption is that whoever knows the secret password for username xyz is reliably authenticated to ''be'' xyz. A mapper logged in with an authenticated username and password is entitled to run a broad range of operations on the server. The mapper is '''authorised''' to upload data, to create changesets, to close changesets, to upload GPS traces, to read and changes personal preferences on the server, to invite others as friends, to send emails to other accounts, etc. Currently, it isn't possible to create an OSM account with an OSM username and a password with restricted rights, i.e. an account that would only be able to upload GPS traces, but not map data. Whoever has successfully '''authenticated''' with an OSM username and an OSM password is '''fully authorised''' to do everything an OSM user can normally do on the server. |
| 27 | === What does authentication/authorization mean? === |
| 28 | When you upload geodata to the OSM server you have to tell the server who you are. The OSM server will **identify** every uploading mapper by asking for an OSM username. The OSM server furthermore needs to **authenticate** this identity, i.e. to reliably determine whether the mapper is indeed the claimed user. For this purpose, it asks for a password in addition to the username. The server's assumption is that whoever knows the secret password for username xyz is reliably authenticated to ''be'' xyz. A mapper logged in with an authenticated username and password is entitled to run a broad range of operations on the server. The mapper is ***authorized** to upload data, to create changesets, to close changesets, to upload GPS traces, to read and changes personal preferences on the server, to invite others as friends, to send emails to other accounts, etc. Currently, it isn't possible to create an OSM account with an OSM username and a password with restricted rights, i.e. an account that would only be able to upload GPS traces, but not map data. Whoever has successfully **authenticated** with an OSM username and an OSM password is **fully authorized** to do everything an OSM user can normally do on the server. |
66 | | When JOSM fully-automatically requests and authorises an Access Token, it grants it five privileges: |
67 | | * the right to upload data to the OSM server |
68 | | * the right to upload GPS traces to the OSM server |
69 | | * the right to download private GPS traces from the OSM server |
70 | | * the right to read the preferences stored on the OSM server |
71 | | * the right to write preferences stored on the OSM server |
| 63 | When JOSM fully-automatically requests and authorizes an Access Token, it grants it six privileges: |
| 64 | * the right to upload data to the OSM server |
| 65 | * the right to upload GPS traces to the OSM server |
| 66 | * the right to download private GPS traces from the OSM server |
| 67 | * the right to read the preferences stored on the OSM server |
| 68 | * the right to write preferences stored on the OSM server |
| 69 | * the right to modify notes stored on the OSM server |
81 | | When JOSM fully-automatically requests and authorises an Access Token, it uses default values for the OAuth parameters. Advanced users may want to change these parameters |
82 | | * in order to use a different Consumer Token (consisting of a Consumer Key and a Consumer Secret). This allows you to create your own Consumer Token for JOSM and then use it in JOSM. |
83 | | * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with an OSM development server or with a local installation of the OSM server application. |
| 79 | When JOSM fully-automatically requests and authorises an [https://oauth.net/core/1.0/#anchor3 Access Token], it uses default values for the OAuth parameters. Advanced users may want to change these parameters |
| 80 | * in order to use a different Consumer Token (consisting of a Consumer Key and a Consumer Secret). This allows you to create your own Consumer Token for JOSM and then use it in JOSM. |
| 81 | * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with an OSM development server or with a local installation of the OSM server application. |
93 | | === Semi-automatic authorisation process === |
94 | | You can also retrieve an Access Token semi-automatically. If you use this process you have to use both dialogs in JOSM and the OSM website launched in an external browser to create and authorise the Access Token. In contrast to the fully automatic process you never have to enter your OSM username or your OSM password into a JOSM dialog. This process is therefore suitable for a user which - for whatever reason - never wants to use their OSM password outside of the OSM website. Note however, that the semi-automatic process is '''not''' significantly more secure than the fully automatic process. Your OSM password will be transferred in clear-text over the Internet, too, because the OSM website doesn't currently provide a login page protected by HTTPS. The fully automatic process runs exactly the same steps that would run manually in the semi-automatic process, just without your intervention. |
| 91 | === Semi-automatic authorization process ===#Semi-automaticauthorisationprocess |
| 92 | You can also retrieve an Access Token semi-automatically. If you use this process you have to use both dialogs in JOSM and the OSM website launched in an external browser to create and authorize the Access Token. In contrast to the fully automatic process you never have to enter your OSM username or your OSM password into a JOSM dialog. This process is therefore suitable for a user which - for whatever reason - never wants to use their OSM password outside of the secure login page of the OSM website. The fully automatic process runs exactly the same steps that would run manually in the semi-automatic process, just without your intervention. |
| 93 | |
| 94 | 1. **Step 1/3** - Get the Request Token |
| 95 | |
| 96 | Click on **Retrieve Request Token** to retrieve an OAuth Request Token. |
| 97 | |
| 98 | [[Image(semi-automatic-step-1.png,link=)]] |
| 99 | |
| 100 | 2. **Step 2/3** - Authorize the Request Token in an external browser |
| 101 | |
| 102 | JOSM now launches an external browser with the OSM website. Please login and follow the instructions. Then switch back to the OAuth Authorization Wizard and click on **Retrieve Access Token**. |
| 103 | |
| 104 | [[Image(semi-automatic-step-2.png,link=)]] |
| 105 | |
| 106 | 3. **Step 3/3** - Accept the Access Token |
| 107 | |
| 108 | JOSM displays the retrieved Access Token. Click on **Accept Access Token** to accept it. |
| 109 | |
| 110 | [[Image(semi-automatic-step-3.png,link=)]] |
97 | | 1. '''Step 1/3''' - Get the Request Token |
98 | | |
99 | | Click on '''Retrieve Request Token''' to retrieve an OAuth Request Token. |
100 | | |
101 | | [[Image(semi-automatic-step-1.png)]] |
102 | | |
103 | | 2. '''Step 2/3''' - Authorise the Request Token in an external browser |
104 | | |
105 | | JOSM now launches an external browser with the OSM website. Please login and follow the instructions. Then switch back to the OAuth Authorisation Wizard and click on '''Retrieve Access Token'''. |
106 | | |
107 | | [[Image(semi-automatic-step-2.png)]] |
108 | | |
109 | | 2. '''Step 3/3''' - Accept the Access Token |
110 | | |
111 | | JOSM displays the retrieved Access Token. Click on '''Accept Access Token''' to accept it. |
112 | | |
113 | | [[Image(semi-automatic-step-3.png)]] |
114 | | |
115 | | |
116 | | ==== Advanced OAuth parameters ==== |
117 | | When JOSM semi-automatically requests and authorises an Access Token, it uses default values for the OAuth parameters. Advanced users may want to change these parameters |
118 | | * in order to use a different Consumer Token (consisting of a Consumer Key and a Consumer Secret). This allows you to create your own Consumer Token for JOSM and then use it in JOSM. |
119 | | * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with an OSM development server or with a local installation of the OSM server application. |
| 113 | ==== Advanced OAuth parameters ==== #AdvancedOAuthparameters |
| 114 | When JOSM semi-automatically requests and authorizes an Access Token, it uses default values for the OAuth parameters. Advanced users may want to change these parameters: |
| 115 | * in order to use a different Consumer Token (consisting of a Consumer Key and a Consumer Secret). This allows you to create your own Consumer Token for JOSM and then use it in JOSM. |
| 116 | * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with an OSM development server or with a local installation of the OSM server application. |