Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cookies to be sent with HTTP replication requests #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nakaner
Copy link

@Nakaner Nakaner commented May 7, 2018

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.txt in the working directory next to the configuration.txt file. configuration.txt needs to be extended by a property attachCookie = true to 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

@amandasaurus
Copy link
Contributor

FYI there is a file format for storing cookie, the original Netscape "cookie jar" format. Many tools (e.g. Python's http.cookiejar library, curl, wget (There's references to RFCs, but I don't wanna read them now)). As far as I can tell, you're just storing the cookie's value in a file.

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?

@simonpoole
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants