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

add users by username #97

Closed
sethvincent opened this issue Aug 22, 2019 · 14 comments
Closed

add users by username #97

sethvincent opened this issue Aug 22, 2019 · 14 comments

Comments

@sethvincent
Copy link
Contributor

Currently we can only add users by their OSM id. Ideally we'd be able to add them by username.

@LanesGood
Copy link
Member

@kamicut @sethvincent This should be a high priority, potentially to develop before SOTM. The current methods of finding user id's make creating teams onerous. I wonder if there is any code we can integrate from similar projects, like https://github.com/Zverik/whosthat.

@geohacker
Copy link
Member

Osmcha has an experimental instance of whosthat here, we could ask Wille if it'd be ok to use.

@sethvincent
Copy link
Contributor Author

We should consider a temporary solution that targets public osm data.

Long-term we need an approach that can work with osm-seed / other deployments of osm infrastructure.

@batpad
Copy link
Member

batpad commented Oct 14, 2022

@kamicut do we have a solid idea of how we do this? Running infrastructure ourselves to maintain a user id to username mapping and keeping it up-to-date seems like a bunch of work and over-head. Is there a service we can use and just do some caching on our end or so? Would be great to flesh this issue out a bit / discuss -- not sure right now if it's a reasonably straightforward thing or an entire separate infrastructure project to get working.

@kamicut
Copy link
Member

kamicut commented Oct 14, 2022

There was a service for this if I recall but it's no longer running.

I think we should have a weekly cron job on top of the Athena planet OSM that we could open up to the community. It would be useful for a lot of apps. We could have it then added to dynamo or elastic search as long as it's not something too expensive to run.

@kamicut
Copy link
Member

kamicut commented Oct 14, 2022

Since the user<>id map is a small amount of data maybe we can use this s3 tool (uses http range for querying) https://github.com/litements/s3sqlite

We could even package a lambda with the csv/sqlite output of the cron job as part of its dependencies.

@LanesGood
Copy link
Member

@kamicut were you referring to http://whosthat.osmz.ru?

@LanesGood
Copy link
Member

Potential solution for stand-alone service

  • Create an sqlsqlite lambda function from athena
  • Read directly off s3

@kamicut I suggest you add details for a potential plan here.

@geohacker
Copy link
Member

I'd advocate not building our own service for this and use http://whosthat.osmz.ru. Especially in the context on OSM Teams, a weekly updating orc isn't going to be enough. The future of the orc files on AWS are also unclear at this point and it wouldn't make a lot of sense to build something on top of it.

Gives us a really easy way to look up: https://whosthat.osmz.ru/whosthat.php?action=info&id=146675

@willemarcel
Copy link
Contributor

I remembered an easy way to discover the uid of OSM users that have created at least 1 changeset. Make a request to https://www.openstreetmap.org/api/0.6/changesets?display_name={username} and get the uid from the first changeset. If there isn't a user with that username, the request will return 404 error, what is a plus.

@LanesGood
Copy link
Member

@willemarcel this is very useful, thanks for sharing! I think this has been discussed in the past, and I remember one issue is that one of the main user groups has multiple users who will have just signed up for OSM when they are being added to a team.

We could add a caveat that only users with at least one changeset can be added via username if this approach is implemented. However, this may not be an acceptable requirement.

@batpad
Copy link
Member

batpad commented Mar 16, 2023

Haa .. I would be super curious to test whozthat or any of the other services if they actually are able to give any user information before a user has created a single changeset. The problem here is I just don't know where OSM may make this data available: i.e. of a new user sign-up before they actually create a changeset.

As an OSM data consumer, afaik, the only time you get information about a "user" is when that username + id shows up in a changeset file exported on planet.openstreetmap.org (or by querying the API in the way @willemarcel mentioned) - so I do think there might be a fundamental problem where this is actually just not possible to do for users who have not yet created a changeset (unless you had direct access to the osm database, which we don't).

Will be good to know if @kamicut @geohacker @vgeorge anyone has ideas on how it might even be theoretically possible to get a username <-> user id mapping if the user has never created a changeset. This might just have to be a caveat we are explicit about in the UI. But will be good to know if I'm missing something and this data is exposed by OSM somewhere.

@geohacker
Copy link
Member

geohacker commented Mar 16, 2023

whosthat uses replication https://github.com/Zverik/whosthat so that's also after a user creates an edit. I don't think user registration information is published by the OSM API anywhere else unless that person makes an edit.

@willemarcel
Copy link
Contributor

I believe the only way to get the user id before a user has made an edit would be:

  • Ask the user to log in on OSM Teams, so we will have the username and id in the database
  • Ask the user to inspect the HTML of the osm.org page or do an API request and get the id from there

I'm curious to know how the team managers on OSM Teams get that information nowadays, as there isn't an easy way.

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

No branches or pull requests

7 participants