Closed bsclifton closed 3 months ago
This can be done with app commands instead so we don't have to modify the elevation service at all
Thanks to wfh on Chromium Slack for helping suggest this
I believe it would involve this code: https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/util/app_command.h
Created https://github.com/brave/brave-browser/issues/39953 to track doing App Commands.
Will check out the trusted paths as-is
Requires 1.69.137
or higher to test 👍🏻
PASSED
usingBrave | 1.69.137 Chromium: 127.0.6533.100 (Official Build) beta (64-bit)
-- | --
Revision | 40b6ccbd1eb76c8f575e83de8ad81c4349d3f32a
OS | Windows 10 Version 22H2 (Build 19045.4717)
PASSED
PASSED
Verified on Win10-x64
; if we have time this cycle, we'll do another Win11-x64
check and can mark it as QA Pass - Win64
then. If we run out of time, we'll use this verification and mark it.
cc @MadhaviSeelam
Verification PASSED
using
Brave | 1.69.137 Chromium: 127.0.6533.100 (Official Build) beta (64-bit)
-- | --
Revision | 40b6ccbd1eb76c8f575e83de8ad81c4349d3f32a
OS | Windows 11 Version 23H2 (Build 22631.3958)
Before fix:
BraveBetaElevationService
service is installed in the services.mscpElevator->InstallVPNServices(): Successfully installed VPNServices.
Invoking Vpn Installation is successful.
BraveBetaVpnService
and Brave Beta Vpn Wireguard Service
(BraveBetaVpnWireguardService
) are installed BraveNightlyVpnService
and Brave Nightly Vpn Wireguard Service
(BraveNightlyVpnWireguardService
) still shownstep 1 | step 3 | step 4-5 | step 6 | step 10 | step 11 |
---|---|---|---|---|---|
After fix:
BraveBetaElevationService
service is installedBraveBetaVpnServices
are installed BraveNightlyVpnService
and Brave Nightly Vpn Wireguard Service
(BraveNightlyVpnWireguardService
)BraveNightlyVpnService
and Brave Nightly Vpn Wireguard Service
(BraveNightlyVpnWireguardService
)step 1 | step 3 | step 4-5 | step 6 | step 9-10 | step 13 | step 14 |
---|---|---|---|---|---|---|
Test plan
See plan in https://github.com/brave/brave-core/pull/24900
Description
When Brave (or any Chromium browser) is installed with admin privileges (ex: it's a system install), the elevation service is registered (ex: with
services.msc
). Introduced in https://github.com/brave/brave-core/pull/20754, there is a Brave-specific methodInstallVPNServices
https://github.com/brave/brave-core/blob/1bc3b9e011c17e16a7aba895cac7e845b87ba5dc/chromium_src/chrome/elevation_service/elevator.cc#L30-L51This is only used on Windows and it'll install the services required to either connect securely connect to IKEv2 or WireGuard.
This method should implement a check to see where it was called from and only allow trusted sources. For example, we can ensure that it was called from
%programfiles%\BraveSoftware\Brave-Browser\Application\brave.exe
.