Primary eng (and PM) emails
Link to “Intent to Deprecate” thread
https://groups.google.com/a/chromium.org/d/msg/blink-dev/UKF8cK0EwMI/NLhsIrs-AQAJ
We deprecated this in early 2016, and failed to follow through with the removal. I'd like to try again, in support of Mozilla's stab at doing the same.
Summary
I'd like to make several changes:
1. Mark `window.applicationCache`, and the `ApplicationCache` and `ApplicationCacheErrorEvent` interfaces as `[SecureContext]`.
2. Prevent non-secure contexts from declaring manifests via a `manifest` attribute.
3. Prevent HTTP documents from using manifests they've registered.
4. Add an enterprise policy to remove these restrictions, with some reasonable advertised lifetime.
#3 is a little tricky, as we don't actually have the context we need in the browser-side appcache handlers to do a full secure context check (e.g. walk the frame tree). Given that the eventual goal is to get rid of appcache everywhere, this seems like a reasonable tradeoff between the letter and spirit of "[SecureContext]".
Motivation
HTML spells out a number of security concerns around appcache: https://html.spec.whatwg.org/multipage/offline.html#security-concerns-with-offline-applications-caches. In particular, the FALLBACK mechanism (and Chrome's proprietary CHROMIUM-INTERCEPT mechanism to an even greater degree) puts sites delivered over non-secure connections at real risk of persistent MitM attack. evn@ spelled this out more clearly in https://readable-email.org/list/whatwg/topic/appcache-content-type-security-considerations.
TLS allows us to ensure that the server we think we're talking to is actually the one asserting a manifest for itself, and that we're not being tricked by the Delicious But Evil Coffee Shop(tm) that we happened to be sitting in yesterday.
Interoperability and Compatibility Risk
Edge: No signals
Firefox: Shipping the restriction in Firefox 62, https://groups.google.com/d/msg/mozilla.dev.platform/qLTTpdzcDkw/WKJeq-4HAQAJ.
Safari: No signals.
I didn't see response to Firefox's announcement from Edge or Safari folks. I poked relevant people on Twitter; let's see what they say.
Alternative implementation suggestion for web developers
Developers who wish to continue using appcache can migrate their sites to TLS. While doing so, they could also upgrade to service workers, which are the right choice for the medium-term.
Usage information from UseCounter
`window.applicationCache` is accessed from a non-secure context in ~0.15% of page views. Digging through the 445 hits in HTTP Archive[1], the vast majority of this usage appears to be feature-detection, along the lines of Modernizr's `'applicationCache' in window`, which would make the `[SecureContext]` assignment fairly safe.
Appcache manifest selection is triggered from a non-secure context in ~0.08% of page views. I spent some time this morning digging through the 312 hits in HTTP Archive[2], with interesting results (raw data available at https://docs.google.com/spreadsheets/d/1mGUvSKyF_DOhkx9PK_NawRCVMgA416R0jJTZH1YOgU4/edit?usp=sharing):
The usage is certainly non-trivial, but I'd posit that the security risks posed by non-secure usage of the feature should push us towards lowering the bar. Moreover, the prevalence of nested appcache contexts suggests to me that the actual breakage experienced by users would be lower than the raw numbers would suggest.
I've added these metrics to UKM, but I don't have any data yet. As 66 rolls through the channels, we can verify the data I've gathered here to see if hotspots crop up that we weren't expecting.
[1]:
```
SELECT
url,
JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheAPIInsecureOrigin') AS feature
FROM [httparchive:har.2018_01_15_chrome_pages]
HAVING feature IS NOT NULL
ORDER BY url
```
[2]:
```
SELECT
url, JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheManifestSelectInsecureOrigin') AS feature FROM [httparchive:har.2018_01_15_chrome_pages] HAVING feature IS NOT NULL ORDER BY url
```
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5714236168732672
Thanks! WDYT?
Primary eng (and PM) emails
Link to “Intent to Deprecate” thread
https://groups.google.com/a/chromium.org/d/msg/blink-dev/UKF8cK0EwMI/NLhsIrs-AQAJ
We deprecated this in early 2016, and failed to follow through with the removal. I'd like to try again, in support of Mozilla's stab at doing the same.
Summary
I'd like to make several changes:
1. Mark `window.applicationCache`, and the `ApplicationCache` and `ApplicationCacheErrorEvent` interfaces as `[SecureContext]`.
2. Prevent non-secure contexts from declaring manifests via a `manifest` attribute.
3. Prevent HTTP documents from using manifests they've registered.
4. Add an enterprise policy to remove these restrictions, with some reasonable advertised lifetime.
#3 is a little tricky, as we don't actually have the context we need in the browser-side appcache handlers to do a full secure context check (e.g. walk the frame tree). Given that the eventual goal is to get rid of appcache everywhere, this seems like a reasonable tradeoff between the letter and spirit of "[SecureContext]".
Motivation
HTML spells out a number of security concerns around appcache: https://html.spec.whatwg.org/multipage/offline.html#security-concerns-with-offline-applications-caches. In particular, the FALLBACK mechanism (and Chrome's proprietary CHROMIUM-INTERCEPT mechanism to an even greater degree) puts sites delivered over non-secure connections at real risk of persistent MitM attack. evn@ spelled this out more clearly in https://readable-email.org/list/whatwg/topic/appcache-content-type-security-considerations.
TLS allows us to ensure that the server we think we're talking to is actually the one asserting a manifest for itself, and that we're not being tricked by the Delicious But Evil Coffee Shop(tm) that we happened to be sitting in yesterday.
Interoperability and Compatibility Risk
Edge: No signals
Firefox: Shipping the restriction in Firefox 62, https://groups.google.com/d/msg/mozilla.dev.platform/qLTTpdzcDkw/WKJeq-4HAQAJ.
Safari: No signals.
I didn't see response to Firefox's announcement from Edge or Safari folks. I poked relevant people on Twitter; let's see what they say.
Alternative implementation suggestion for web developers
Developers who wish to continue using appcache can migrate their sites to TLS. While doing so, they could also upgrade to service workers, which are the right choice for the medium-term.
Usage information from UseCounter
`window.applicationCache` is accessed from a non-secure context in ~0.15% of page views. Digging through the 445 hits in HTTP Archive[1], the vast majority of this usage appears to be feature-detection, along the lines of Modernizr's `'applicationCache' in window`, which would make the `[SecureContext]` assignment fairly safe.
Appcache manifest selection is triggered from a non-secure context in ~0.08% of page views. I spent some time this morning digging through the 312 hits in HTTP Archive[2], with interesting results (raw data available at https://docs.google.com/spreadsheets/d/1mGUvSKyF_DOhkx9PK_NawRCVMgA416R0jJTZH1YOgU4/edit?usp=sharing):
- 115 of the 312 did not trigger the metric when I poked at them with a custom `content_shell` build. I spot-checked 20 of those in Chrome: 8 timed out, the remaining 12 loaded the weather widget I'll point to in a moment.
- Of the remaining 197 pages:
- 95 used a weather widget in a nested frame that specifies http://i.tianqi.com/index.appcache as a manifest (which caches two images from Baidu, and sets up a 404 fallback).
- 13 loaded frames that pulled in something like http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache as a manifest (which caches two HTML files, presumably the ad code itself).
- 4 loaded frames that pulled in something like https://cdn.makrobetcdn.com/c_250_c_250.hyperesources/cache.manifest as a manifest (caching a variety of ad resources).
- The remaining 84 loaded manifests from their own top-level domain.
The usage is certainly non-trivial, but I'd posit that the security risks posed by non-secure usage of the feature should push us towards lowering the bar. Moreover, the prevalence of nested appcache contexts suggests to me that the actual breakage experienced by users would be lower than the raw numbers would suggest.
I've added these metrics to UKM, but I don't have any data yet. As 66 rolls through the channels, we can verify the data I've gathered here to see if hotspots crop up that we weren't expecting.
[1]:
```
SELECT
url, JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheAPIInsecureOrigin') AS feature FROM [httparchive:har.2018_01_15_chrome_pages] HAVING feature IS NOT NULL ORDER BY url
```
[2]:
```
SELECT
url, JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheManifestSelectInsecureOrigin') AS feature FROM [httparchive:har.2018_01_15_chrome_pages] HAVING feature IS NOT NULL ORDER BY url
```
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5714236168732672
Thanks! WDYT?
-mike
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3De8i6irMQiPXasTobZND%2B1ob3Fr22bxt%2BtYdRU_m_QRmA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
I'm super excited about this work! :)Killing AppCache (entirely) will make our preloadScanner faster and will significantly help sending out requests earlier.One interesting question: once this removal is in place, should we (and could we) make non-secure-context page-loads faster, by not forcing them to wait for the document element to be available?On the one hand - faster is better. On the other, that could create the wrong incentives when trying to move people towards secure contexts.
On Fri, Feb 2, 2018 at 4:14 PM Mike West <mk...@chromium.org> wrote:Primary eng (and PM) emails
Link to “Intent to Deprecate” thread
https://groups.google.com/a/chromium.org/d/msg/blink-dev/UKF8cK0EwMI/NLhsIrs-AQAJ
We deprecated this in early 2016, and failed to follow through with the removal. I'd like to try again, in support of Mozilla's stab at doing the same.
Summary
I'd like to make several changes:
1. Mark `window.applicationCache`, and the `ApplicationCache` and `ApplicationCacheErrorEvent` interfaces as `[SecureContext]`.
2. Prevent non-secure contexts from declaring manifests via a `manifest` attribute.
3. Prevent HTTP documents from using manifests they've registered.
4. Add an enterprise policy to remove these restrictions, with some reasonable advertised lifetime.
#3 is a little tricky, as we don't actually have the context we need in the browser-side appcache handlers to do a full secure context check (e.g. walk the frame tree). Given that the eventual goal is to get rid of appcache everywhere, this seems like a reasonable tradeoff between the letter and spirit of "[SecureContext]".
I'm not sure I understand the implications of that. Does that mean that for already registered manifests, they'd continue to work in non-secure contexts?
Motivation
HTML spells out a number of security concerns around appcache: https://html.spec.whatwg.org/multipage/offline.html#security-concerns-with-offline-applications-caches. In particular, the FALLBACK mechanism (and Chrome's proprietary CHROMIUM-INTERCEPT mechanism to an even greater degree) puts sites delivered over non-secure connections at real risk of persistent MitM attack. evn@ spelled this out more clearly in https://readable-email.org/list/whatwg/topic/appcache-content-type-security-considerations.
TLS allows us to ensure that the server we think we're talking to is actually the one asserting a manifest for itself, and that we're not being tricked by the Delicious But Evil Coffee Shop(tm) that we happened to be sitting in yesterday.
Interoperability and Compatibility Risk
Edge: No signals
Firefox: Shipping the restriction in Firefox 62, https://groups.google.com/d/msg/mozilla.dev.platform/qLTTpdzcDkw/WKJeq-4HAQAJ.
Safari: No signals.
I didn't see response to Firefox's announcement from Edge or Safari folks. I poked relevant people on Twitter; let's see what they say.
The response from WebKit seems encouraging.
Alternative implementation suggestion for web developers
Developers who wish to continue using appcache can migrate their sites to TLS. While doing so, they could also upgrade to service workers, which are the right choice for the medium-term.
Usage information from UseCounter
`window.applicationCache` is accessed from a non-secure context in ~0.15% of page views. Digging through the 445 hits in HTTP Archive[1], the vast majority of this usage appears to be feature-detection, along the lines of Modernizr's `'applicationCache' in window`, which would make the `[SecureContext]` assignment fairly safe.
Is it possible to change the use counters (or add others) so that we can distinguish between real usage and feature detection?I don't think data on that should block this intent, but wondering about killing the API in secure contexts as well. Maybe the high usage there is also a result of feature detection shenanigans.
Appcache manifest selection is triggered from a non-secure context in ~0.08% of page views. I spent some time this morning digging through the 312 hits in HTTP Archive[2], with interesting results (raw data available at https://docs.google.com/spreadsheets/d/1mGUvSKyF_DOhkx9PK_NawRCVMgA416R0jJTZH1YOgU4/edit?usp=sharing):
- 115 of the 312 did not trigger the metric when I poked at them with a custom `content_shell` build. I spot-checked 20 of those in Chrome: 8 timed out, the remaining 12 loaded the weather widget I'll point to in a moment.
- Of the remaining 197 pages:
- 95 used a weather widget in a nested frame that specifies http://i.tianqi.com/index.appcache as a manifest (which caches two images from Baidu, and sets up a 404 fallback).
- 13 loaded frames that pulled in something like http://s.dynad.net/stack/KMA9C2O70iP6CHSgXk0LGakpYboY3uBSOgotXt8fklCKbdvX2viwKa3R7j7SBAOi.appcache as a manifest (which caches two HTML files, presumably the ad code itself).
- 4 loaded frames that pulled in something like https://cdn.makrobetcdn.com/c_250_c_250.hyperesources/cache.manifest as a manifest (caching a variety of ad resources).
- The remaining 84 loaded manifests from their own top-level domain.
The usage is certainly non-trivial, but I'd posit that the security risks posed by non-secure usage of the feature should push us towards lowering the bar. Moreover, the prevalence of nested appcache contexts suggests to me that the actual breakage experienced by users would be lower than the raw numbers would suggest.
What would breakage look like in your view? I'm assuming that first view will work fine, but some resources/frames may not work on consecutive views if the user is offline. Given that the top-level document doesn't have AppCache backed offline experience, does that even matter?
I've added these metrics to UKM, but I don't have any data yet. As 66 rolls through the channels, we can verify the data I've gathered here to see if hotspots crop up that we weren't expecting.
[1]:
```
SELECT
url, JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheAPIInsecureOrigin') AS feature FROM [httparchive:har.2018_01_15_chrome_pages] HAVING feature IS NOT NULL ORDER BY url
```
[2]:
```
SELECT
url, JSON_EXTRACT(payload, '$._blinkFeatureFirstUsed.Features.ApplicationCacheManifestSelectInsecureOrigin') AS feature FROM [httparchive:har.2018_01_15_chrome_pages] HAVING feature IS NOT NULL ORDER BY url
```
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5714236168732672
Thanks! WDYT?
-mike
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
What? CHROMIUM-INTERCEPT?I never heard of it... I wonder how many more unknown proprietary demons Chrome/Chromium has...Can this be removed from any context (not only insecure)?Those surprises keep popping. :(
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3Dc-7J%2Bx%3DbYfYj%3D915zEK9P8RWqGXsV%3DqLmkSatz%2Bjdf8g%40mail.gmail.com.
The HTTP Archive analysis seems promising, and I'm hopeful that the enterprise opt-out will be sufficient to address the sorts of complaints we heard last time.While usage is high, my intuition is that the page views impacted (in terms of actually be broken) will actually be very low since very few of these resources will actually be accessed offline. Is there any easy way to quantify that? Eg. how often do http documents use an appcache manifest which doesn't get re-validated during the page's lifetime (i.e. the user is offline for the duration of the page view)?
What sort of deprecation period are you proposing?
☆PhistucK
--
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3De8i6irMQiPXasTobZND%2B1ob3Fr22bxt%2BtYdRU_m_QRmA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3Dc-7J%2Bx%3DbYfYj%3D915zEK9P8RWqGXsV%3DqLmkSatz%2Bjdf8g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3Dc4X1gZzUEG6NMLYst%2B%3Daz_G%3DO1LD7bE_2M4W1ueF3BJw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CANMdWTuhszdd9ZTX5MAf6-yyc7G1yQFLGFp3O6gxBFzzs6pojw%40mail.gmail.com.
LGTM2On Thu, Feb 8, 2018 at 5:34 PM Ojan Vafai <oj...@chromium.org> wrote:LgtmOn Thu, Feb 8, 2018, 1:50 AM Mike West <mk...@chromium.org> wrote:On Mon, Feb 5, 2018 at 4:00 PM, Rick Byers <rby...@chromium.org> wrote:The HTTP Archive analysis seems promising, and I'm hopeful that the enterprise opt-out will be sufficient to address the sorts of complaints we heard last time.While usage is high, my intuition is that the page views impacted (in terms of actually be broken) will actually be very low since very few of these resources will actually be accessed offline. Is there any easy way to quantify that? Eg. how often do http documents use an appcache manifest which doesn't get re-validated during the page's lifetime (i.e. the user is offline for the duration of the page view)?For the nested cases, I agree with Yoav's earlier suggestion that there's zero user-visible impact.For top-level cases, we should be able to add some counters to quantify the totally-offline status in theory, but I recall piping a "true" view of the user's online status to the points at which we're making a decision about whether to use the manifest being a sticking-point with the earlier deprecation effort. I doubt it's gotten any easier over time.It sounds like what you're asking for is different, though: you'd like to count the number of pages that were originally served from appcache, and that didn't successfully update the manifest? That should be possible to UseCounter. I'll poke at that.
What sort of deprecation period are you proposing?We've been sending a deprecation message since 2016. So. Um. :)
I'd suggest that we land the new behavior behind a flag with a two-milestone explicit deadline. If I can get the code landed in the next week, that would be M68. If not, I'd still change the message to something explicit, but target M69.
WDYT?
☆PhistucK
--
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3De8i6irMQiPXasTobZND%2B1ob3Fr22bxt%2BtYdRU_m_QRmA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3Dc-7J%2Bx%3DbYfYj%3D915zEK9P8RWqGXsV%3DqLmkSatz%2Bjdf8g%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXHy%3Dc4X1gZzUEG6NMLYst%2B%3Daz_G%3DO1LD7bE_2M4W1ueF3BJw%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.