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

Require authentication to create Via links #74

Closed
lyzadanger opened this issue Dec 15, 2020 · 7 comments
Closed

Require authentication to create Via links #74

lyzadanger opened this issue Dec 15, 2020 · 7 comments

Comments

@lyzadanger
Copy link
Contributor

It might not slow people down too much, but we could track the origins of malign links and potentially disable them, or have a few other levers at our disposal.

@lyzadanger lyzadanger added this to the 4 - Idea factory milestone Dec 15, 2020
@esanzgar
Copy link

One possible implementation for this:

  • allow serving requests through via if referrer is bouncer or via
  • if the referrer is different then allow the request only if the link was created using the form in via

At the point of creating a link using the form in via the URL could be saved in a database of allowed URL that can be served without referrer.

Using the form could only be allowed to only authenticated users.

@seanh
Copy link
Contributor

seanh commented Dec 18, 2020

An easier way to do this might be to only allow Via links to pages that have at least one annotation in the h DB (a question that's conveniently answerable by h's badge endpoint). That way, in order to generate a new Via link, you need to sign up for a Hypothesis account, verify your email, and create an annotation on the page.

Unauthenticated users trying to follow a Via link to an unannotated page could be presented with a page along the lines of example.com hasn't been annotated yet. Be the first! [Sign up] [Log in] (and Via would not proxy example.com at all until the user is logged in or the page has an annotation).

After all, we don't really need to allow unauthenticated users to proxy unannotated pages through Via, do we?

@lyzadanger
Copy link
Contributor Author

@seanh Your idea is quite intriguing.

After all, we don't really need to allow unauthenticated users to proxy unannotated pages through Via, do we?

I think there might be a chicken and egg situation here in which a user (who maybe isn't using the extension, e.g.) wants to be able to annotate a page in the first place. That is: the use case in which Via is providing the actual annotation mechanism for someone...

@seanh
Copy link
Contributor

seanh commented Dec 18, 2020

I think there might be a chicken and egg situation here in which a user (who maybe isn't using the extension, e.g.) wants to be able to annotate a page in the first place

I think the suggestion actually improves this situation. Given a unauthenticated user going to an unannotated page in Via:

  • Currently on master the user will be presented with the page, plus a thin grey line down the right hand side which they may not even notice or understand what it is. If they do notice the bucket bar they can click on it to open the sidebar. The sidebar will instruct them to create an annotation by selecting text and clicking annotate. If they do that, they will get an error message because they aren't logged in, and their work of selecting the text and clicking annotate is lost. They can now click sign up or log in.

  • With the suggested change: instead of the proxied page the user will be presented with a replacement page saying something to the effect of "example.com hasn't been annotated yet. Be the first! Sign up Log in." So they're immediately presented with what they actually need to do (sign up or log in) and once they've done that the page can change so that they can annotate

I'd say that's a significant improvement to the experience of an unauthenticated user trying to annotate an as-yet unannotated page in Via, even regardless of the security benefits

@jon-betts jon-betts changed the title Way out there idea: Require authentication to create Via links Require authentication to create Via links Jan 5, 2021
@jon-betts
Copy link
Contributor

This is probably less important as a result of the idea of allow listing, which serves as a first line of defence. We should revisit this once we've done that

@seanh
Copy link
Contributor

seanh commented Jan 14, 2021

I'm gonna close this issue as I think the decision to move public Via to an allow-list changes this fundamentally. I've opened another issue that's sort of a remix of this idea in the context of an allow-list: Allow authenticated users to bypass the allow-list

@seanh
Copy link
Contributor

seanh commented Jan 14, 2021

Also added another new issue that tries to capture @lyzadanger 's original idea here a bit better, in the context of an allow-list: Allow certain users to create "blessed" Via links that bypass the allow-list

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

No branches or pull requests

4 participants