WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
193590
add support for encrypted localstorage
https://bugs.webkit.org/show_bug.cgi?id=193590
Summary
add support for encrypted localstorage
Gurdal
Reported
2019-01-18 13:36:21 PST
add support for encrypted localstorage using SQLite Encryption Extension (
https://www.sqlite.org/see/doc/trunk/www/index.wiki
) encryption will be enabled only when ENABLE_SQLITE_ENCRYPTION_EXTENSION feature is turned on and SqLite3See library is found.
Attachments
Patch
(26.84 KB, patch)
2019-01-18 14:03 PST
,
Gurdal Oruklu
gurdal_oruklu
: review?
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gurdal Oruklu
Comment 1
2019-01-18 14:03:32 PST
Created
attachment 359537
[details]
Patch
Geoffrey Garen
Comment 2
2019-01-22 11:09:45 PST
What's the target use case / platform for this? Why just LocalStorage and not other storage technologies? Why doesn't this patch include regression tests? On Darwin platforms, our preferred solution for data protection is the application container and/or filesystem-level encryption. I could imagine adding API for other styles of data protection on non-Darwin platforms, but I think we would want that API to be per WebsiteDataStore, and not per individual storage technology.
Darren Mo
Comment 3
2022-06-12 13:02:05 PDT
+1 to encrypting the entire `WebsiteDataStore`. One use case would be to add an extra layer of protection for sensitive data in addition to filesystem-level encryption. As far as I know, there is no per-user encryption on macOS and no per-app encryption on Darwin platforms. Geoffrey, do you have some thoughts on how to implement such a feature? I’m new to WebKit. I assume we need to - Accept an encryption key. Should we support a single encryption algorithm/key type or support multiple? - Encrypt/decrypt data. Does this happen inside `WebsiteDataStore`? Are there existing cross-platform WebKit APIs for encryption/decryption that we can reuse?
Geoffrey Garen
Comment 4
2022-06-13 10:48:27 PDT
> - Accept an encryption key. Should we support a single encryption > algorithm/key type or support multiple?
I don't know. I suppose it depends on the purpose of the feature. If the purpose of the feature is to enable one user to encrypt their data separately from another user on the same device, then there's no obvious reason to allow a client to specify the encryption algorithm, and an API that picked an algorithm automatically would be easier to use.
> - Encrypt/decrypt data. Does this happen inside `WebsiteDataStore`? Are > there existing cross-platform WebKit APIs for encryption/decryption that we > can reuse?
This is a challenging question. WebKit uses many different storage technologies implicitly. Sometimes SQLite, sometimes flat files, sometimes encoded plists, sometimes something chosen by another framework in a way that is opaque to WebKit (e.g. cookies). It's not obvious to me at which layer we would perform encryption / decryption, or how to architect that. Getting to the point where you can override every storage operation with some kind of custom storage system is a pre-requisite to adding encryption, and probably the most challenging part of this feature proposal.
Sihui Liu
Comment 5
2022-06-14 21:57:43 PDT
(In reply to Darren Mo from
comment #3
)
> +1 to encrypting the entire `WebsiteDataStore`. > > One use case would be to add an extra layer of protection for sensitive data > in addition to filesystem-level encryption. As far as I know, there is no > per-user encryption on macOS and no per-app encryption on Darwin platforms. >
Can you be more specific about the usecase? What do you want to achieve with this API?
Darren Mo
Comment 6
2022-06-15 12:23:08 PDT
(In reply to Sihui Liu from
comment #5
)
> (In reply to Darren Mo from
comment #3
) > > +1 to encrypting the entire `WebsiteDataStore`. > > > > One use case would be to add an extra layer of protection for sensitive data > > in addition to filesystem-level encryption. As far as I know, there is no > > per-user encryption on macOS and no per-app encryption on Darwin platforms. > > > > Can you be more specific about the usecase? What do you want to achieve with > this API?
Expanding on what I mentioned above: - Per-user encryption. Imagine multiple users share a computer. One user can read another user’s data without needing their password. (Dunno if filesystem permissions mitigate that somewhat but imagine the user has root privileges.) - Per-app encryption. Imagine multiple users share a single account or one user happens to know the account password of another user. In general, data should be readable by both users but perhaps one user has really sensitive information that they would like to keep private to themselves.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug