New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 704545 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Host rules collide with locally installed CA

Project Member Reported by y...@yoav.ws, Mar 23 2017

Issue description

Chrome Version: M56
OS: Ubuntu 16.04

What steps will reproduce the problem?
(1) Setup an MITM proxy in reverse proxy mode at a known IP address for a certain host
(2) Install the MITM proxy CA locally using certutil
(3) Run chrome with a "--host-rules" CLI argument, mapping said host to the MITM proxy IP

What is the expected result?
TLS establishment should succeed.

What happens instead?
TLS establishment fails due to cert errors.

Looks like when a host rule is set for a specific host, Chrome doesn't allow that host's cert to be signed by a local CA.



For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Have you configured your MITM proxy to issue the right cert?

Pretty sure this is WontFix - the MITM proxy needs to create a valid cert for the "host-rules" bit, but then it should work.

Comment 2 by y...@yoav.ws, Mar 23 2017

I'm not sure what you mean. When configuring the MITM proxy's IP address in /etc/hosts, the setup is working fine. When Chrome gets the same mapping through host-rules, Chrome terminates the handshake due to cert errors.
Components: Internals>Network>Certificate
Labels: Needs-Feedback
Can you provide a net-internals log and a more complete description of what you're doing?

Comment 4 by eroman@chromium.org, Mar 23 2017

Status: WontFix (was: Untriaged)
TL;DR: use --host-resolver-rules rather than --host-rules.

Comment 5 by eroman@chromium.org, Mar 23 2017

Explanation for comment #4:

--host-rules re-writes the URL seen by the lower layers of network stack. So in your situation it ends up being as if you had navigated to https://127.0.0.1/ (or whatever local address you remapped to). This is going to fail certificate verification because the cert would have to be for 127.0.0.1, not the name you remapped.

--host-resolver-rules does what you want it to, namely it mocks out the DNS resolutions done by Chrome. So from Chrome's perspective it is still navigating to https://my-awesome-site.com/, only you overrode the IP address that it gets for my-awesome-site.com. The cetificate verification then is still for my-awesome-site.com.

Comment 6 by y...@yoav.ws, Mar 23 2017

eroman@ - thank you, that makes perfect sense!

Sign in to add a comment