https-everywhere icon indicating copy to clipboard operation
https-everywhere copied to clipboard

Discussion about out-of-band ruleset updates

Open jeremyn opened this issue 9 years ago • 97 comments

(@Hainish, @cowlicks:)

There's a code branch https://github.com/EFForg/https-everywhere/tree/sign-rulesets that is intended to allow ruleset updates out-of-band from regular version updates. The idea is that HTTPS Everywhere will request ruleset updates from a central EFF server periodically with the effect that rulesets will update from time to time without the version year.month.day changing.

Privacy Badger does something similar for a whitelist it uses. Recently there were some problems with the updates which lead to a frustrating experience for me, see https://github.com/EFForg/privacybadger/issues/1466. After I understood what was happening, I argued against it, see for example https://github.com/EFForg/privacybadger/issues/1466#issuecomment-315792144 and the related discussion.

I think this is also a bad idea for HTTPS Everywhere and I'd like to understand why this change is being made. I would at least like to avoid the user experience of things cycling between breaking and working for no apparent reason that I had with Privacy Badger.

jeremyn avatar Sep 17 '17 19:09 jeremyn

I am the ex-maintainer of HTTPSE and now a maintainer of Brave, which is a downstream user of HTTPS Everywhere rulesets. I just wanted to say that it would be pretty useful for us to have the HTTPS Everywhere rulesets available separate from the extension itself on an endpoint with some level of trustworthiness, ranging from "valid TLS cert on eff.org" to "code signed by offline HTTPS Everywhere signing key". My current update process is: wait for Bill to email out about an extension update, verify that there are no breaking changes to ruleset format, download the XPI, unzip, extract rulesets, re-package for Brave. Compared to other upstream lists like Tracking Protection, HTTPS Everywhere is relatively difficult to auto-update for a downstream project like Brave.

diracdeltas avatar Jan 15 '18 22:01 diracdeltas

It seems to me the main advantages of out-of-band updates are to allow more frequent ruleset updates and to let users choose to consume different ruleset feeds. From @diracdeltas 's comment it sounds like Brave just wants a more convenient way to consume the official rulesets at the same pace as the regular release cycle. We could solve that problem within the regular release process, for example @Hainish could separately package whatever @diracdeltas normally extracts and put a signed version of that up on the EFF website. The more complex update process proposed here isn't needed for that.

jeremyn avatar Jan 15 '18 23:01 jeremyn

After careful consideration I've decided to incorporate a few sub-features based on contributor feedback:

  1. Delivery of rulesets from a non-EFF domain. In situations where EFF is censored, this may prove useful. Of course, the censorship regime could also block the ruleset domain as well. However, even the GFC is rather spurious in what domains it chooses to block, and it is more likely that the specific high-profile domains hosting politicized content will be blocked, rather than single-purpose functional domains. In the future, we can build out the functionality to have multiple update channels, as a back-up if one is blocked.
  2. Toggle for OOB ruleset delivery. This should default to on, to ensure the maximum number of people are able to receive ruleset updates in a timely manner. However, some users may wish to turn auto-updates off. This toggle can be built into the options ui.
  3. Use the RSA-PSS ciphersuite. RSASSA PKCS1 v1.5 is weak, even in the signing context. WebCrypto supports a cipher that we should preference - RSA-PSS. Let's use this, at least until WebCrypto incorporates Ed25519.

With these improvements, a relatively simple update mechanism can be added which addresses all the considerations I've listed above. Over time, we can build out a more comprehensive ux for the update channels, as I noted above.

Newcomers to this issue: you can track the progress of this feature in the sign-rulesets branch.

Hainish avatar Jan 17 '18 19:01 Hainish

Closing this for now, since I've incorporated feedback from this discussion. Happy to have more feedback, though!

Hainish avatar Jan 25 '18 22:01 Hainish

Some of my points were not addressed, such as those in https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-330706469 (versioning, reset-to-stock, status dashboard) and my concern in https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-330997935 about what happens if updates are permanently unavailable for a particular user.

jeremyn avatar Jan 25 '18 22:01 jeremyn

@jeremyn updates will not cease to be available through extension updates. These will continue to be delivered for the foreseeable future. I suggest opening separate issues for feature specifics.

Hainish avatar Jan 25 '18 22:01 Hainish

@Hainish I opened this issue to have a discussion here, and the comments I linked are over three months old now. I understand wanting to wrap up an open-ended discussion but I brought those points up very early on. It would be great if you could give at least high level answers to those concerns here. If you implement those features and I have questions/suggestions for the implementation, I can make new issues then.

jeremyn avatar Jan 25 '18 22:01 jeremyn

@jeremyn I have addressed these issues, repeatedly in comments.

See https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-330711860, https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-358424399, as well as having implemented the ruleset toggle you mentioned in https://github.com/EFForg/https-everywhere/tree/sign-rulesets. Again, if you have specific requests on the development of this branch, let's move that to individual issues.

Hainish avatar Jan 25 '18 23:01 Hainish

@Hainish You did mention your support for versioning in https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-330711860, thanks for pointing that out. Also I suppose that for the user whose updates are permanently broken, the implied fix is to wait until the next full extension update. You haven't, as far as I know, addressed the reset-to-stock or status dashboard ideas, but those aren't really that important.

You keep mentioning the https://github.com/EFForg/https-everywhere/tree/sign-rulesets branch. Are you expecting contributors to monitor that branch and jump in if they have questions? Is that instead or, or will there also be, an announced alpha/beta release with enough time allowed to get and incorporate feedback?

jeremyn avatar Jan 26 '18 01:01 jeremyn

@jeremyn For reset to stock, I think that can be built out as part of a more comrpehensive UX that I mention in https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-344444263. I envision this as being dashboard-like, if I take your meaning correctly.

Incorporating the sign-rulesets into a beta release seems like a good idea, and relates to the email sent by @brainwane over the list. It does open broader issues of beta channel release overhead, which I'm hesitant to introduce. For now, the sign-rulesets branch should be considered on a track for feature inclusion, and I would encourage anyone interested in this feature to check the branch out and play with it. I've also created a new label, https://github.com/EFForg/https-everywhere/labels/sign-rulesets, and I'm adding it to this issue now.

Hainish avatar Jan 26 '18 21:01 Hainish

@Hainish So, my main concern with the functionality of this feature is to avoid the negative experience I had with the similar feature in Privacy Badger, which I discussed in my earliest comments in this discussion. I didn't know the feature existed in Privacy Badger, was surprised to find out it was contacting the EFF for updates, things cycled through breaking and working, and I couldn't stop, reset, or even know when these updates were happening. I'm not really concerned about the inclusion of any one specific subfeature, but rather that the unified whole is robust to failure, even in hostile networks, and that problems can be avoided, or fixed automatically or fixed by very low technical users. There's no mock/whiteboard/design document for what you are implementing so it's difficult to discuss it at that level, so instead we've been talking about individual subfeatures, which misses the point.

(I'm not saying you need to produce a design document or anything, I'm just trying to explain one reason why this conversation has been perhaps a little awkward.)

I probably won't track an active development branch in order to give comments. Maybe other contributors will do that. I think you would find it irritating for people to do that, most developers don't want to get bug reports on stuff they are actively coding. I understand what you mean about the burden of making a beta release, particularly in this case where you have no guarantee that anyone will review it even if the beta release is packaged beautifully. I'm not sure what to suggest about that. Maybe you could build a week or two gap in the middle of the development cycle for sign-rulesets, where you'll have something stable-ish for people to review if they want to, but also plan to work on something else during that gap so the time isn't wasted if no one responds.

jeremyn avatar Jan 26 '18 22:01 jeremyn

@Hainish So, my main concern with the functionality of this feature is to avoid the negative experience I had with the similar feature in Privacy Badger, which I discussed in my earliest comments in this discussion. I didn't know the feature existed in Privacy Badger, was surprised to find out it was contacting the EFF for updates, things cycled through breaking and working, and I couldn't stop, reset, or even know when these updates were happening. I'm not really concerned about the inclusion of any one specific subfeature, but rather that the unified whole is robust to failure, even in hostile networks, and that problems can be avoided, or fixed automatically or fixed by very low technical users.

The reason for that failure, as well as why it doesn't affect this branch, was explained over four months ago: https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-330711605. sign-rulesets was never affected, since we have had a robust process for ruleset verification since day one. In Privacy Badger, no verification was present at all, afaik. I did not work on that feature, and the underlying cause of that bug is absent here. So a bug in another project I do not work on seems hardly relevant here. It is an EFF project, but there are a different set of people working on the security-focused HTTPS Everywhere and the privacy-focused Privacy Badger.

After implementing the sub-features in https://github.com/EFForg/https-everywhere/issues/12606#issuecomment-358424399, I think the most sensible thing to do is to solicit reviews, with instructions on how to build and test from sign-rulesests. If no one responds, that will be that - all I can do is extend the invitation. I wouldn't be blocking my time on this feature - in any case, I'd be working on other things.

Hainish avatar Jan 26 '18 22:01 Hainish

@Hainish Where Privacy Badger failed, for me, wasn't in whether it verified downloads, but in that it didn't tell the user what was happening and gave them no tools to fix problems. If you want to talk about how you're avoiding the Privacy Badger problem, the discussion should be about UX/UI improvements, not about cryptographic signing, which is good but not really the issue.

If you had a phone, and one day you discovered the phone has been bricked, and you learn it's because some update failed, would you be upset at the vendor because of the update bug, or would you be upset because there was a way for your phone to be bricked without warning and with no way to recover it? Probably the second, and you wouldn't really care about the update bug at that point.

That sounds reasonable about announcing a review. If no one responds, there's not much you can do. Is there, or will there be, a ruleset endpoint available for testing?

jeremyn avatar Jan 26 '18 23:01 jeremyn

@jeremyn from a user perspective you are suggesting it be clear how to turn the feature on and off, plus having some sort of indication of an error if things fail?

wonderchook avatar Jan 27 '18 00:01 wonderchook

@wonderchook Yes, pretty much. Turn on or off, show the current version, report errors in a friendly way, and allow users to roll back updates.

jeremyn avatar Jan 27 '18 00:01 jeremyn

@jeremyn I'll consider the best way to balance user controls and clear design for this PR. Notably, I've mentioned that certain UX controls will have to be added later, as we build out this feature. Others (such as display of the ruleset version and source) may make sense for initial rollout.

Hainish avatar Jan 30 '18 22:01 Hainish

https://github.com/EFForg/https-everywhere/tree/sign-rulesets now includes versioning information for rulesets in the popup.

Hainish avatar Mar 08 '18 19:03 Hainish