SpdySession::CanPool no longer sufficient for Android N |
|||||||||||||
Issue descriptionBeginning with Android N, Applications can customize how the X509TrustManager will behave when validating certificates for a hostname. 1) You can specify custom CAs for different hosts 2) You can specify whether or not to trust user-installed roots The implications of this mean that the logic in SpdySession::CanPool (used by HTTP/2 and QUIC connection pooling) because a certificate for "a.example.com" may not necessarily be valid for "b.example.com" - the validity can only be determined by passing in the new hostname to the OS verification library as part of the X509TrustManagerExtensions. While this is less relevant for Chrome on Android, which does not set such policies, users of WebView may, and the result is that WebView would end up not respecting or applying such security policies correctly. One possible solution is to disable connection pooling when in a WebView, until such a time as we figure out a more suitable interface. A ChromeView will continue to ignore the host-applications' security policies and instead use Chrome's.
,
Jun 22 2016
What complexity are you talking about w/r/t CanPool being async? Because that's unclear. I feel like it's *far* worse to try to access the trust config on Android and re-implement the logic checks its doing. That seems counter to the very design goal of why the trust config was introduced.
,
Jun 22 2016
How much performance (latency, memory) impact are we talking about if connection pool is disabled
,
Dec 21 2016
> How much performance (latency, memory) impact are we talking about if connection pool is disabled Anyone one the network team wanna respond to that ^^
,
Dec 21 2016
I don't think we have A/B data with it disabled anymore, because the benefits were so good. Given that this is a public bug, I will simply remark that from a Google standpoint, the answer was "Significant".
,
Dec 21 2016
Happy to expand on comment #5 offbug (rch@ is probably better for it, he knows better the impact when we last disabled pooling)
,
Dec 22 2016
ok, I will ping rch or you after holiday season.
,
Dec 22 2016
Agreed with what sleevi said. I should also mention that with the use of Alt-Svc I expect both google and other providers will end up wanting to take advantage of this pooling functionality.
,
Dec 22 2016
had a long offline chat with Sleevi. I will look into it (or delegate if I cannot)
,
Feb 27 2017
,
Sep 15 2017
,
Sep 21 2017
sgurun: Did you ever look into or delegate this per comment #9? In particular, did this never happen? "One possible solution is to disable connection pooling when in a WebView, until such a time as we figure out a more suitable interface."
,
Sep 21 2017
,
Sep 21 2017
never happened sorry, and I am leaving webview team at the end of month - I think it is best if somebody in network stack team can address that as the code base is not very familiar with anybody in webview team.
,
Sep 27 2017
,
Oct 6 2017
Does network team any help from WebView team on this issue?
,
Oct 25 2017
I'll tentatively take this, but I'll actually need guidance from network team to know what needs to be changed.
,
Oct 27 2017
ntfschr: There's not a public/blessed Android API that I'm aware of yet that would allow us to match this. There is an undocumented, internal API that can be detected via reflection - namely, RootTrustManager.isSameTrustConfiguration ( https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/security/net/config/RootTrustManager.java ). This method comes from X509TrustManagerExtensions ( https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/http/X509TrustManagerExtensions.java ), where it's annotated as a SystemApi and hidden. This wrapper can be constructed around a TrustManager (per https://developer.android.com/reference/android/net/http/X509TrustManagerExtensions.html ), but I believe would have to be reflected into to pick up that method, and I'm not sure the policies regarding calling SystemAPI-annotated aspects, given that it's not officially blessed. Adding cbrubaker@ in case I missed anything.
,
Oct 27 2017
Does Chrome not build with SystemAPI? It was intended to be in the exposed API for this specific case. You should probably be fine to call it with reflection, just make sure your code is robust to the method not being there.
,
Oct 27 2017
> Does Chrome not build with SystemAPI? No, chrome builds with the public sdk.
,
Nov 29 2017
,
Nov 29 2017
@Comment 21: Can you explain why you restricted this? Considering how long it's been open, this restriction doesn't provide much security value, but limits our openness to the community.
,
Nov 29 2017
The main reason I restricted it was that I expect more discussion around whether we want to publish new Android APIs, for which we usually restrict from public knowledge. But yes, I agree that opening this bug has more value. Let's take it separately and not discuss here, then.
,
Nov 29 2017
rsleevi@ do we need any work on WebView side here, or can network team handle most of this?
,
Nov 29 2017
This would have to be fixed in //net, but is not on our priority list for the next few quarters (as shown by this bug being nearly 18 months old). It's a bug that primarily would manifest for Android WebView consumers - it would not manifest for Chrome on Android, because Chrome on Android does not use the manifest configuration.
,
Aug 10
Unassigning because I'm not actively working on this. |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by davidben@chromium.org
, Jun 22 2016