Allow cookies to be sent with HTTP replication requests - #40
Open
Nakaner wants to merge 2 commits into
Open
Conversation
Contributor
|
FYI there is a file format for storing cookie, the original Netscape "cookie jar" format. Many tools (e.g. Python's The format is quite simple. It should be easy to add, and then you're not inventing a new file format. Maybe the http library in osmosis supports this easily? |
Contributor
|
@Nakaner could you fix the checkstyle complaints (you should be using JAVA conventions for method names, that is mainly camel case)? It would be nice if we could move forward on the easy to fix privacy issues at last. |
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.
This is work in process but feedback is appreciated.
Geofabrik's download server has been requiring an authentication cookie for all OSM data which contains sensitive personal metadata (username, user IDs, changeset IDs) since Thursday. Data protection regulations require us to ensure that only authorized users access personal metadata.
To use the new cookie support of Osmosis, users have to place a file called
cookie.txtin the working directory next to theconfiguration.txtfile.configuration.txtneeds to be extended by a propertyattachCookie = trueto enable cookie support.The server-side authentication software is open source. There is also a client to retrieve cookies automatically (it is necessary to do this every 48 hours for security reasons).
I will add an additional call to the bot API [1] of the Geofabrik Download server to make it possible for Osmosis to check the validity of the cookie instead of checking for HTTP status 301 (redirect to osm.org OAuth authorization form).
The OSM Foundation might choose to use existing software to reduce the necessary work because they have to do similar changes to planet.openstreetmap.org.
This is a follow-up of geofabrik/sendfile_osm_oauth_protector#2 raised by @pedro042
[1] unofficial name