Local storage debugging...

6 views
Skip to first unread message

Marco Gaiarin

unread,
Jun 6, 2022, 11:14:43 AM6/6/22
to enter...@mozilla.org

I need to install this:

https://addons.mozilla.org/en-US/firefox/addon/ie-view-we/
https://github.com/clear-code/ieview-we

and reading the doc and:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/managed
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location

I've created the file:
%ProgramFiles%\Mozilla Firefox\browser\defaults\ievi...@clear-code.com.json
with inside:
{
"name": "ievi...@clear-code.com",
"description": "Managed Storage for IE View WE",
"type": "storage",
"data": {
"forceielist" : "https://sissi.*.lnf.it/*",
"disableForce" : false,
}
}


and then added the key:

HKLM\SOFTWARE\Mozilla\ManagedStorage\ievi...@clear-code.com

with default value ('@'):

%ProgramFiles%\Mozilla Firefox\browser\defaults\ievi...@clear-code.com.json

but seems that configuration are not catched.


But, because i've done some trial and error, and i suppose this is a
''default'' configuration, probably the managed storage get just
initialized and so i've to ''cleanup'' to reread the json.

Or enable some sort of ''debugging''...


Mike, some hint?! Thanks.

--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)

Mike Kaply

unread,
Jun 6, 2022, 11:30:41 AM6/6/22
to Marco Gaiarin, Mozilla.org
I don't have any experience doing managed storage with manifest files.

I've only used the 3rdparty stuff in policy.

You'll probably need to debug the extension to see if it's reading the values.

Mike

--
You received this message because you are subscribed to the Google Groups "enter...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise+...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/enterprise/20220606151432.GU4162%40sv.lnf.it.

Marco Gaiarin

unread,
Jun 8, 2022, 12:57:51 PM6/8/22
to enter...@mozilla.org
Mandi! Mike Kaply
In chel di` si favelave...

> I don't have any experience doing managed storage with manifest files.
> I've only used the 3rdparty stuff in policy.
> You'll probably need to debug the extension to see if it's reading the values.

I've tried to debug with:

https://extensionworkshop.com/documentation/develop/debugging/

but nothing strange seems to popup. I've fired up a bug:

https://github.com/clear-code/ieview-we/issues/46


Anyway, the extension seems to offer also MCD, and so i've created the
file ieview-we.js with:

// configurazione del plugin IE View WE
//
pref("extensions.ieview.forceielist", "https://sissi.*.lnf.it/*");

and landed to '%ProgramFiles%\Mozilla Firefox\browser\defaults\preferences\ieview-we.js'
but still no pref; something changed about preferences for FF 91?!


The only way i've found to setup the preferences was adding to the
'policies.json' file, but still there's no support for split-file for
policies, and my current management tool (WPKG) cannot affordably manage
file content, i'll need to switch to sometking like ansible but... it
is another life...

Marco Gaiarin

unread,
Jun 9, 2022, 3:55:30 AM6/9/22
to enter...@mozilla.org
Mandi! Mike Kaply
In chel di` si favelave...

> I don't have any experience doing managed storage with manifest files.
> I've only used the 3rdparty stuff in policy.

It works! I've followed strictly the documentation/examples/scripts
provided by the extensions:

https://github.com/clear-code/ieview-we/tree/master/managed-storage

and works as expected, seems that the file have to be places in
%ProgramData%, that seems a bit strange to be but... indeed works.


Options defined in this way are 'locked', as expected, so really all
works well!

Kris Lou

unread,
Jun 9, 2022, 11:27:03 AM6/9/22
to enter...@mozilla.org
You might be able to save yourself some more work and add the provided snippet to your policies.json (https://github.com/clear-code/ieview-we/blob/master/managed-storage/policies.json).

It looks like this extension already has the appropriate permissions in it's manifest.json ("permissions": ["storage"]).

TB version of the sample FF extension (because I can't find the link right now): https://github.com/thundernest/sample-extensions/tree/master/managedStorage



--
You received this message because you are subscribed to the Google Groups "enter...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise+...@mozilla.org.

Marco Gaiarin

unread,
Jun 10, 2022, 3:52:15 AM6/10/22
to Kris Lou, enter...@mozilla.org
Mandi! 'Kris Lou' via enter...@mozilla.org
In chel di` si favelave...

> You might be able to save yourself some more work and add the provided snippet
> to your policies.json (https://github.com/clear-code/ieview-we/blob/master/
> managed-storage/policies.json).

...but the single-file 'policy.json' it is hard to mantain without the
proper tool (Ansible, AFAIK); see:

https://bugzilla.mozilla.org/show_bug.cgi?id=1678999

> It looks like this extension already has the appropriate permissions in it's
> manifest.json ("permissions": ["storage"]).

Indeed, works. Thanks for the links.
Reply all
Reply to author
Forward
0 new messages