-
Notifications
You must be signed in to change notification settings - Fork 4
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
Privacy by design with browser-managed E2E encryption and Fenced Frames #31
Comments
Hello all, really enjoy this post. The web has a privacy and data problem, and it stems from its basic storage model as is highlighted in this post. Redact is an open-source implementation of exactly a protocol like the one described here, with some modifications. For one, there is no deep integration with browser code, the frame implementation is provided via a server that runs locally next to the browser. Although it is not feature complete and alpha at best, there is a functional "redacted" website which can be accessed and browsed via a regular web browser securely after the basic software is installed locally. It includes:
You can get started with it here: https://docs.redact.ws/en/latest/ If the privacy community group has any interest in discussing something like this I would love to be a part of that discussion! I'll also drop a link to a discussion in a rust group about this here. |
Hi all! An interesting question is it possible to integrate Solid with this proposal here? @ajpauwels @Minigugus @hober @dmarti @chrisn 1. Context1.1 What is WebAuthn?WebAuthn is a browser-based API that allows for web applications to simplify and secure user authentication by using registered devices (phones, laptops, etc) as factors. It uses public key cryptography to protect users from advanced phishing attacks. 1.2 Why use WebAuthn?
1.3 What is Solid Project?Solid is a specification that lets people store their data securely in decentralized data stores called Pods. Pods are like secure personal web servers for your data. 1.4 Why use Solid?
2. Possible solutions to general information security problems
3. "Universal laws for optimal data security"
4. My concept
5. FAQ
6. Notes
7. References
|
@ajpauwels I think you've understood the main point of this proposal 👍 Yet, running a local server, plus using a lot of iframes risk to slow down adoption of this proposal. Moreover, security measures are best implemented at browser level (for instance with Redact, it's not possible to protect against malicious web extensions). If possible, like you, I would like to discuss this proposal further with those interested 🙂
The goal of this proposal is especially to avoid privacy issues by never sharing user data with third-parties, so I don't think Solid is compatible and comparable with this project. Also, letting users choose what they want to share would require a common data format for data storage, which is really constraining both for website developers and browsers developers. However, this proposal encourage WebAuthn for authentication with the storage provider. |
Offline-only storage
Here is a summarized description of traditional architecture for web apps:
This architecture works great, except for privacy: the web app publisher owns users data (or at least this architecture
requires the web app publisher to have full access to users data, in order for the web app to work properly). This is an
issue, for users, but also for the web app publisher:
database for users account, and so on...)
Actually, with this architecture, the web app publisher doesn't really have the choice to own user data. The modern web
offers solutions to theses issues (e.g. PWAs), but that's not enough for web apps in production that could leverage
browser storage as main storage provider (e.g. single player games, IDEs, authenticators/passwords managers apps):
encrypted apps: listening to DOM changes is enough)
the only way for users to access their data on multiple device.
Theses are true blockers for many web apps that could work entirely without a back-end. A good example of such apps are
single-player games, or even authenticator/passwords managers apps: web app's publisher must not be able to access
highly sensitive user data, and once loaded, the app doesn't need a server to provide credentials (OTP for instance), then
the best would be to only store user data client-side only, but that's risky: the browser may not encrypt browser's
storage, and even worse, the user might accidentally clean application storage permanently, which is extremely dangerous
for OTP. As a result, authenticator/passwords managers apps can't be built as web apps, or at least required E2E
encryption + authentication, which is costly for the publisher, and don't prevent all security risks (on compromised
update of the front-end code could still leak sensitive user data). As explained below, the solution proposed here try
to address these issues with a small architecture change for web apps that opt-in.
Proposed solution: External storage provider + Fenced frames
Offer to web apps a way for storing all data client-side rather than server-side, but with the trade-off of loosing
network access (to prevent data leaks):
As shown above, the proposed solution consist of 2 parts:
The external part is important: it let the user choose where their data should be stored: on disk storage (probably
the default), cloud-based storage (using an account, for multi-device synchronization), or anything else the community
can provide (let web extensions endorse the role of storage provider for instance). Also, for privacy reasons,
browsers should encrypt user data before passing them to the storage provider, so that providers don't have access to
what's stored, not even web apps origins (i.e. no need for the user to trust the storage provider; data can even be
stored publicly (e.g. IPFS could work)). Follow points 2.8 and 2.11 of the W3C TAG Ethical Web Principles
.
frame too for instance). This is the final peace to add Privacy by design to all compatible web apps: this change
ensure that even the web app publisher won't be able to access user data. Web app can still opt-out at anytime, but
will lose access to what they stored then (browsers won't delete data thought, they'll just stay in the storage
provider). Follow points 2.5 and 2.8 of the W3C TAG Ethical Web Principles.
As a result, web apps using the offline-only storage will always respect user privacy. Browsers should then inform the
user about that positive point, so that web apps get "rewarded" with happier users (much like with the green lock when
websites preferred HTTPS over HTTP). That way, the web should tend to become safer at the same time.
For quite obvious reasons, the proposed solution have to be opt-in for web apps providers, or it would break all the
web. The "how" is still to be discussed thought.
Pros
encrypted data, no even possible to infer what origin the data is coming from)): since browsers are already
trusted for their sandboxing capabilities, and that most implementation are open source, it seems better that
way (only having to trust the browser)
left is the browser itself, but they proved to be very fast to deliver security fixes, often faster than web apps
providers
nothing to leak! Moreover, since each user store its own data, it becomes impossible to leak millions of users at
once (attackers would have to infect devices of each user). Finally, since storage providers only see encrypted
data, even storage providers leaks are not an issue
becomes possible for anyone to build a web app that's used by millions of users at no costs other than these
related to web app's development (especially with SXGs). This point can
really benefit to independent developers and small businesses, that generally can't afford good security measures
for user data protection.
per-origin basis
in improved user experience
back-end code for user data retrieval)
primarily because of the sensitivity of data that to the web app could leak, potentially to any server on the
internet. With communication disallowed, such risk no more exists, then maybe some features access could be
relaxed, or at least the user could choose which feature to enable by default on web apps supporting the solution
described here. Also, this new architecture give access to new potential features, e.g. allow reading third-party
and/or unpartitioned storage
analytics, maybe some proposals could be requested too I guess)
offline-only storage could still work on older browsers, without the privacy guaranties thought, but it's up to
the user to acknowledge the risks or not.
future proposals (e.g. privacy-respectful multi-users communication, offline cross-origin storage access, ...)
greener storage provider (avoiding cloud-based one for instance)
Cons
already exists, but they risk to become more intrusive than before. Anyway, web apps already get flagged as
malicious when they try to harm users so mitigation already available.
cases where the app breaks because of outdated user data. However, Service Workers' cache have a similar issue
that developers seams to handle quite well globally, so it's more a web app design issue. Also, nothing prevent
the web app publisher to stay on the traditional model, that's the trade-off to pay to enjoy the architecture
proposed here.
proposals may fix that, still in a privacy by design manner. Anyway, at least web apps who can, could.
web apps are compatible, and servers to servers, semantic web, and so on still need these tools
environment to adapt. Yet, it's not impossible as PWAs are already asked to work at least partially offline. Also,
incoming communications are still allowed, so real-time user experience might still be possible (
see Implementation details below for more details)
Implementation details
While this document is entitled "Offline-only", not all requests are expected to be blocked: actually, here, the meaning
of "offline-only" is more "side-effect free", i.e. that can't leak user data content. For instance, requests resulting
of a user navigation are side effect free, because the server can't infer anything about the user data content (assuming
the URL wasn't generated using user data - the anchor (
<a>
) case is still to be discussed thought). On the other side,it's not possible for the web browser to know which
fetch('http(s)://...')
requests are side effect free, so theyshould be blocked. JS-triggered requests may still be allowed on some cases thought, for instance with prefetched SXG,
but it's still to be discussed. Furthermore, note that readonly communication is still allowed while having user data
access (e.g. via
postMessage
(with SharedArrayBuffer disallowed), or reading Unpartitionned Storage).Depending on the feasibility, it might be possible to allow web apps to work in both trusted (user data access,
communication restrictions) and untrusted (no user data access, no communication restriction) modes, at the same time:
for instance, the service worker might be running in an untrusted context and the main page in a trusted one. The
service worker would be able to send messages via
postMessage
to the main page when a push notification is receivedfor instance.
Concerning how a web app request trusted mode, multiple solutions are available for discussion:
navigator.offlineStorage.enable()
):enable()
)location.reload()
to leave the trusted context without leakvia
postMessage()
)Offline-only storage could work in private browsing, since no user data would leave the browser anyway.
Link with Fenced Frames
The proposed feature could work like how Fenced Frames' read-only mode works. The main difference, however, is that a web app should be able to self-enter isolation mode (with some API), i.e. could work on top-level frames. This is important to allow browsers to notify the user that the displayed web page now operate privatly (good for web site reputation), and also to avoid top-level web documents to display a sole Fenced Frame HTML element when they want to use privacy-restricted APIs.
Other points to discuss:
in untrusted mode? 1 Service Worker per mode, or only one in untrusted for simplicity?
to be often the case as of today. Then, at least at the beginning, trusting web apps might be enough (not all
apps' data are critical), as long as we keep an eye on how the web evolves.
Conclusion
The suggested feature is ambitious, there are some implementation challenges to overcome, yet implications for security,
privacy and web's future are worth a look. Not all web apps can use the proposed storage, but at least some could,
empowering users by letting them deal with their data as they which. Anyway, I hope this document could contribute to
W3C privacy goals for the web.
Related
advertising only and without DOM access
data mobility issue)
Considered related as I think the design proposed here fit well (
especially High-Level Threats, since these threats no more
apply when parties can't access user data)
EDIT 2021/05/27: realized it's a form of E2E encryption (simpler to describe)
EDIT 2021/05/29: added the Storage Access API as a good candidate for implementing this API on
EDIT 2021/05/30: added links with Fenced Frames read-only mode
The text was updated successfully, but these errors were encountered: