Add support for third-party OSM clients#39
Merged
Merged
Conversation
Contributor
|
i'm not used to the keys and the locks both present in a URL, been digesting this today and unless someone man-in-the-middles us on Starbuxx wifi or has access to our webserver logs (and it's enforced https) i don't have any immediate red flags. seems like flexibility is very important to get open source things talking to one another, so the direction seems correct. if fears become an issue perhaps these tokens become very very short-lived. APPROVED also make sure this works on dev cuz dev API ain't happy right now, something is still dead-stopping calls to the API without error logs i can find. mebbe we need to start runbooks by knowing how to verify services are running correctly, so i can help troubleshoot beyond docker logs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes enable third-party clients to connect to the Workspaces APIs more easily. JOSM is the primary use case--the JOSM preferences UI does not provide a way to select a workspace by ID (via HTTP header) or authenticate via the TDEI.
With this PR, users can configure their tools to point to Workspaces by entering an OSM API URL. Here's a template:
...where
tdei-auth-tokenis an access token obtained using the TDEI authentication API, andworkspace-idis the ID of the workspace the client will interact with.The
tdei-auth-tokenvalue appropriates the username component of the URL. A client may also send anAuthorizationheader with the request according to the HTTP basic authentication scheme with a username field set to the value of the TDEI access token.In fact, this is how JOSM must be configured:
Unfortunately, even with the changes in this PR, TDEI tokens expire, and users must manually refresh and re-enter the tokens in their tools.