Open Bug 1191418 (ContextualIdentity) Opened 9 years ago Updated 1 year ago

[META] Contextual Identity / Containers Bugs

Categories

(Core :: Security, task)

task

Tracking

()

People

(Reporter: englehardt, Unassigned)

References

(Depends on 135 open bugs, Blocks 1 open bug)

Details

(Keywords: meta)

Attachments

(1 obsolete file)

The Contextual Identity Project (see: https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers) aims to add lightweight containers/profiles into the browser to give users the ability to segregate their local state (cookies, localStorage, etc) based on the context they are browsing in. Example uses cases: * User has multiple accounts on websites and wants to be logged into both simultaneously. One in a personal context, the other in a work context. * User wants a session that persists but doesn't leak information to trackers about their browsing behavior in other contexts. (Ex: doesn't want the shopping context to affect the ads they see in their work context. * A user wants to remain logged into a social network without being tracked across the web This meta-bug is a collection of the related bugs supporting this project.
Depends on: 1181953, 1179557, 1179985
Depends on: 1191442
Depends on: 1191451
Depends on: 1191455
Depends on: 1191460
Depends on: 1191494
Depends on: 1193854
Depends on: 1195881
Depends on: 1199466
Depends on: 1199470
Depends on: 1199471
Alias: ContextualIdentity
Depends on: 1211716
How about setting usercontext on bookmarks?
Depends on: 1213290
You can look at the https://getmultifox.com/ extension as example how this works - it provide per-tab select identity (cookie and session storage) for users. But Multifox Firefox extension will stop working after Firefox remove XPCOM support, and seems there are no ways to provide this feature via new Firefox WebExtensions API, so build-in contextual identity will be useful feature!
I see that "Image Cache" is not separated by this, but a lot of tracking is done with images. Wouldn't this leak info across contexts?
(In reply to donrhummy from comment #3) > I see that "Image Cache" is not separated by this, but a lot of tracking is > done with images. Wouldn't this leak info across contexts? Image Cache should be separated in the same way Necko Cache is. Is that not the case it our current implementation? Huseby, can you check on this and file a bug if needed? This may be a Desktop only issue.
Flags: needinfo?(huseby)
Depends on: 1234672
Depends on: 1237364
I'll check it out.
Flags: needinfo?(huseby)
Depends on: 1238766
Depends on: 1240243
Depends on: 1240094
Depends on: 1244340
Depends on: 1244795
Depends on: 1244887
Depends on: 1245124
Depends on: 1245184
Depends on: 1245262
It seems like people are starting to look into implementing this. Exciting! I think we need to handle many of the places in the code where we store data on disk related to the user's browsing. One example is cookies. It's probably a good idea to have a consistent model everywhere. I think the right approach should be for the user context ID to be stored alongside the data (perhaps encoded in the origin string) and in code using the data read from the disk we should be careful to not read another user's data, nor modify/delete them. This basically gives us a solid virtual per-user-context-ID container for the stored data. Finding all of the necessary call sites to audit and handle can be daunting. I think a good starting point would be places where we check the private browsing mode, since a lot of them map to code that wants to store something about the user's browsing to disk, so that should find many of the places we need to fix, and we have covered almost all of those places over the years. Not sure how much this matches the current thinking, and/or who to direct this too. Andrea, do you know? Thanks!
Flags: needinfo?(amarchesini)
> Not sure how much this matches the current thinking, and/or who to direct > this too. Andrea, do you know? Thanks! Absolutely. We are doing that using OriginAttributes everywhere. It's a big task but it has been almost fully done. There are plenty dependences here and many depending bugs are metabugs: bug 1197283, 1153435, etc. Cookies, localStorage, IDB, quota, all of this is already fully managed and it works. If you are interested or you have specific questions, we have a weekly meeting on Wednesday. I'll ping you tomorrow on IRC to tell you more :)
Flags: needinfo?(amarchesini)
Depends on: 1245502
No longer depends on: 1245184
Depends on: 1245184
Depends on: 1246907
Depends on: 1247517
Depends on: 1248251
Depends on: 1248302
Depends on: 1248639
Depends on: 1249224
Depends on: 1249348
Depends on: 1253006
Depends on: 1253538
Depends on: 1254103
Depends on: 1259169
Depends on: 1260535
Keywords: feature, meta
Depends on: 1267538
Depends on: 1267916
Depends on: 1267920
Depends on: 1267921
Depends on: 1267922
Depends on: 1267923
Depends on: 1264556
Depends on: 1264562
Depends on: 1268726
Depends on: 1264571
Depends on: 1264564
Depends on: 1269029
Depends on: 1146401
Depends on: 1270423
Depends on: 1270471
Depends on: 962365
Blocks: 962374
Depends on: 1268803
Depends on: 1270678
Depends on: 1270679
Depends on: 1270680
Depends on: 1270681
Depends on: 1270683
Depends on: 1271792
Depends on: 1272043
Depends on: 1272067
Depends on: 1272256
Depends on: 1272466
Depends on: 1272754
Depends on: 1273215
Depends on: containers_testing
Depends on: 1274211
Depends on: 1274246
Depends on: 1274461
Depends on: 1274567
Depends on: 1275432
Depends on: 1275485
Is there some documentation for addon developers? The container concept is awesome, but the default UI for containers does not reflect how I would like to use it.
Depends on: 1276412
(In reply to The 8472 from comment #8) > Is there some documentation for addon developers? The container concept is > awesome, but the default UI for containers does not reflect how I would like > to use it. We don't have much documentation yet, just https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers. If you are looking for something like Containers with different UI, you probably want documentation about OriginAttributes. But OriginAttributes are fairly new, so I'm not sure there is documentation on that yet either. What would you like to do in your addon?
Flags: needinfo?(bugzilla.mozilla.org)
(In reply to Tanvi Vyas - behind on reviews [:tanvi] from comment #9) > What would you like to do in your addon? a) ability to dynamically create or destroy new containers b) assign the container on tab navigation / opening tabs c) assign a different container to sandboxed iframes The idea is to automatically compartmentalize things based on origin wherever reasonable. Let's say I have the following tabs open + embedded 3rd-party content: - a forum, turns posted links to youtube into embeds - a blog, requires recaptcha for anonymous comments - Youtube - Gmail - Google Google, Youtube, Gmail shouldn't have to share logins or cookies even though they all load stuff from google. And since I don't want to make a conscious effort of opening google or youtube videos in the "correct" container it should determine that based on the page URL. For the YT embed iframes I would like to choose whether they load with an anonymous container (spawned and destroyed on demand) or with my YT account. And recaptcha needs to build some reputation if you don't want to get those terrible inkblots, so you can't just block cookies, but it doesn't need to associate my blog comment activity with my google account. Or with other sites also using recaptcha for that matter.
Flags: needinfo?(bugzilla.mozilla.org)
Depends on: 1276877
Depends on: 1276880
Depends on: 1276904
Depends on: 1277570
Depends on: 1277765
No longer depends on: 1277570
Depends on: 1279029
Depends on: 1279099
Depends on: 1279140
Depends on: 1279143
Depends on: 1278177
Depends on: 1279271
Depends on: 1279297
Depends on: 1279337
Depends on: 1279103
Depends on: 1279568
Depends on: 1279622
Depends on: 1280253
Depends on: 1280333
Depends on: 1280590
Depends on: 1280863
Feature Request: One useful feature would be to have the option to have a window be "sticky" about the context it's using, so that new tabs would automatically use a given context. I know that links from tabs in a given context stay within that context, but opening up new tabs (using the "+" or the keyboard shortcuts) open in the original, default context.
Depends on: 1282655
Depends on: 1282660
Depends on: 1283314
Depends on: 1283319
Depends on: 1283320
Depends on: 1283325
Depends on: 1280549
Depends on: 1283491
Depends on: 1283495
Depends on: 1280697
(In reply to JR Conlin [:jrconlin,:jconlin] from comment #11) > One useful feature would be to have the option to have a window be "sticky" > about the context it's using, so that new tabs would automatically use a > given context. I.e., a re-implementation of profiles, but without the separation of UI that profiles provide. If this is going to be the way of the future, I'd at least like to see the ability to separate bookmarks as well - when I go into work mode, I want to streamline away all the personal bookmarks I have and concentrate on those that are relevant to the work I'm doing. I use profiles and the bookmarks toolbar extensively to be able to get to common tasks quickly in whichever context I'm working. As I work for three different companies in addition to my freelancing and personal stuff, I consider profiles to be a much better solution, but if they're going away (bug #214675) Containers had better allow me to concentrate on one context at once instead of mixing them.
(In reply to Iain Hallam from comment #12) > (In reply to JR Conlin [:jrconlin,:jconlin] from comment #11) > > One useful feature would be to have the option to have a window be "sticky" > > about the context it's using, so that new tabs would automatically use a > > given context. > > I.e., a re-implementation of profiles, but without the separation of UI that > profiles provide. If this is going to be the way of the future, I'd at least > like to see the ability to separate bookmarks as well - when I go into work > mode, I want to streamline away all the personal bookmarks I have and > concentrate on those that are relevant to the work I'm doing. I use profiles > and the bookmarks toolbar extensively to be able to get to common tasks > quickly in whichever context I'm working. As I work for three different > companies in addition to my freelancing and personal stuff, I consider > profiles to be a much better solution, but if they're going away (bug > #214675) Containers had better allow me to concentrate on one context at > once instead of mixing them. Containers are not meant to replace profiles. Profiles are great and have their own set of uses cases. Containers is for a different use case, where a separate profile feels to heavy weight for the task at hand.
Depends on: 1284985
Depends on: 1285513
Depends on: 1285515
Depends on: 1285518
Depends on: 1285677
Depends on: 1285889
Depends on: 1286357
Depends on: 1287001
Depends on: 1287765
Depends on: 1287879
Depends on: 1288029
Depends on: 1288057
Depends on: 1288504
Depends on: 1288858
Depends on: 1289130
Depends on: 1289131
Depends on: 1289571
Depends on: 1289832
No longer depends on: 1280590
Depends on: 1291521
Depends on: 1291524
Depends on: 1294336
Depends on: 1294786
Depends on: 1294866
Depends on: 1295750
Depends on: 1297477
No longer depends on: 1297477
Depends on: 1297738
Depends on: 1299480
No longer blocks: 962374
Depends on: 1301430
Depends on: 1301523
Blocks: 1301617
No longer blocks: 1301617
Depends on: 1301617
Depends on: 1302566
Depends on: 1302697
Depends on: 1302157
Depends on: 1302597
Depends on: 1280590
Depends on: 1303911
Blocks: 1304875
Depends on: 1305280
Depends on: 1305592
Depends on: 1306684
Depends on: 1309067
Depends on: 1310276
Depends on: 1311845
Depends on: 1315055
Depends on: 1315673
Depends on: 1316283
Depends on: 1316359
Depends on: 1316727
Depends on: 1316740
Depends on: 1316742
Depends on: 1316744
Depends on: 1316747
Depends on: 1316919
Depends on: 1317138
Depends on: 1317544
Depends on: 1317927
Depends on: 1318491
Containers works very well on Firefox 52 and 53 versions and very useful, thanks for this improvement! I fully switched to it from Multifox extension, and will be glad to see on stable versions. But I miss feature to change container of already opened tab - this is unavailable in tab context menu, and via click on container icon in Location bar too :( Please add switching container for current opened page in tab to Right-click menu on tab and to click on container icon in Location bar. Thanks!
Depends on: 1319045
Depends on: 1318352
Depends on: 1319346
Depends on: 1318652
Depends on: 1319929
Depends on: 1320355
Depends on: 1320368
Depends on: 1320376
Depends on: 1320378
Depends on: 1320041
No longer depends on: 1320376
Depends on: 1317185
Also "Open in Container tab" menuitem missed on bookmark items, please add in this place too.
Depends on: 1321914
Depends on: 1322387
Depends on: 1322856
Depends on: 1317182
Depends on: 1323873
Depends on: 1324551
Depends on: 1325014
Depends on: 1312954
Depends on: 1324115
(In reply to Murz from comment #14) > Containers works very well on Firefox 52 and 53 versions and very useful, > thanks for this improvement! I fully switched to it from Multifox extension, > and will be glad to see on stable versions. > > But I miss feature to change container of already opened tab - this is > unavailable in tab context menu, and via click on container icon in Location > bar too :( > > Please add switching container for current opened page in tab to Right-click > menu on tab and to click on container icon in Location bar. Thanks! I agree. The main usability issue with Containers right now is that there is currently no way to change the context of the current tab, which is supported in other implementations (Multifox, etc.)
Depends on: 1325886
Depends on: 1326087
Depends on: 1326058
Depends on: 1328756
Depends on: 1328935
Depends on: 1329411
Depends on: 1329453
Depends on: 1329456
Depends on: 1329643
Depends on: 1330745
Depends on: 1331595
Depends on: 1333214
Depends on: 1334013
Depends on: 1335678
Depends on: 1335706
Depends on: 1337937
Developers, can you provide example how we can change Container for current tab in custom script/extension via WebExtensions API or other way? Thanks
https://github.com/mdn/webextensions-examples/tree/master/contextual-identities << you can reload tab using cookieStoreId prop. https://blog.mozilla.org/addons/2016/11/18/webextensions-in-firefox-52/ Btw, browser.contextualIdentities and browser.devtools API is still missing on https://developer.mozilla.org/en-US/Add-ons/WebExtensions, any new or experimental API should be listed there, if not a complete description of it (because they are still creating), at least with links to some other place with partial description.
Depends on: 1338505
Depends on: 1338735
Depends on: 1340450
Depends on: 1345643
Depends on: 1340993
Depends on: 1346434
Depends on: 1346653
Depends on: 1347604
Depends on: 1359232
Depends on: 1360614
Depends on: 1368469
Depends on: 1368815
Depends on: 1368942
Depends on: 1369053
Depends on: 1369761
Depends on: 1327947
Depends on: 1373822
No longer depends on: 1365512
Depends on: 1325884
Depends on: 1240623
Depends on: 1273058
Depends on: 1293420
Depends on: 1309735
Depends on: 1401408
Depends on: 1401488
Depends on: 1405888
Depends on: 1406031
Attachment #8915986 - Flags: review?(gijskruitbosch+bugs)
Attachment #8915986 - Flags: review?(amarchesini)
Attachment #8915986 - Attachment is obsolete: true
Depends on: 1419589
Depends on: 1419591
Depends on: 1422056
Depends on: 1425124
Depends on: 1428241
Depends on: 1442346
Depends on: 1386673
Depends on: 1450774
Depends on: 1439237
Depends on: 1454188
Depends on: 1443673
Depends on: 1456161
Depends on: 1485582
Depends on: 1489502
Depends on: 1491984
Depends on: 1502167
Depends on: 1511449
Depends on: 1512802
Depends on: 1514791
Depends on: 1521443
Depends on: 1521986
Depends on: 1524959
Depends on: 1545950
Type: defect → task
Depends on: 1554527
Depends on: 1554567
Depends on: 1555166
Depends on: 1555367
Depends on: 1560580
Depends on: 1538128
Depends on: 1574766
Depends on: 1581872
Depends on: 1586960
Depends on: 1479858
Depends on: 1600477
No longer blocks: 1545307
Depends on: 1545307
No longer blocks: 1604432
Depends on: 1604432
Depends on: 1616137
Depends on: 1623424
Depends on: 1620757
Depends on: 1631433
Depends on: 1634119
Depends on: 1634431
Depends on: 1636187
Depends on: 1638554
Depends on: 1642651
Depends on: 1636987
Depends on: 1656149
Depends on: 1656776
Depends on: 1661951
Depends on: 1663547
Depends on: 1677947
Depends on: 1692124
Depends on: 1726540

Hi! I really like the multi container tabs, I use it everyday.

There is just one feature which me and other would really like to be implemented. I'm talking about enabling a default container, as for now, when you do CTRL+T aka new tab event, it opens in a default container, or, if I understand correctly from the source code, an internal container which is called "no container".

This is quite annoying in a daily basis because I use containers for everything, the "no container" container is useless for me.

I really want to implement a default container because this feature change seems quite straight forward, as the mock-up code below:

onNewTab((url) -> {
  if (!hasAssignedContainer(url)) {
    const defaultContainer = getDefaultContainer();
    openInContainer(defaultContainer, url);
  }
  ...
});

This would require to expose a method for setDefaultContainer and getDefaultContainer in the containers API for extensions.

So, this is basically the second time I contribute with the Mozilla Firefox ecosystem and I have a bunch of questions regarding where to start this implementation. Things like "where is the new tab handler for assigned URL's" would be very helpful to me.

Mateus, I suggest you create a new bug for your suggestion and mark it as a blocker for this one.

I wish you a Happy New Year!

Sebastian

Depends on: 1758921
Severity: normal → S3
Depends on: 1731313
Depends on: 1800971
Depends on: 1806732
Depends on: 1711037
Depends on: 1810538
Depends on: 1813350
Depends on: 1814542
Depends on: 1814969
Depends on: 1823065
Depends on: 1504782
Depends on: 1646985
Depends on: 1749962
Depends on: 1846754
Depends on: 1846714
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: