Closed Bug 1741741 Opened 2 years ago Closed 2 years ago

Avoid showing Mozilla VPN in unsupported countries

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
97 Branch
Iteration:
97.2 - Dec 20 - Jan 2
Tracking Status
firefox96 --- wontfix
firefox97 --- verified

People

(Reporter: pdahiya, Assigned: mviar, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Scope of this bug is to stop showing Mozilla VPN as available product in unsupported countries under about:preferences -> More From Mozilla

See https://mozilla.slack.com/archives/C02F3K16P9U/p1637174143149900

This is required before rolling out More From Mozilla feature by default and not a blocker for Fx 95 or 96 experiment that's en-US only

Summary: Avoid advertising Mozilla VPN in unsupported countries → Avoid showing Mozilla VPN in unsupported countries

Wherever we end up writing the logic for this we should also move this check in there.

Assignee: nobody → dmosedale
Iteration: --- → 96.2 - Nov 15 - Nov 28
Priority: -- → P1
See Also: → 1731176
Iteration: 96.2 - Nov 15 - Nov 28 → 96.3 - Nov 29 - Dec 6

[Tracking Requested - why for this release]:
Needed for releasing More From Mozilla as feature in Fx96

Removing tracking request for Fx96 as More From Mozilla is no longer targeted to be rolled out as feature in Fx96. Thanks

Assignee: dmosedale → mviar
Mentor: dmosedale

Passing by note: this should apply also to Rally, which is a US and en-US only feature (and we shouldn't expose those specific strings for that reason).

Blocks: 1746657

Hector, any thoughts here?

Functionally, this would work similarly (but not identically) to the way the captive portal VPN promo checker in bug 1730621 does. It will create a new preference brower.vpn-promo.enabled that can be set to false during repacks to turn off the More for Mozillla VPN promo manually. It has a another pref, browser.vpn_promo.disallowed_regions, which (currently) defaults to "cn,kp,ir,sy,cu,sd,ua,by,iq,om,ru,tr,tm,ae". Both the current and home regions are checked against this list. I have mixed feelings about doing it as a pref: one one hand, it allows enterprise admins to add to the list if they want. On the other hand, enterprise admins could remove from the list as well (though I don't know why they'd want to), and perhaps that creates risk for us. Do you have an opinion on whether we should leave this list as a pref, or just keep it hard-coded?

The plan is that in another patch, all of the different bespoke implementations that are similar to this service can be replaced by calls to this one, so that you'll no longer have to keep track of a bunch of different preferences for the same rthing.

Flags: needinfo?(bzhao)

Venetia, I'd be interested in your thoughts on the above question as well...

Flags: needinfo?(vtay)

For this specific case, I am more conservative. I am concerned but the pref being removed by enterprise admins - is there a way that they cant touch it?

Flags: needinfo?(vtay)
Attachment #9255519 - Attachment description: WIP: Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries → Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries

Hi Mike - is it possible to block enterprise admins from changing a preference? We're considering saving countries where we won't show VPN promos as a pref, but we don't want admins to remove items from the list due to legal risks.

Flags: needinfo?(mozilla)

Yes, we can add any preferences to a list of excluded preferences for policy:

https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.jsm#1605

Flags: needinfo?(mozilla)

Hi Dan,

Sorry I was out for the past several days.

(In reply to Dan Mosedale (:dmosedale, :dmose) from comment #6)

Hector, any thoughts here?

Functionally, this would work similarly (but not identically) to the way the captive portal VPN promo checker in bug 1730621 does. It will create a new preference brower.vpn-promo.enabled that can be set to false during repacks to turn off the More for Mozillla VPN promo manually. It has a another pref, browser.vpn_promo.disallowed_regions, which (currently) defaults to "cn,kp,ir,sy,cu,sd,ua,by,iq,om,ru,tr,tm,ae". Both the current and home regions are checked against this list. I have mixed feelings about doing it as a pref: one one hand, it allows enterprise admins to add to the list if they want. On the other hand, enterprise admins could remove from the list as well (though I don't know why they'd want to), and perhaps that creates risk for us. Do you have an opinion on whether we should leave this list as a pref, or just keep it hard-coded?

I think :mkaply's answer in comment 10 addressed your concern here. I don't really have a preference either way.

The plan is that in another patch, all of the different bespoke implementations that are similar to this service can be replaced by calls to this one, so that you'll no longer have to keep track of a bunch of different preferences for the same rthing.

That would be great, thank you!

Flags: needinfo?(bzhao)

Just for the record, so that the list of countries requested to be blocked is documented here, rather than in a Slack thread which may be garbage collected, here they are:

China
North Korea
Iran
Syria
Cuba
Sudan
Crimea region of Ukraine
Belarus
Iraq
Oman
Russia
Turkey
Turkmenistan
UAE

Because of how the Mozilla Location Service APIs are currently structured, there was no way to block only Crimea, so all of Ukraine is being blocked.

Blocks: 1747149
Attachment #9255519 - Attachment description: Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries → WIP: Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries
Attachment #9255519 - Attachment description: WIP: Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries → Bug 1741741 - Avoid showing Mozilla VPN in unsupported countries
Pushed by mviar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b08dfaa1737
Avoid showing Mozilla VPN in unsupported countries r=dmose,preferences-reviewers,pdahiya,Gijs
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Iteration: 96.3 - Nov 29 - Dec 6 → 97.2 - Dec 20 - Jan 3

Partners distribute builds we produce, so they don’t have that ability to disable this pref for disallowed regions.

A question - can we get a report if a pref gets flipped?

(In reply to Venetia from comment #16)

A question - can we get a report if a pref gets flipped?

A subset of user prefs are collected in telemetry environment, see 1.

Interesting; I was not aware of this. @mconnor, when partners change prefs in their distros, do they show up as user prefs, or is there some other mechanism?

Flags: needinfo?(mconnor)

(In reply to Dan Mosedale (:dmosedale, :dmose) from comment #18)

Interesting; I was not aware of this. @mconnor, when partners change prefs in their distros, do they show up as user prefs, or is there some other mechanism?

Hi :dmose, distro prefs are set on the default branch, not as user pref, see distribution.js.

Flags: needinfo?(mconnor)

I have verified this bug using the following steps on the latest Firefox Beta (97.0b4 Build ID - 20220116190254) on Windows 10, MacOS 11.6 and Linux Mint 20.2. The “Mozilla VPN” element is not available on "More From Mozilla" section from the "about:preferences" page for unsupported countries.

Status: RESOLVED → VERIFIED
Blocks: 1759476
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: