Ability to configure external scripts/snippets to load on every page #113903
Labels
enhancement
New value added to drive a business result
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
We often see/have instances of Kibana, we need to inject customs scripts or snippets on every page, e.g. for GDPR compliance or Cookie Consent policies, or simply a custom analytics tool to analyze Kibana users behavior (see #81130).
Currently people need to write and maintain custom plugins to load those scripts. I think we should add a kibana.yml setting to core, like
externalScriptUrls: string[]
/scriptSnippets: string[]
, which core would automatically inject into every page when loaded. That way users will have the possibility to achieve usage of those external tools on their cluster without requiring to maintain a custom plugin.Especially for the snippets having this in core would help with CSP. Currently running such a plugin requires to allow
unsafe-inline
in the CSP for script-src, so the script can be executed (since nonce is disabled in kibana.yml and also we could only use one static nonce). If core would handle that, we could server generate a nonce to use when rendering the script tag and in the CSP we deliver.The text was updated successfully, but these errors were encountered: