Git Product home page Git Product logo

firefox-tab-islands's Introduction

Firefox Tab Islands

Assign URLs to open in "tab islands" to isolate the cookies, logins, and tracking information they share.

Tab Islands is designed to be:

  • Strict by default: only URLs assigned to an island will open in that island.
  • Lightweight: small featureset relying on Firefox's native contextual identities.
  • Portable: use the same config across anywhere you use Firefox.

How Islands work

An Island represents a Firefox "contextual identity" (CI). From Mozilla:

"Contextual identities", also known as "containers", are a browser feature which addresses the idea that users assume multiple identities when browsing the web, and wish to maintain some separation between these identities.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contextualIdentities

CIs are useful to anyone who might use the web with multiple "identities":

Users can log into multiple accounts on the same site, even when the site does not natively support concurrent sessions.

  • A user may wants (sic) to manage their work and personal Gmail accounts side-by-side in the same window.
  • A user has a Facebook or eBay account for their business and one for their personal life.

https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers#Benefits_and_Use_Cases

They also provide significant privacy protections against tracking sites:

Provides protection against tracking while still providing access to services

  • A user wants to log into Facebook and keep the site open while they browse the web, but doesn't want Facebook buttons to track them across sites.
  • A user wants to use Gmail but doesn't want their google searches linked to their Google account.

https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers#Benefits_and_Use_Cases

What this extension does

This extension allows users to associate a URL (or partial URL) with a CI. It then enforces that when the user navigates to a URL associated with a CI, the tab that URL opens in belongs to that CI. It also enforces that only URLs associated with a CI will open in tabs belonging to that CI. URLs not associated with a CI open in the "default" CI.

A case study in Google, Facebook, and the NYTimes

For example, imagine you have a CI for your Google account and a CI for your Facebook account. Say you're reading the NYTimes in a tab with no associated CI, and you want to send an email. If you type in mail.google.com to the Firefox URL bar, Tab Islands will open a new tab in your Google CI and load your email - isolating your news article from your Google accounts, and ensuring you're logged into your email automatically.

Now imagine you get an email with a Facebook link in it, and click it. Tab Islands will then open a new tab in your Facebook CI and open the link there, isolating your Facebook activity from your Google accounts (and vice versa).

Now imagine you want to go back to reading the news, and you type in nytimes.com to the URL bar. Tab Islands will open another new tab, this time in the default CI, isolating your news articles from both your Facebook and Google accounts.

And this all happens automatically!

Installing

Tab Islands is available on the Firefox Addons store!

Setting up your contextual identities

TODO: add instructions for creating and installing URL <-> CI mappings.

Development

To get started, clone or fork this repo and run:

$ yarn install # or `npm`
$ yarn build

Then, follow Mozilla's official steps to install/debug a temporary addon.

Acknowledgements

This project was inspired by Mozilla's multi-account-containers project.

firefox-tab-islands's People

Contributors

dependabot[bot] avatar nathanshelly avatar sashaweiss avatar

Stargazers

 avatar

Watchers

 avatar

firefox-tab-islands's Issues

Interactive settings page

We should have an interactive settings page for islands and routes, that also supports importing and exporting a config.

Acceptance criteria:
[ ] Can create/delete an island interactively
[ ] Can create/delete a route interactively
[ ] Can export interactive settings as a config
[ ] Can import a config to interactive settings

Naming and descriptions are inconsistent

We should standardize naming to firefox-tab-islands and Tab Islands, and make sure descriptions are consistent across the package.json, manifest.json, and README.md.

Standardize logging

Top-level (exported) methods should log at the beginning and end to indicate what they're doing and when it completes, and then errors should be logged as they occur.

Cmd-clicking a link that opens in a different island switches to that new tab

For example, clicking on links from a google search page (from the google island)

cmd-click

In this example the links open in the default (no specific cookies) island. The same behavior occurs if the link would open in a different island like say a facebook one.

If the link would open in the same island the current tab retains focus as expected (say clicking on a "google.com/flights" link in the above example).

Perform basic validation of the settings JSON

  • all routes have existing islands at either end (and that all islands are mapped?)
  • if an icon and/or color are specified they match enums
  • no unsupported keys
  • maybe allow JSONC? comments could definitely be useful

Old tab in untidy state after being switched to new island

If I'm in tab A, and get switched to a new tab B because of a URL I'm trying to navigate to, tab A is left in an untidy state. Specifically, it's left open but with the desired URL in the URL bar. We should instead:

  • If tab A is an "empty" tab (was a fresh tab), we should simply close it.
  • If tab A had content in it (e.g., navigating to a link clicked from an email), we should reset the URL bar and leave it open.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.