-
Notifications
You must be signed in to change notification settings - Fork 70
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
Use of [Unforgeable] in Trusted Types WebIDL #257
Comments
The rationale is to prohibit the user code from being able to modify the policy creation mechanisms and checking if the type instances were created through the policies (i.e. I realize what the downsides are and I'm not opposed to removing |
There's no active effort to reduce existing usage, except perhaps for https://github.com/Agoric/proposal-preserve-virtualizability which @littledan pointed out earlier today. Having said that, motivation for existing usage is primarily plugins and those are going away. |
@koto I'm not really strongly opposed to using [Unforgeable], but personally, I'm having a hard time understanding exactly what guarantees are provided. Note, in the related proposal for |
How?
|
Ah, sorry, I missed this one [Unforgeable]. Thanks for explaining. |
Note that |
|
To reiterate, we're not opposed to removing |
I think it's definitely going to be marked legacy, but maybe trusted types is special enough that it can make an argument for being part of that legacy? |
My preference would be to keep it |
Unfortunately both directions have web-compat issues. E.g. removing unforgable will make |
A way around that might be defining them all directly on the global as those basically only have own properties anyway (with some notable exceptions), e.g., |
Revisiting this, removing The case where I encountered this was polyfilling #258. In the current shape, there's no way to polyfill the policy construction by overloading the constructor for |
Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e
Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e
Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#748022}
Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#748022}
Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#748022}
…tonly Automatic update from web-platform-tests Make Trusted Types ununforgeable. Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#748022} -- wpt-commits: 7c966db714c251c2b7bc243b9657e5dff72aa8dc wpt-pr: 22118
…tonly Automatic update from web-platform-tests Make Trusted Types ununforgeable. Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyf@chromium.org> Commit-Queue: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#748022} -- wpt-commits: 7c966db714c251c2b7bc243b9657e5dff72aa8dc wpt-pr: 22118
…tonly Automatic update from web-platform-tests Make Trusted Types ununforgeable. Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyfchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#748022} -- wpt-commits: 7c966db714c251c2b7bc243b9657e5dff72aa8dc wpt-pr: 22118 UltraBlame original commit: 643c88e00d7f34490218c623cad4d1ecec9fe30d
…tonly Automatic update from web-platform-tests Make Trusted Types ununforgeable. Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyfchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#748022} -- wpt-commits: 7c966db714c251c2b7bc243b9657e5dff72aa8dc wpt-pr: 22118 UltraBlame original commit: 643c88e00d7f34490218c623cad4d1ecec9fe30d
…tonly Automatic update from web-platform-tests Make Trusted Types ununforgeable. Context: w3c/trusted-types#257 Bug: 1058400 Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089705 Reviewed-by: Yifan Luo <lyfchromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/master{#748022} -- wpt-commits: 7c966db714c251c2b7bc243b9657e5dff72aa8dc wpt-pr: 22118 UltraBlame original commit: 643c88e00d7f34490218c623cad4d1ecec9fe30d
There's discussion of deprecating WebIDL's [Unforgeable] attribute at whatwg/webidl#350 (comment) . It seems like Trusted Types uses [Unforgeable].
I can see some pros and cons here: [Unforgeable] may make this mechanism more reliable in some way, but on the other hand, it makes polyfilling and other forms of manipulating/emulating the environment more difficult.
Is this usage necessary? I'm not sure if the rationale for the details of [Unforgeable] use is is documented somewhere already; I've had trouble finding it.
The text was updated successfully, but these errors were encountered: