Bug 46281

Summary: Не применяется политика ExtensionSettings в Chromium и Yandex
Product: Sisyphus Reporter: Elena Mishina <lepata>
Component: gpupdateAssignee: Evgeny Sinelnikov <sin>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: greh, nir, sin
Version: unstable   
Hardware: x86_64   
OS: Linux   
Attachments:
Description Flags
Ошибка в Chromium и Yandex none

Description Elena Mishina 2023-05-26 14:12:45 MSK
Created attachment 13274 [details]
Ошибка в Chromium и Yandex

В Chromium и Yandex при обработке политики ExtensionSettings, получаем ошибку (см.вложение):
Ошибка проверки схемы: Policy type mismatch: expected: "dictionary", actual: "string".
 Значение:
{"hdokiejnpimakedhajhdlcegeplioahd": {"installation_mode": "force_installed","update_url": "https://clients2.google.com/service/update2/crx"}, "pioclpoplcdbaefihamjohnefbikjilc": {"installation_mode": "force_installed","update_url": "https://clients2.google.com/service/update2/crx"}}

Содержимое файла /etc/chromium/policies/managed/policies.json:
{"AuthServerAllowlist": "*.test.alt", "DiskCacheSize": 5000, "ExtensionSettings": "{\"hdokiejnpimakedhajhdlcegeplioahd\": {\"installation_mode\": \"force_installed\",\"update_url\": \"https://clients2.google.com/service/update2/crx\"},  \"pioclpoplcdbaefihamjohnefbikjilc\": {\"installation_mode\": \"force_installed\",\"update_url\": \"https://clients2.google.com/service/update2/crx\"}}", "HomepageLocation": "https://docs.altlinux.org", "ShowHomeButton": false}

При этом для Firefox политика успешно применяется, хотя в /etc/firefox/policies/policies.json значения политики тоже записаны как строка:
"ExtensionSettings": "{\n\t\"*\": {\n\t\t\"blocked_install_message\": \"Custom error message\"\n\t},\n\t\"adblockultimate@adblockultimate.net\": {\n\t\t\"installation_mode\": \"force_installed\",\n\t\t\"install_url\": \"file:///home/user/adblockultimate@adblockultimate.net.xpi\"\n\t},\n\t\"rutokenplugin@rutoken.ru\": {\n\t\t\"installation_mode\": \"force_installed\",\n\t\t\"install_url\": \"https://addons.mozilla.org/firefox/downloads/file/3450175/adapter_rutoken_plugin-1.0.5.0.xpi\"\n\t}\n}"