-
Notifications
You must be signed in to change notification settings - Fork 55
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
Can we expose Crypto/SubtleCrypto to all Worklet / all scopes? #338
Comments
…geWorklet It can make things easier inside the worklet (e.g. the aggregation key generation process), and there should be no security concerns exposing those (spec already says TextEncoder/Decoder should be exposed to "*": https://encoding.spec.whatwg.org/#interface-textdecoder. Also created an issue for Crypto: w3c/webcrypto#338 proposing exposing to SharedStorageWorklet as well) Override `ExecutionContext::IsSecureContext()` to always return true: the shared storage worklet's is always (considered) a secure context because it originates from a secure Window context. But the existing shared storage worklet architecture is currently populated with a nullptr SecurityContext, so it's not compatible with the IDL Extended Attribute `SecureContext`. We need to override it to make it work with the `SecureContext` attribute. Bug: 1414951 Change-Id: I940e850a8da42aa8b45950aebe3eb27546ab17ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4423770 Reviewed-by: Adam Rice <ricea@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Alex Turner <alexmt@chromium.org> Commit-Queue: Yao Xiao <yaoxia@chromium.org> Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1130458}
Hey 👋 Apologies for the delay. Personally I don't see an issue with this, though it might be good to bring it up in the WebAppSec WG, to see if anyone else sees any concerns. (I can do so at some point, unless you want to do so?) |
A problem with ShadowRealm exposure might be that this feature is conditional upon secure contexts. Perhaps that ought to be considered separately from worklets. Also, do we have use cases for all worklets or just this one? cc @Ms2ger |
Is there any concern exposing Crypto/SubtleCrypto to all scopes, or all Worklet scopes, rather than just (Window, Worker)?
This is a desirable feature for the shared storage worklet (e.g. will make the aggregation key generation process easier).
The text was updated successfully, but these errors were encountered: