Closed Bug 2071915 Opened 2 months ago Closed 1 month ago

Policies cannot be removed through Visual management screen, can only be removed from JSON editing screen

Categories

(Enterprise Products :: Console, defect)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: mcurtean, Assigned: julienw)

References

(Depends on 2 open bugs)

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

Found in
Handlers policy example

Affected versions
commit "61cc1d56f9a44347addf29900a375fdf892e0ec6"
version "422/merge"
source "https://github.com/mozilla/enterprise-console"
build "https://github.com/mozilla/enterprise-console/actions/runs/34554392439"

Preconditions
A Company admin is logged into the Console.
Multiple users (authenticated and unauthenticated) are enrolled and have signed in.
With a user account, set the Handlers policy

Steps to reproduce

  1. From the console > Policy management> filter by Handlers and set the policy - see 2067099
 "Handlers": {
      "mimeTypes": { "": { "action": "saveToDisk" } },
      "extensions": { "": { "action": "saveToDisk" } }
  1. Login on FxE and check the policy is displayed in about:policies.
  2. Return to the console Policies and from the Visual screen, switch the value to Not SET.
  3. Check again FxE about:policies.

Expected result
The policy should not be applied to the client when no value is set.
The policy should not have the SET label anymore.
The policy should be removed from the JSON list of policies.

Actual result
Handler policy value changes to null in the JSON policy list.
The policy still shows as SET in the policy sidebar.
The policy is still available in about:policies.

No longer depends on: 2071906
Regressions: 2040651

There may be a misunderstanding, due to confusing labels that we'll need to change.

"Not Set" does set a value... the value "not set". This translates to null in the JSON serialization. And because there is this null value the policy shows as "SET" in the sidebar. So this part makes sense. (but we need to change the confusing labels)

If you want to not set a value at all at this level, you need to select "inherit the value". Then this will apply the value from the upper layer, if any (org unit or company).

However when you set "Not set", this means that we remove the policy in the values sent to Firefox. So in Firefox it should disappear. So there's a bug in either the console (unlikely if you don't see the same behavior for other policies) or Firefox.

It would be interesting to know if you see any error in the browser console.

Flags: needinfo?(mcurtean)
Attached image NUll HandlersPolicy.png —

Thanks for the quick response, Julien and apologies for the misunderstanding.
When the policy is null, there are no errors (only the Download Telemetry, but I've just removed that now from the JSON policies list and it stopped getting triggered )

Flags: needinfo?(mcurtean)

When the policy is null, there are no errors (only the Download Telemetry, but I've just removed that now from the JSON policies list and it stopped getting triggered )

I was interested by errors that might show up in the Browser Console (in Tools > Browser Tools > Browser Console).

I see the Handlers policy has x-restart-required
(see https://github.com/mozilla/enterprise-firefox/blob/fb8d5384d63d48f6ca755162541a769b6382f23d/browser/components/enterprisepolicies/schemas/policies-schema.json#L2569-L2577). This was added in bug 2046462.

These policies are not updated live: https://searchfox.org/enterprise-main/rev/73feaaf3ca5b5936d44e3244c981881f73c4e3c6/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs#675-687
In the Browser Console you might see this message: Policy Handlers requires a restart; its removal will not take effect before the next restart..

What happens if you restart Firefox? Do you still see it?

I think we could do a better job outlining that a policy update is pending a restart in about:policies. We could also show in the Console that this policy change will need a restart. It's worth filing 2 bugs for that, if you can do it?

Flags: needinfo?(mcurtean)

Indeed, it is worth noting that this is not a live policy and a restart is required.
I monitored the browser console in this initial use case, on Windows on the release build- 156.0 (20260910132224), by first removing the policy from the JSON for a clear slate and then:

  • added the policy through the Visual management screen by adding a value
  • checked browser console and about:policies
  • restarted the browser
  • removed the policy value through the Visual screen > check that it showed as "null" in the JSON
  • checked the browser console and about:policies and both showed the error that has not yet been fixed on release but did not show the "Policy Handlers requires a restart; its removal will not take effect before the next restart.." message.
    I'll check and attach the Multi-processes log for my last try, maybe you'll see something relevant there.
    As for logging the bugs, sure, I'll start asap.
Flags: needinfo?(mcurtean)

Taken from console while the policy value was moved to "not set", but before restart.

Depends on: 2072205
Depends on: 2072209

From your video, I see that after restart the "Handlers" policy is gone in about:policies, is that right? Then I believe we can close this bug as worksforme?

The log is output with the "warn" severity. The log is configured using hte pref browser.policies.loglevel. Do you know what is the value for this level on your instance?

(In reply to Julien Wajsberg [:julienw] from comment #7)

From your video, I see that after restart the "Handlers" policy is gone in about:policies, is that right? Then I believe we can close this bug as worksforme?

Yes, that makes sense, this occurred due to the confusion of what a "Not Set" policy value should result in. On that note, is this UX improvment tracked somehow or should I add an enhancement bug for it?

The log is output with the "warn" severity. The log is configured using hte pref browser.policies.loglevel. Do you know what is the value for this level on your instance?

it's not configured. should I set it to True?

Flags: needinfo?(felash)

(In reply to Miruna Curtean from comment #9)

Created attachment 9642458 [details]
browser.policies.loglevel.png

(In reply to Julien Wajsberg [:julienw] from comment #7)

From your video, I see that after restart the "Handlers" policy is gone in about:policies, is that right? Then I believe we can close this bug as worksforme?

Yes, that makes sense, this occurred due to the confusion of what a "Not Set" policy value should result in. On that note, is this UX improvment tracked somehow or should I add an enhancement bug for it?

It's tracked in my mind but a bug would be better ;-)

The log is output with the "warn" severity. The log is configured using hte pref browser.policies.loglevel. Do you know what is the value for this level on your instance?

it's not configured. should I set it to True?

You can try creating it as a string and setting it to "warn" :-)
(pure speculation, I haven't tried it)

Flags: needinfo?(felash)
No longer regressions: 2040651
See Also: → 2040651
Attached file GitHub Pull Request (obsolete) —
Assignee: nobody → felash
See Also: → 2072640

From the discussion I think this bug can be closed as invalid. Other bugs were created to specifically track what we found with the video. Closing!

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INVALID
Attachment #9647199 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: