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

Enable undoing everything on uninstall #27

Open
MasonSchneider opened this issue Jan 28, 2016 · 3 comments
Open

Enable undoing everything on uninstall #27

MasonSchneider opened this issue Jan 28, 2016 · 3 comments

Comments

@MasonSchneider
Copy link
Collaborator

"Any certificate changes made by the add-on must be reverted. You can decide how exactly you are going to implement that as long as that policy is not violated."

@WilsonKathleen
Copy link

Perhaps a good place to start is to see how the "Refresh Firefox" button works to reset the root store.
https://support.mozilla.org/en-US/kb/reset-preferences-fix-problems

May be related:
https://wiki.mozilla.org/CA:UserCertDB#How_To_Restore_Default_Root_Certificate_Settings

I have also sent email to a developer who should be able to provide some suggestions. Will let you know what I find out.

@WilsonKathleen
Copy link

Question for the add-on folks: Can the user make the choice whether to revert to Firefox's default root store or not? Or does uninstall necessarily mean that the root store must be reverted? (i.e. user does not have a choice)

My thoughts on approaches...

Keeping a log and rolling back the changes sounds complicated and error prone, especially when you consider that the user could use both the built-in Certificate Manager and the Add-on -- rolling back the changes via the Add-on could undo changes made in the Certificate Manager, and could also undo changes made during Firefox release updates or security patches.

Another option is to take a snapshot of the user8.db file when the Add-on is installed, then switch back to that version with the Add-on is uninstalled. But that seems risky too, because in the meantime the user might have made a change to the root store for security reasons, and that would get lost. Similarly there might have been Firefox releases or security patches that changed the root store, and those changes would get lost.

I think the safest approach would be to do whatever the Firefox Refresh button does with the root store.

@WilsonKathleen
Copy link

From my email exchange with the developer:

How about if they give the user a choice?

  1. Restore root store to state before Add-On was installed -- so
    basically they make a copy of user8.db with the add-on is installed, and
    then they can move back to it if the user selects this option.
  2. Restore the root store to the current Firefox default root store (reset)
  3. Leave root store as-is, I want to keep the changes I have made to the
    root store since installing the Add-On.

This sounds like a good approach. I recommend saving the triple
{cert8.db, key3.db, secmod.db}.
For case 2, they should just be able to delete all three files (or move
them to a backup location, just in case).

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

4 participants