Chrome browser preferences file [SOLVED]

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
Manny.Ratliff
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2021, 18:59
Distribution: 5.2

Chrome browser preferences file [SOLVED]

Post#1 by Manny.Ratliff » 26 Sep 2021, 17:46

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"]
Last edited by Manny.Ratliff on 25 Oct 2021, 14:02, edited 1 time in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome browser preferences file

Post#2 by fanthom » 27 Sep 2021, 07:23

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
Please add [Solved] to your thread title if the solution was found.

Manny.Ratliff
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2021, 18:59
Distribution: 5.2

Chrome browser preferences file

Post#3 by Manny.Ratliff » 27 Sep 2021, 13:23

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome browser preferences file

Post#4 by fanthom » 27 Sep 2021, 19:14

Ok - understand.

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

Thanks
Please add [Solved] to your thread title if the solution was found.

Manny.Ratliff
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2021, 18:59
Distribution: 5.2

Chrome browser preferences file

Post#5 by Manny.Ratliff » 27 Sep 2021, 19:29

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",]
 }

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome browser preferences file

Post#6 by fanthom » 28 Sep 2021, 05:36

I have never tried such setup myself.

Pleas test it and let us know.


Thanks
Please add [Solved] to your thread title if the solution was found.

Manny.Ratliff
White ninja
White ninja
Posts: 5
Joined: 24 Sep 2021, 18:59
Distribution: 5.2

Chrome browser preferences file

Post#7 by Manny.Ratliff » 08 Oct 2021, 19:48

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Chrome browser preferences file

Post#8 by fanthom » 09 Oct 2021, 12:26

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
Please add [Solved] to your thread title if the solution was found.

Locked