Changes between Initial Version and Version 1 of Ru:Help/Dialog/OAuthAuthorisationWizard


Ignore:
Timestamp:
2010-01-13T19:56:39+01:00 (14 years ago)
Author:
calibrator
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Ru:Help/Dialog/OAuthAuthorisationWizard

    v1 v1  
     1[[TranslatedPages]]
     2= Мастер авторизации OAuth =
     3[[TOC(inline)]]
     4
     5== OAuth in a nutshell ==
     6[http://oauth.net/ OAuth] is an open protocol to allow secure API authorization  in a simple and standard method from desktop and web applications.
     7
     8=== Standard use case - keep your OSM password private ===
     9The standard use case in OSM for OAuth is to keep your OSM password more private than with Basic Authentication.
     10
     11OAuth has two major advantages over Basic Authentication:
     12  1. Your OSM password doesn't have to be saved in clear text in the JOSM preferences file.
     13  2. Your OSM password has to be transferred '''only once''' over the Internet, in contrast to basic authentication where your OSM password is trasferred as part of every request sent from JOSM to the OSM server.
     14
     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/>
     19Currently, 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
     23In OAuth terminology, a JOSM user authorises JOSM to access the OSM server on his behalf. During the authorisation process he never has to enter his OSM password into a JOSM dialog if he or she doesn't fully trust JOSM (unless he wants 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 users password and they can be revoked at any time.
     24
     25=== Advanced use case - delegate access to other mappers ===
     26A more advanced use case for OAuth is to delegate access to your OSM account to other mappers. OAuth allows you to grant another user restricted access to your account if necessary.
     27
     28Example: Mapper A can grant mapper B the right to download its private GPS traces from the OSM website. Mapper A would generate an OAuth Access Token and restrict to the privilege "Download my private GPS traces". He would then send an email with the Access Token to mapper B. B can enter the Access Token in JOSM and he is now allowed to download A's private GPS traces from the OSM server. He wouldn't be allowed to upload date on A's behalf, though, and he doesn't know A's OSM password. At any time, A can revoke the Access Token issued for B.
     29
     30
     31== The OAuth Authorisation Wizard ==
     32
     33=== What does authentication/authorization mean? ===
     34When you upload geodata to the OSM server you have to tell the server who you are. The OSM server asks every uploading mapper to '''identify''' himself with an OSM username. The OSM server furthermore needs to '''authenticate''' this identity, i.e. to reliably determine whether the mapper is indeed who he or she claims to be. For this purpose, it asks for a password in addition to the username. The servers assumption is, that whoever knows the secret password for username xyz is reliably authenticated to ''be'' xyz. A mapper logging in with his username and password is entitled to run a broad range of operations on the server. He or she 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 which 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 do on the server.
     35
     36This is where OAuth comes into play: OAuth allows you to '''authorise''' somebody else to act in a restricted way on your behalf. Instead of giving away your OSM username and your OSM password, which would fully entitle the recipient to act on your behalf at the OSM server, you only give away a "ticket" on which the granted rights are listed. This ticket is called an '''Access Token'''. Restrictions applied to an Access Token include:
     37  * an Access Token is only valid for a specific client (called a Consumer in OAuth terminology), i.e. only for JOSM, but not for OpenStreetBugs
     38  * an Access Token is only valid for specific operations, i.e. only for uploading GPS traces, but not for uploading map data
     39  * an Access Token could only be valid for a certain time, i.e. only today, but this is not yet supported by the OSM server
     40
     41In addition to username/password pairs, the OSM server also accepts OAuth Access Tokens to authenticate and authorise a user. More specifically, it accepts requests ''signed with such a token'', but this is beyond of the scope of this online help.
     42
     43The OAuth Authorisation Wizard supports you to receive a valid OAuth Access Token, provided that you have an OSM username and an OSM password, or to enter and use an OAuth Access Token in JOSM, provided that you got one from somebody else who has an OSM username and an OSM password.
     44
     45=== Fully automatic authorization process ===
     46The easiest way to get an Access Token is to let JOSM fully automatically retrieve one from the OSM server.
     47
     48 1. '''Step 1/2'''  - Get the Access Token
     49
     50    Enter your OSM username and your OSM password and click on '''Authorise now'''.
     51   
     52    [[Image(fully-authomatic-1.png)]]
     53
     54 2. '''Step 2/2''' - Accept the Access Token
     55
     56    JOSM displays the retrieved Access Token. Click on '''Accept Access Token''' to accept it.
     57   
     58    [[Image(fully-authomatic-2.png)]]
     59
     60==== Restricting the granted privileges ====
     61When JOSM fully-automatically requests and authorises an Access Token, it grants it five privileges:
     62  * the right to upload data to the OSM server
     63  * the right to upload GPS traces to the OSM server
     64  * the right to download private GPS traces from the OSM server
     65  * the right to read the preferences stored on the OSM server
     66  * the right to write preferences stored on the OSM server
     67
     68These are the default settings. If you want to restrict the granted privileges
     69
     70  1. Click the tab '''Granted rights'''
     71  2. Deselect each privilege which should not be granted to the requested Access Token
     72
     73    [[Image(fully-authomatic-privileges.png)]]
     74
     75==== Advanced OAuth parameters ==== #FullyAutomaticAdvanced
     76When 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
     77 * 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.
     78 * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with a OSM development server or with a local installation of the OSM server application.
     79
     80In order to edit the Advanced OAuth parameters
     81
     82  1. Click the tab '''Advanced OAuth parameters'''
     83  2. Deselect the checkbox '''Use default settings'''
     84  3. Enter your values for the five OAuth parameters
     85
     86      [[Image(fully-automatic-advanced.png)]]
     87
     88=== Semi-automatic authorization process ===
     89You 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 user which - for whatever reason - never want to use their OSM password outside of the OSM website. Note however, that the semi-automatic process is '''not''' significantely more secure  than the fully automatic process. Your OSM password will be transferred in cleartext over the Internet, too, because the OSM website currently doesn't provide a login page protected by HTTPS. The fully automatic process runs exactly the same steps you run manually in the semi-automatic process, just without your intervention.
     90
     91
     92 1. '''Step 1/3'''  - Get the Request Token
     93
     94   Click on '''Retrieve Request Token''' to retrieve an OAuth Request Token.
     95   
     96    [[Image(semi-automatic-step-1.png)]]
     97
     98 2. '''Step 2/3''' - Authorise the Request Token in an external browser
     99
     100    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'''.
     101   
     102    [[Image(semi-automatic-step-2.png)]]
     103
     104 2. '''Step 3/3''' - Accept the Access Token
     105
     106    JOSM displays the retrieved Access Token. Click on '''Accept Access Token''' to accept it.
     107   
     108    [[Image(semi-automatic-step-3.png)]]
     109
     110
     111==== Advanced OAuth parameters ====
     112When 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
     113 * 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.
     114 * in order to use it on a different than the standard OSM server. For instance, this allows users to use OAuth with a OSM development server or with a local installation of the OSM server application.
     115
     116In order to edit the Advanced OAuth parameters
     117
     118  1. Select the checkbox '''Display Advanced OAuth Parameters'''
     119  2. Enter your values for the five OAuth parameters
     120
     121  [[Image(semi-automatic-advanced.png)]]
     122
     123=== Manual authorization process ===
     124The manual authorisation process allows you to enter an arbitrary Access Token. You can use this process
     125
     126  * to enter an Access Token you have kept in a secure place, for instance in a secure store for credentials
     127  * to enter an Access Token you have received from somebody else, for instance from another mapper who granted you restricted access to his OSM account
     128
     129 1. '''Step 1/1'''  - Enter the Access Token and accept it
     130
     131   Enter the Access Token and click on '''Accept Access Token'''.
     132
     133  [[Image(manual.png)]]
     134 
     135
     136==== Advanced OAuth parameters ====
     137 * See [wiki:/Help/Dialog/OAuthAuthorisationWizard#FullyAutomaticAdvanced advanced preferences in the fully automatic process].
     138