Skip to content
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

Pages using WebRTC trigger Windows Firewall prompt every time msedgewebview2.exe is updated. #2252

Closed
dmcgloin opened this issue Mar 9, 2022 · 14 comments
Assignees
Labels
feature request feature request tracked We are tracking this work internally.

Comments

@dmcgloin
Copy link

dmcgloin commented Mar 9, 2022

We have a login page that is using WebRTC for device trust. Every time this page loads AND a new version of msedgewebview2.exe has been installed (Evergreen deployment model), a Windows Firewall permission prompt appears. This is a fairly confusing alert for most users. Looking in the Windows Firewall with Advanced Security settings, we can see a few relevant Inbound rules:

  1. Microsoft Edge (mDNS-In) Microsoft Edge C:\Program Files (x86)...\msedge.exe
  2. Microsoft Edge (mDNS-In) Microsoft Edge WebView2 Runtime C:\Program Files (x86)...\99.0.1150.36\msedgewebview2.exe
  3. Microsoft Edge (mDNS-In) Microsoft Edge WebView2 Runtime C:\Program Files (x86)...\99.0.1150.30\msedgewebview2.exe

The first rule is for the main desktop Edge browser. This is fine.
The second and third rules are created by the user responding to the prompt (maybe this happens for the main desktop Edge browser but I don't remember).

Now for the rabbit hole ;) (which likely is already known to the team)

This whole mDNS-In firewall thing is a user-privacy feature that protects exposure of customer's internal IP addresses (when behind a NAT). So if the user grants permission to the firewall prompt, they have GREATER privacy. While if they decline permission, they have LESS privacy. At least this is my understanding. More background here: https://www.youtube.com/watch?v=BKorP55Aqvg.

We have tried seeing if we can turn off the WebRTC usage in the login page, but this gets into a security quagmire discussion.

But my proposal here is that the WebView2 team consider automatically installing this mDNS-In firewall entry when a new version of msedgewebview2.exe is installed - with the default state of allowing mDNS so that users can have greater privacy by default. This of course has the side benefit of avoiding the confusing Windows Firewall prompt.

Hopefully this makes sense. Interested to hear thoughts on whether this is a viable solution, or if there are other alternatives not considered.

Related issue (but not really the same IMO): #369

AB#38468976

@dmcgloin dmcgloin added the feature request feature request label Mar 9, 2022
@champnic champnic added the tracked We are tracking this work internally. label Mar 10, 2022
@champnic
Copy link
Member

Thanks for the feature request @dmcgloin, and sorry for the suboptimal experience your users are facing. I've added this scenario to our backlog to look into further!

@dmcgloin
Copy link
Author

dmcgloin commented Jan 25, 2023

Hey @champnic. Wondering if there is any hope of this getting resolved somehow? This is still a significant issue for our company, and we serve a lot of Windows desktop customers.

@champnic
Copy link
Member

champnic commented Feb 1, 2023

@jasonstephen15 Any update on this issue?

@jasonstephen15
Copy link
Contributor

@dmcgloin - can you please send a screenshot of the firewall prompt you are getting. Want to understand if this is an issue with the wording of the prompt, or something we should do to technically solve this.

@LiangTheDev
Copy link
Member

@dmcgloin could you please collect Edge installer logs on a machine that has the issue? Instruction at https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/diagnostics/install.md#installer-logs. Edge installer is supposed to setup firewall rules.

@dmcgloin
Copy link
Author

dmcgloin commented Feb 4, 2023

Thanks for following up, @champnic , @jasonstephen15 and @LiangTheDev !

Here's a screenshot of the firewall prompt. I can follow up with the installer logs. But the installer doesn't appear to introduce any firewall rules relevant to the WebView2 runtime.

Btw, this can easily be reproduced by navigating in an example app to: "https://www.bankofamerica.com", "https://www.wellsfargo.com" or "https://www.chase.com"

image

@LiangTheDev
Copy link
Member

@dmcgloin, this is exactly the problem: "But the installer doesn't appear to introduce any firewall rules relevant to the WebView2 runtime". The installer logs could provide info on possible error code when installer tries to setup firewall rules.

@dmcgloin
Copy link
Author

dmcgloin commented Feb 7, 2023

OK. @LiangTheDev. I've captured the logs in a zip file. Where should I send to?

@LiangTheDev
Copy link
Member

@dmcgloin please email me at lzhao@microsoft.com.

@dmcgloin
Copy link
Author

dmcgloin commented Feb 7, 2023

I sent the logs @LiangTheDev . Let me know if the email with attachment made it through the interweb - or if you need further info.

@LiangTheDev
Copy link
Member

I've got the logs. I don't see signs of failures. I'll ask around to see how to move investigation further.

@LiangTheDev
Copy link
Member

@dmcgloin sorry for taking a long time to get back to you. I think that I understand the issue now: per user installation would not be able to add firewall rules.

When you run the WebView2 installer without elevation (run as admin), WebView2 Runtime will be installed per user, under %LOCALAPPDATA%\Microsoft\EdgeWebView. Non elevated process does not have permission to add firewall rules, and the user got prompted.

When you run WebView2 installer elevated (run as admin), WebView2 Runtime will be installed per machine, under C:\Program Files(x86)\Microsoft\EdgeWebView. The elevated installer has permission to add firewall rules and will add it.

We were too focused on why there was no rules for C:\Program Files (x86)...\99.0.1150.36\msedgewebview2.exe as stated in the original post and failed to notice the per user location in the dialog you shared later. For per user installation, it is expected.

We have a feature to automatically move per user WebView2 Runtime installation to per machine if there is some other per machine installed Edge products on the machine during next Edge update. If there is no other per machine Edge products on the machine, WebView2 Runtime will stay as per user and no firewall rules added by the installer.

@dmcgloin
Copy link
Author

dmcgloin commented Feb 14, 2023

Ohhhhhhhhhh. This is great! Thanks so much for digging into this, @LiangTheDev . I'm now kicking myself for not trying to install WebView2 Runtime as an Admin. Installing as Admin will actually be the normal deployment model. I just didn't think twice when I ran the installer.

Once I installed as Admin, I no longer saw the firewall prompt.

Question: Since we want Evergreen deployment, will the next incremental version update of the edge executable stay in the Program Files subdirectory, and therefore not require the Windows Firewall prompt?

@LiangTheDev
Copy link
Member

@dmcgloin , glad that it worked for you. Yes, the next update will stay in Program Files (x86) folder and not require Windows Firewall prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

4 participants