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

Issue temporary auth tokens for guest accounts, and allow tracking of these tokens #29011

Open
ShadowJonathan opened this issue Jan 29, 2024 · 1 comment
Labels
suggestion Feature suggestion

Comments

@ShadowJonathan
Copy link
Contributor

ShadowJonathan commented Jan 29, 2024

Pitch

Have Mastodon Web acquire a "guest token" when loading a page, so that it can issue all further API requests through this token.

Then allow admins (or developers) to set access limitations to this token, such as IP ranges, browser AP, or other markers, to then recognise a user by.

Motivation

After figuring out that someone is specifically scraping /accounts/:id/statuses with account IDs they previously got, I want to lock down our server, and/or make it more difficult to make actors "simply" use open API access like this to grab posts.

First I looked to close API access completely unless it had a browser cookie, but API requests dont contain a browser cookie (which could implicitly have contained a browser session)

This approach would at least slow down unbounded and unchecked scraping, and allow admins to build tools to track, check, and block suspicious traffic.

@ShadowJonathan ShadowJonathan added the suggestion Feature suggestion label Jan 29, 2024
@solonovamax
Copy link

also, perhaps:

  • rate limits for how frequently a new "guest token" can be issued for an ip, or ip ranges. (if the guest token only is valid for, say, 15 mins, then allow more than 1 token per 15 mins, as sometimes legitimate users may clear browser cookies and re-request a page, only to be blocked)
  • allow admins to disable the guest token all-together, if they do not want unauthenticaed users to view posts
  • limitations to frequency of requests even when you have a guest token

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

No branches or pull requests

2 participants