Confirmed users
1,247
edits
(→Implementation: Linkify bugs) |
|||
(10 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
= Authors | = Authors = | ||
*'''Dan Witte''' <dwitte@mozilla.com> | *'''Dan Witte''' <dwitte@mozilla.com> | ||
Line 5: | Line 5: | ||
= Overview = | = Overview = | ||
== Problem == | |||
Privacy on the web is not well controlled by the user. There are cases where the user has explicit and desired relationships with sites (or, in the broader sense, entities), and also expects and understands that those entities may have relationships with other entities. A good example of this is Facebook Connect, where establishing a relationship between the user, a site such as Digg, and Facebook is an explicit and desired action; in these cases, the user has given ''informed consent''. | |||
''' | However, there are cases where this is not true. This may be due to ''implicit consent'', where a legitimate relationship exists but the user is not aware of it, or does not understand its extent; in other cases, ''unintended consent'', where a relationship exists that, were the user aware of its existence and scope, would not agree to it. Examples of the former could be the Facebook "Like" button, which can allow Facebook to determine what sites a user is visiting without their knowledge; or credit unions, where the exchange of information (via the browser) with a third party domain to implement various banking functions is common. An example of the latter could be online advertising companies building behavioral databases of user behavior, consisting of their actions across many sites over time. Such databases, if expansive enough in scope, can be used to gather ''personally identifiable information'' (PII) without user expectation or consent. | ||
== Goals == | |||
* | *Improve user awareness of what they're consenting to, be it informed, implicit or unintended. There are two broad approaches to this: improving awareness in general, such as by education efforts; and in specific cases, by making it clearer within the browser what relationships exist between entities on the web. | ||
* | *Make it easier for the user to specify and control the relationships to which they consent, and those to which they do not, in as seamless a way possible. For the cases where the user does not explicitly consent, or explicitly rejects a specific relationship, honor that decision. | ||
*With the above in mind, ensure that popular and useful services on the web -- such as Facebook Connect, OpenID, and banking -- continue to work as seamlessly as possible. | |||
*Contingent on user experience and quality of implementation, enable these policies and controls by default for Firefox 4. | |||
= Use cases = | |||
To frame the following proposal and discussion, these are some simple examples of behavior on the web: | |||
: | |||
#User visits multiple shopping sites, which have resources from ad sites embedded in iframes, images, or requests made directly from script. They are unaware the advertiser can track their movements across those sites. | |||
#User visits a site that embeds the Facebook "Like" button, but does not want their Facebook login cookies automatically sent. | |||
#User visits their credit union, which uses third party resources for banking functions, and wants those functions to work. | |||
#User visits a site that uses OpenID, Facebook Connect, or other federated login service, and wants to be able to log in to those services and use them with the site. ''Todo: OpenID may actually not require cookies on the first party site at all -- information is passed in a backchannel. Need to confirm. What about other authentication-related services?'' | |||
= Proposal Overview = | = Proposal Overview = | ||
Line 35: | Line 36: | ||
Cookies are only sent back in situations where the double-keys are the same. For instance, when browsing buy.com, cookies set by an image hosted on ads.google.com would only be sent back when browsing buy.com; not when browsing another site. | Cookies are only sent back in situations where the double-keys are the same. For instance, when browsing buy.com, cookies set by an image hosted on ads.google.com would only be sent back when browsing buy.com; not when browsing another site. | ||
In addition, third party cookies are discarded after the session (i.e. on browser close). | In addition, third party cookies are discarded after the session (i.e. on browser close). ''This may be going too far -- it does not necessarily strike a good balance wrt UX/privacy. We might not want this as default behavior.'' | ||
''Definitions:'' | ''Definitions:'' | ||
Line 65: | Line 66: | ||
== Rationale == | == Rationale == | ||
Again, let me reiterate -- what matters here is '''not''' ''how the user thinks of a particular action'', but ''whether the action is related, in an integral way, with the current site''. | Again, let me reiterate -- what matters here is '''not''' ''how the user thinks of a particular action'', but ''whether the action is related, in an integral way, with the current site''. This may seem counterintuitive, but: assume we have per-site cookie sandboxes; the problem now comes down to which sandbox to put each cookie into. This is less related to user perception than to how tightly coupled a given transaction is with a given sandbox. | ||
We have some hard data points here, but more is always better, and will allow us to make a more informed decision on how these changes will affect the web. | We have some hard data points here, but more is always better, and will allow us to make a more informed decision on how these changes will affect the web. | ||
Line 84: | Line 85: | ||
:''Is the assertion really correct that open redirects should be first party? Counterexamples?'' | :''Is the assertion really correct that open redirects should be first party? Counterexamples?'' | ||
:''Random thought: we could introduce the concept of ''per-tab'' sandboxes (i.e. per docshell). A toplevel redirect could switch mode from double-keying by URIs to keying by docshell. This way, the concept of first party vs. third party disappears -- all cookies for that particular tab get their own sandbox. Complicates things a bit, but might solve the problem of deciding which sandbox a redirect goes into.'' | |||
:5. Consider two cases: ad popups, and login popups. Both need to be considered as having a first party domain of window.opener. By way of example -- Facebook Connect uses a popup window for the Facebook login; this login cookie then needs to be accessible from within an iframe on the original site. Otherwise, the Facebook content will not appear, and in fact the login process will entirely fail. The only way to fix this, with the predicate that iframe is third party, is to keep the popup window within the same sandbox. Conceptually, it makes some sense that popups be considered related to window.opener. | :5. Consider two cases: ad popups, and login popups. Both need to be considered as having a first party domain of window.opener. By way of example -- Facebook Connect uses a popup window for the Facebook login; this login cookie then needs to be accessible from within an iframe on the original site. Otherwise, the Facebook content will not appear, and in fact the login process will entirely fail. The only way to fix this, with the predicate that iframe is third party, is to keep the popup window within the same sandbox. Conceptually, it makes some sense that popups be considered related to window.opener. | ||
Line 99: | Line 102: | ||
= Implementation = | = Implementation = | ||
Relevant bugs: | |||
* {{Bug|565965}}: Double-key cookies by (first party domain, setting domain). Work is in progress. | |||
* {{Bug|565475}}: Make third party cookies persist for the session only. This is controlled by a hidden pref, ''network.cookie.thirdparty.sessionOnly''. Landed on trunk. | |||
* Develop a more intuitive way for the user to indicate that they trust a certain site to interact with other sites. | |||
* Implement the first party carry-over rules described above, probably as a separate service such that localstorage etc. can use it. | |||
* Apply the rules developed here to localstorage and such. | |||
= Further Steps = | = Further Steps = |