Page 1 of 1

Chrome browser preferences file [SOLVED]

Posted: 26 Sep 2021, 17:46
by Manny.Ratliff
I am thinking to try a chrome browser preference file to do some additional web filtering. From what I read in the Chrome documentation I can put "youtube.com" in the blocklist, but allow a specific URL like "youtube.com/watch?v=Zr1qmUnDvzo" to be accessed by puttin it in the allowlist. (reference: https://chromeenterprise.google/policies/#URLAllowlist).
My big question is, does the following meet the formatting requirement for my chrome policy file to work in Poreteus Kiosk?

Code: Select all

"homepage": "https://website.com",
"homepage_is_newtabpage": true,
"show_home_button": true
"bookmark_bar": {
 "show_on_all_tabs": true
 },
"sync_promo": {
 "show_on_first_run_allowed": false
 },
"distribution": {
 "suppress_first_run_bubble": true,
 "verbose_logging": true
 },
"URLAllowlist": [
 "https://www.youtube.com/watch?v=JKUFWK6iSsw",
 "https://www.youtube.com/watch?v=mpE-oaix5kA",
 "https://www.youtube.com/watch?v=XH2tF8oB3cw",
 "https://www.youtube.com/watch?v=RBbGzHq4id8",
 "https://www.youtube.com/watch?v=f_EQY-0ThOM",
 "https://www.youtube.com/watch?v=P4gs4tg_vQQ&feature=youtu.be",
 "https://www.youtube.com/watch?v=owGykVbfgUE",
 "https://www.youtube.com/watch?v=7VxXZby4shw",
 "https://www.youtube.com/user/washuntara",
 "https://www.youtube.com/watch?v=cXhQrJ37gFE",
 "https://www.youtube.com/watch?v=K6y8ICqIB1I&list=TLLh77Vug3-9g",
 "https://www.youtube.com/watch?v=iC8741_5G48",
 "https://www.youtube.com/user/NKM2Media#p/u/15/KB8F-iPoRzs",
 "https://www.youtube.com/watch?v=tdux5e-zHRE",
 "https://www.youtube.com/watch?v=IWxhxJTZ28U&feature=youtu.be&ab_channel=ABCNews",
 "https://www.youtube.com/watch?v=z0BxFRu_SOw&feature=youtu.be",
 "https://www.youtube.com/watch?v=Zr1qmUnDvzo",
 "https://www.youtube.com/watch?v=vShWqHm7rVE",
 "https://www.youtube.com/watch?v=5x-Pfljioek",
 "https://www.youtube.com/watch?v=I9k3xMPw7O8",
 "https://www.youtube.com/watch?v=sYPJFQZLmI8",
 "https://www.youtube.com/watch?v=p4e6i6I43x4",
 "https://www.youtube.com/watch?v=I9k3xMPw7O8",
 "https://news.yahoo.com/five-years-ago-today-obama-more-perfect-union-102607846.html",
 "https://answers.yahoo.com/question/index?qid=1006032811387",
 "https://www.bing.com/search?q=photosynth&form=MSDTR1",]
"URLBlocklist": [
 "youtube.com",
 "yahoo.com",
 "bing.com"]

Chrome browser preferences file

Posted: 27 Sep 2021, 07:23
by fanthom
Manny,

Some of kiosk parameters:
https://porteus-kiosk.org/parameters.html

overlap in functionality with Chrome policies.
Blacklist and whitelist are among them.

If you prefer to use policies then please use this parameter:
https://porteus-kiosk.org/parameters.html#whitelist

login to kiosk over SSH and run this command:

Code: Select all

cat $json
You will find correct policy formatting then.

In the long run I'm sure it will confuse you when you mix overlapping policies and parameters.
It would be better if you stick to just parameters (use policies only when some function is not covered by them).

Thanks

Chrome browser preferences file

Posted: 27 Sep 2021, 13:23
by Manny.Ratliff
Thanks for the fast response. As I understood blacklist and whitelist parameters in kiosk config, as soon as I use that, then only the URL's declared in the Whitelist will be accessible from the terminal(I would have to whitelist close to 4000 URL's for my situation). Where as using the block and allow list in chrome allows me to only specify URL's that I need to do special blocking with like shown with youtube in my example, but yet all other traffic already allowed by my network level filtering will not be affected. In all honesty, the Blocklist and Allowlist are the main things I want to see working

Chrome browser preferences file

Posted: 27 Sep 2021, 19:14
by fanthom
Ok - understand.

In any case use may use our parameters in order to get correct formatting in the policies file ($json).

Thanks

Chrome browser preferences file

Posted: 27 Sep 2021, 19:29
by Manny.Ratliff
So, this is the JSON I pulled from one of my kiosk terminals with the blocklist and allowlist appended at the end. Would that work properly?

Code: Select all

{
"AllowFileSelectionDialogs": false,
"AllowOutdatedPlugins": true,
"AlternateErrorPagesEnabled": false,
"AlwaysOpenPdfExternally": false,
"AutofillAddressEnabled": false,
"AutoplayAllowed": true,
"BackgroundModeEnabled": false,
"BlockThirdPartyCookies": false,
"BookmarkBarEnabled": false,
"BrowserAddPersonEnabled": false,
"BrowserGuestModeEnabled": false,
"BrowserSignin": 0,
"ChromeVariations": 2,
"CloudPrintSubmitEnabled": false,
"DefaultBrowserSettingEnabled": false,
"DefaultCookiesSetting": 1,
"DefaultImagesSetting": 1,
"DefaultJavaScriptSetting": 1,
"DefaultGeolocationSetting": 3,
"DefaultMediaStreamSetting": 3,
"DefaultNotificationsSetting": 3,
"DefaultPluginsSetting": 1,
"DefaultPopupsSetting": 2,
"DefaultSearchProviderEnabled": true,
"DefaultSearchProviderName": "Google",
"DefaultSearchProviderSearchURL": "{google:baseURL}search?q={searchTerms}",
"DeveloperToolsAvailability": 2,
"DisablePrintPreview": false,
"DisableSafeBrowsingProceedAnyway": false,
"DisableScreenshots": true,
"DownloadDirectory": "/dev/null",
"EditBookmarksEnabled": false,
"EnableMediaRouter": false,
"ExtensionInstallBlacklist": ["*"],
"FullscreenAllowed": true,
"HideWebStoreIcon": true,
"HomepageIsNewTabPage": false,
"IncognitoModeAvailability": 2,
"MetricsReportingEnabled": false,
"NTPCustomBackgroundEnabled": false,
"PasswordManagerEnabled": false,
"PluginsAllowedForUrls": [ "http://*", "https://*", ],
"PrinterTypeDenyList": [ "pdf",],
"PrintingEnabled": false,
"PromotionalTabsEnabled": false,
"ProxyMode": "system",
//"ProxyPacUrl": "http://ip/proxy.pac",
"QuicAllowed": false,
"RunAllFlashInAllowMode": true,
"SafeBrowsingEnabled": false,
"SafeBrowsingExtendedReportingOptInAllowed": false,
"SearchSuggestEnabled": false,
"ShowAppsShortcutInBookmarkBar": false,
"ShowHomeButton": true,
"SpellCheckServiceEnabled": false,
"StricterMixedContentTreatmentEnabled": false,
"SyncDisabled": true,
"TranslateEnabled": false,
"UrlKeyedAnonymizedDataCollectionEnabled": false,
"UserDataSnapshotRetentionLimit": 0,
"RestoreOnStartup": 4,
"URLBlocklist": [
 "youtube.com",
 "yahoo.com",
 "bing.com"],
"URLAllowlist": [
 "https://www.youtube.com/watch?v=JKUFWK6iSsw",
 "https://www.youtube.com/watch?v=mpE-oaix5kA",
 "https://www.youtube.com/watch?v=XH2tF8oB3cw",
 "https://www.youtube.com/watch?v=RBbGzHq4id8",
 "https://www.youtube.com/watch?v=f_EQY-0ThOM",
 "https://www.youtube.com/watch?v=P4gs4tg_vQQ&feature=youtu.be",
 "https://www.youtube.com/watch?v=owGykVbfgUE",
 "https://www.youtube.com/watch?v=7VxXZby4shw",
 "https://www.youtube.com/user/washuntara",
 "https://www.youtube.com/watch?v=cXhQrJ37gFE",
 "https://www.youtube.com/watch?v=K6y8ICqIB1I&list=TLLh77Vug3-9g",
 "https://www.youtube.com/watch?v=iC8741_5G48",
 "https://www.youtube.com/user/NKM2Media#p/u/15/KB8F-iPoRzs",
 "https://www.youtube.com/watch?v=tdux5e-zHRE",
 "https://www.youtube.com/watch?v=IWxhxJTZ28U&feature=youtu.be&ab_channel=ABCNews",
 "https://www.youtube.com/watch?v=z0BxFRu_SOw&feature=youtu.be",
 "https://www.youtube.com/watch?v=Zr1qmUnDvzo",
 "https://www.youtube.com/watch?v=vShWqHm7rVE",
 "https://www.youtube.com/watch?v=5x-Pfljioek",
 "https://www.youtube.com/watch?v=I9k3xMPw7O8",
 "https://www.youtube.com/watch?v=sYPJFQZLmI8",
 "https://www.youtube.com/watch?v=p4e6i6I43x4",
 "https://www.youtube.com/watch?v=I9k3xMPw7O8",
 "https://news.yahoo.com/five-years-ago-today-obama-more-perfect-union-102607846.html",
 "https://answers.yahoo.com/question/index?qid=1006032811387",
 "https://www.bing.com/search?q=photosynth&form=MSDTR1",]
 }

Chrome browser preferences file

Posted: 28 Sep 2021, 05:36
by fanthom
I have never tried such setup myself.

Pleas test it and let us know.


Thanks

Chrome browser preferences file

Posted: 08 Oct 2021, 19:48
by Manny.Ratliff
fanthom wrote:
28 Sep 2021, 05:36
I have never tried such setup myself.

Pleas test it and let us know.


Thanks
It did not work for me. It skips over the whole blocklist and allowlist

Chrome browser preferences file

Posted: 09 Oct 2021, 12:26
by fanthom
I have tested this scenario and found the following:

if you use following parameters:

Code: Select all

blacklist=https://www.youtube.com
whitelist=https://www.youtube.com/watch?v=Zr1qmUnDvzo  
then whitelisted URL is allowed but every other URL (from the whole internet) is blocked.

Unfortunately there is no way to tell Chrome to block certain domain and allow only specific URLs from such domain without blocking everything else.

Thanks