Changes between Version 33 and Version 58 of Help/Preferences/Connection


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Preferences/Connection

    v33 v58  
    1 [[TranslatedPages]]
    2 = Preferences > Connection settings =
     1[[TranslatedPages()]]
    32
    4 [[TOC(inline)]]
     3= Preferences > OSM Server =
     4[[PageOutline(2-4,Table of content)]]
    55
    6 == The URL to the OSM server == #ApiUrl
     6[[JOSMImage(preferences/connection,48,link=,middle,margin-right=20)]]
    77
    8 === Downloading and uploading to the default server ===
     8Connection Settings for the OSM server
    99
    10 [[Image(use-default-api-url.png)]]
     10== Downloading and uploading to the default server ==#ApiUrl
     11[[Image(use-default-api-url.png,link=)]]
    1112
    12 Most JOSM users want to exchange geo data with the standard OSM server operated by the OSM community. 
     13Most JOSM users want to exchange geo data with the standard OSM server operated by the OSM community.
    1314
    1415Tick the respective checkbox in order to download from and upload to the standard server (see screenshot above). This is the default setting.
    1516
    16 === Advanced option: Downloading and uploading to a custom server ===
     17== Advanced option: Downloading and uploading to a custom server ==
    1718Some JOSM users need to configure the API URL of an OSM server because they are working with a custom server:
    18   * Some users are working with local installations of the OSM server
    19   * Some users are working with development and test instances of the OSM server (for instance with [http://api06.dev.openstreetmap.org]).
     19* Some users are working with local installations of the OSM server
     20* Some users are working with development and test instances of the OSM server (for instance with [https://api06.dev.openstreetmap.org]).
     21* Some users are mapping on other projects running the OSM server software, such as [https://www.openhistoricalmap.org OpenHistoricalMap] or [https://opengeofiction.net OpenGeofiction].
    2022
    21 [[Image(use-custom-api-url.png)]]
     23[[Image(use-custom-api-url.png,link=)]]
    2224
    2325In order to use a custom URL:
    24   1. Remove the tick in the checkbox for the standard API URL (see screenshot above)
    25   1. Enter the API URL
    26  
    27 Click on '''Validate''' to test whether an OSM API server is available at the given URL. If so, JOSM will display the icon [[Image(source:/trunk/images/dialogs/changeset/valid.png)]] to the right of the input field for the API URL. If the URL isn't valid, JOSM will display the icon  [[Image(source:/trunk/images/warning-small.png)]].
     261. Remove the tick in the checkbox for the standard API URL (see screenshot above)
     271. Enter the API URL
     28
     29Click on **Validate** to test whether an OSM API server is available at the given URL. If so, JOSM will display the icon [[JOSMImage(misc/green_check)]] to the right of the input field for the API URL. If the URL isn't valid, JOSM will display the icon [[JOSMImage(warning-small)]].
     30
     31The authentication settings below belong to the server: JOSM keeps them, and the Access Token, separately for each server, so you can switch between servers without authorizing again.
    2832
    2933
    30 == Authentication Settings ==#AuthenticationSettings
    31 
     34== Authentication ==#Authentication
     35[=#AuthenticationSettings]
    3236=== Working anonymously or with an OSM account ===
    33 
    3437You don't need to identify and authenticate yourself provided that you neither upload data to the OSM server nor download data for which you must authenticate first.
    3538
    36 If you work '''anonymously''' you are allowed
    37   * to download geo-data from the OSM server and save it to a local file 
    38   * to download public GPS traces from the OSM server 
    39   * to load geo data from a file, edit it, and save it back to a file 
     39If you work **anonymously** you are allowed
     40* to download geo-data from the OSM server and save it to a local file
     41* to download public GPS traces from the OSM server
     42* to load geo data from a file, edit it, and save it back to a file
    4043
    4144However, you can't
    42   * upload geo-data to the OSM server. You can't created, update, or close changesets either. 
    43   * download your private GPS traces 
     45* upload geo-data to the OSM server. You can't created, update, or close changesets either.
     46* download your private GPS traces
    4447
    45 You are recommended to [http://www.openstreetmap.org/user/new?referer=%2F create an OSM user account]. By using [http://www.openstreetmap.org/user/new?referer=%2F this form] you can choose an '''OSM username''' and an '''OSM password''' both of which you will use below.
     48You are recommended to [osmwww:user/new?referer=%2F create an OSM user account]. By using [osmwww:user/new?referer=%2F this form] you can choose an **OSM username** and an **OSM password**. You will enter them on the OSM website when you authorize JOSM, never in JOSM itself.
    4649
    47 === Basic authentication ===
    48 {{{
    49 #!html
    50 <p style="background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid; border-width: 1px;">
    51 <strong>Warning!</strong><br/>
    52 Basic authentication methode is quite unsecure. Please consider to use OAuth.
    53 The password is stored in plain text in the JOSM preferences file.
    54 Furthermore, it is transferred <strong>unencrypted</strong> in every request sent to the OSM server.
    55 <strong>Do not use a valuable password.</strong>
    56 </p>
    57 }}}
     50=== OAuth 2.0 based authentication ===#oauth2
     51[https://oauth.net/2 OAuth 2.0] is the way JOSM authenticates at the OSM server. Instead of giving JOSM your password, you log in on the website of the server, in your web browser, and authorize JOSM there. The server then issues an **Access Token** to JOSM, which JOSM sends with each request. Your password is never entered into JOSM nor stored by it, and you can revoke the token on the website at any time.
    5852
    59 Basic authentication is the basic mechanism to authenticate yourself at the OSM server.
     53OAuth 2.0 uses [wikitr:/Help/Preferences/RemoteControl Remote Control] to receive the token from the OAuth server. If Remote Control is disabled in preferences (default setting) it is temporarily enabled to receive the token and then disabled again.
     54**Note**: If you have issues authenticating, you can disable remote control in other running instances of JOSM and disable ''then'' re-enable it in the JOSM instance you are trying to authenticate.
    6055
    61 Here's a screenshot of the preferences panel for basic authentication:
     56==== Authorizing JOSM ====#AuthoriseNow
     57[[Image(oauth-2-not-authorized.png,500,link=)]]
    6258
    63 [[Image(basic-authentication.png)]]
     591. Click on **Authorize now**. JOSM opens the authorization page of the OSM server in your web browser.
     601. Log in, if the website asks you to, and allow JOSM to access your account.
     611. Go back to JOSM and click **OK** in the preferences to save the Access Token.
     62
     63You don't have to do this in advance: when you upload without an Access Token, JOSM asks ''Obtain OAuth 2.0 token for authentication?'' and goes through the same steps.
     64
     65**Authorize now** is disabled when JOSM has no OAuth Client ID for the server; see [#AdvancedOAuthParameters Advanced OAuth parameters] below.
     66
     67==== Once JOSM has an Access Token ====#AccessToken
     68[[Image(oauth-2-authentication.2.png,500,link=)]]
     69
     70* Deselect the checkbox **Save to preferences** if you don't want to save the Access Token in the JOSM preferences. If you don't save it the Access Token will be lost when you close JOSM. If you later startup JOSM again you will have to retrieve a new Access Token to work with OAuth based authentication again.
     71* Select **Use OAuth for all requests to …** to send the Access Token with downloads too, so that the server applies the limits of your account instead of those of your IP address.
     72* Click on **New Access Token** to authorize JOSM again and replace the token, for instance after you revoked it on the website. If this fails, JOSM keeps the token it has.
     73* Click on **Test Access Token** to submit a test request with the token to the OSM server. JOSM retrieves your user details with it: [=#AccessTokenOK] on success, it shows the user name and id the token belongs to; [=#AccessTokenFailed] otherwise it says whether the server rejected the token, or whether the server could not be reached.
     74* Click on **Remove token** to remove the current token from JOSM. This does not revoke it on the server; do that on the website. The `Authorize now` button will reappear. The advanced OAuth parameters you entered for the server are kept.
     75
     76==== Advanced OAuth parameters ====#AdvancedOAuthParameters
     77[[Image(oauth-2-advanced.png,500,link=)]]
     78
     79With **Use default settings** ticked, JOSM uses the OAuth settings it has built in for the server, or which the server publishes:
     80* The **OAuth Client ID** of the JOSM application registered on the server. JOSM has one built in for openstreetmap.org, the OSM development servers, [https://www.openhistoricalmap.org OpenHistoricalMap] and [https://opengeofiction.net OpenGeofiction].
     81* The **endpoints**: those the server publishes in its OAuth metadata ([https://www.rfc-editor.org/rfc/rfc8414 RFC 8414]); otherwise those of the OSM website software, which are the API URL without `/api`, followed by `/oauth2/authorize` and `/oauth2/token`.
     82
     83For any other server JOSM has no Client ID, so **Authorize now** stays disabled, and an upload ends with the message ''JOSM cannot obtain an OAuth Access Token for this server, because it has no OAuth Client ID for it''. Untick **Use default settings** and enter the settings of an OAuth 2.0 application registered on the server, either by you or by the server operator. On a server running the OSM website software, you can register one yourself under //My Settings > OAuth 2 applications//. Operators of a server can find what JOSM needs in [wiki:ServerOperators Using JOSM with your own OSM server].
     84
     85||= Field =||= What to enter =||
     86|| **Client ID** || The Client ID of the OAuth 2.0 application registered on the server. ||
     87|| **Client Secret** || Only needed if the application is registered as confidential. The applications JOSM has built in are public clients and have none. ||
     88|| **Redirect URL** || Must be exactly the redirect URL registered with the application. JOSM receives the authorization at `http://127.0.0.1:8111/oauth_authorization`, by remote control. ||
     89|| **Access Token URL** || Where JOSM gets the Access Token from: on the OSM website software, the address of the website followed by `/oauth2/token`, not the API URL. ||
     90|| **Authorize URL** || Where the web browser is sent to authorize JOSM: on the OSM website software, the address of the website followed by `/oauth2/authorize`, not the API URL. ||
     91
     92The application has to be allowed the permissions JOSM asks for: `read_gpx`, `write_gpx`, `read_prefs`, `write_prefs`, `write_api` and `write_notes`.
     93
     94Ticking **Use default settings** again replaces what you entered; JOSM asks before it does.[=#ResetToDefaults]
     95
     96==== Using an Access Token obtained outside JOSM ====#PasteAccessToken
     97The **Access Token** field, below the advanced OAuth parameters, shows the token JOSM has for the server. Instead of clicking **Authorize now**, you can paste a token there that you obtained in another way, and click **OK**. It needs the permissions listed above. Nothing else needs to be entered for a pasted token to work.
     98
     99=== Basic authentication ===#BasicAuthentication
     100''**([wikitr:/Help/ExpertMode Expert mode] only)**'' \\
     101With Basic authentication, JOSM sends your user name and password with every request. openstreetmap.org and OpenGeofiction no longer accept it, so JOSM does not offer it for them. It remains for testing your own server, for instance a local installation of the OSM website software. The choice between OAuth 2.0 and Basic authentication is only shown in expert mode, or while Basic authentication is selected.
     102
     103Here's a screenshot of the preferences panel for basic authentication:
     104
     105[[Image(basic-authentication.3.png,500,link=)]]
    64106
    65107To use Basic Authentication
    66108
    67   1. Go to the tab '''Authentication''' in the Connection Preferences
    68   1. Select the authentication method '''Basic authentication'''
    69   1. Enter your OSM username and your OSM password 
     1091. Go to the register **OSM Server** in Preferences
     1101. Select the authentication method **Basic authentication**
     1111. Enter your OSM username and your OSM password
    70112
    71 === OAuth based authentication ===
    72 [http://oauth.net/ OAuth] is an open protocol to allow secure API authorization  in a simple and standard method from desktop and web applications. The OSM server supports OAuth in addition to basic authentication.
    73 
    74 OAuth has two major advantages over basic authentication:
    75   1. Your OSM password doesn't have to be saved in clear text in the JOSM preferences file.
    76   1. Your OSM password has to be transferred encrypted '''only once''' over the Internet, in contrast to basic authentication where your OSM password is transferred unencrypted as part of every request sent from JOSM to the OSM server.
    77 
    78 Information about the use of OAuth is [wiki:/Help/Dialog/OAuthAuthorisationWizard here]
    79 
    80 Once initialized the access token is represented with the following options:
    81 
    82 [[Image(oauth-authentication.png,500)]]
    83 
    84 * Deselect the checkbox **Save to preferences** if you don't want to save the Access Token in the JOSM preferences. If you don't save it the Access Token will be lost when you close JOSM. If you later startup JOSM again you will have to retrieve a new Access Token to work with OAuth based authentication again.
    85 * Click on **Test Access Token** to submit a test request with the token to the OSM server. JOSM will analyse whether this token is authorized to access the OSM server.
    86 * Click on **New Access Token** to generate a new Access Token.
    87 * Selecting the checkbox "Display advanced OAuth parameters" to get the [wiki:Help/Dialog/OAuthAuthorisationWizard#AdvancedOAuthparameters advanced OAuth parameters] displayed.
    88 
    89 == Proxy Settings == #ProxySettings
    90 JOSM communicates with the OSM server using the Hypertext Transfer Protocol ([http://en.wikipedia.org/wiki/Http HTTP]). If required it can relay its requests through a [http://en.wikipedia.org/wiki/Http_proxy HTTP proxy] or a [http://en.wikipedia.org/wiki/SOCKS SOCKS proxy].
    91 
    92   1. Go to the tab '''Proxy settings''' in the Connection Preferences
    93   1. Select one of the available options and enter additional configuration parameters
    94   1. Save the preferences
    95 
    96 [[Image(proxy-settings.png,500)]]
     113JOSM stores your password in clear text in its preferences file, unless a plugin such as native-password-manager keeps it elsewhere.
    97114
    98115
    99 === Using the standard system proxy ===
    100 If you always want to use the proxy defined as standard proxy on your computer you have to start up JOSM with a special command. The command line has to include the parameter {{{-Djava.net.useSystemProxies=true}}}, for instance
     116== New OSM account messages and max age of closed OSM Notes ==
     117=== New OSM account messages ===
     118JOSM, by default, periodically checks for unread OSM account messages. Unchecking ''**Periodically check for new messages**'' will disable the check (''advanced preference'': `message.notifier.enabled`). Below the checkbox the interval in minutes can be set (''advanced preference'': `message.notifier.interval`). The default value is `5` minutes.
    101119
    102   {{{java -Djava.net.useSystemProxies=true -jar josm.jar}}}
     120=== Max age of closed OSM Notes ===#OSMNotes
     121The maximum age in days of closed [wikitr:/Help/Dialog/Notes OSM Notes] can be set (''advanced preference'': `osm.notes.daysClosed`). The default value is `7` days. See [wikitr:/Help/Dialog/Notes#AdvancedPreferences Advanced preferences for notes] for details.
    103122
    104 === Using the manually configured proxy ===
    105 If there is a need for personal authentication for your proxy, remember to include the NT-domain with your username, e.g. ''domain\username''. This issue is due to proxy implementation in java.net.HttpURLConnection.
     123
     124== Overpass server ==#OverpassServer
     125''**([wikitr:/Help/ExpertMode Expert mode] only)**'' \\
     126Configure the Overpass API instance used for downloading OSM data (for instance in [wikitr:/Help/Action/Download#DownloadfromOverpassAPI Download from Overpass API]) (''advanced preference'': `download.overpass.server`). See [osmwiki:Overpass_API#Public_Overpass_API_instances for a list of servers]. \\
     127With a checked ''**Use Overpass server for object downloads**'' the overpass server is used for all actions which request to download specified objects like [wikitr:/Help/Action/DownloadObject Download Object], [wikitr:/Help/Action/DownloadParentWaysAndRelation Download parent ways/relations …] or downloading (incomplete) members of relations (''advanced preference'': `download.overpass.for-multi-fetch`).
    106128
    107129----
    108 Back to [wiki:/Help/Action/Preferences Preferences][[Br]]
    109 Back to [wiki:Help Main Help]
     130Back to [wikitr:/Help/Action/Preferences Preferences] \\
     131Back to [wikitr:/Help/Menu/Edit Edit Menu] \\
     132Back to [wikitr:/Help/Menu Main Menu] \\
     133Back to [wikitr:/Help Main Help]