grafana/pkg/plugins
Giuseppe Guerra 0db65d229e
Plugins: Add Subresource Integrity checks (#93024)
* Plugins: Pass hashes for SRI to frontend

* Add SRI hashes to frontendsettings DTOs

* Add docstring

* TestSriHashes

* Fix typo

* Changed SriHashes to ModuleHash

* update loader_test compareOpts

* update ModuleHash error message

* Add TestModuleHash/no_module.js

* Add omitEmpty to moduleHash

* Add ModuleHash to api/plugins/${pluginId}/settings

* moved ModuleHash field

* feat(plugins): add moduleHash to bootData and plugin types

* feat(plugins): if moduleHash is available apply it to systemjs importmap

* Calculate ModuleHash for CDN provisioned plugins

* Add ModuleHash tests for TestCalculate

* adjust test case name

* removed .envrc

* Fix signature verification failing for internal plugins

* fix tests

* Add pluginsFilesystemSriChecks feature togglemk

* renamed FilesystemSriChecksEnabled

* refactor(plugin_loader): prefer extending type declaration over ts-error

* added a couple more tests

* Removed unused features

* Removed unused argument from signature.DefaultCalculator call

* Removed unused argument from bootstrap.DefaultConstructFunc

* Moved ModuleHash to pluginassets service

* update docstring

* lint

* Removed cdn dependency from manifest.Signature

* add tests

* fix extra parameters in tests

* "fix" tests

* removed outdated test

* removed unused cdn dependency in signature.DefaultCalculator

* reduce diff

* Cache returned values

* Add support for deeply nested plugins (more than 1 hierarchy level)

* simplify cache usage

* refactor TestService_ModuleHash_Cache

* removed unused testdata

* re-generate feature toggles

* use version for module hash cache

* Renamed feature toggle to pluginsSriChecks and use it for both cdn and filesystem

* Removed app/types/system-integrity.d.ts

* re-generate feature toggles

* re-generate feature toggles

* feat(plugins): put systemjs integrity hash behind feature flag

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-10-04 14:55:09 +02:00
..
auth Schemas: Refactor plugin's metadata (#83696) 2024-03-07 11:09:19 +01:00
backendplugin Plugins: Add state logs for plugin client retrieval (#93630) 2024-09-24 15:55:02 +03:00
codegen CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243) 2024-06-14 19:35:30 +03:00
config Plugins: Add Subresource Integrity checks (#93024) 2024-10-04 14:55:09 +02:00
envvars Plugins: Refactor plugin config into separate env var and request scoped services (#83261) 2024-02-27 12:38:02 +01:00
httpresponsesender Plugins: Refactor call resource API handling (#67234) 2023-04-28 14:02:27 +02:00
instrumentationutils Plugins: Enhanced plugin instrumentation (#90199) 2024-07-09 15:03:46 +02:00
log Chore: Fix plugins manager process data race in tests (#81914) 2024-02-06 10:17:37 -03:00
manager Plugins: Add Subresource Integrity checks (#93024) 2024-10-04 14:55:09 +02:00
pfs Core: Remove thema and kindsys dependencies (#84499) 2024-03-21 11:11:29 +01:00
pluginrequestmeta Plugins: Add statusSource to partial data response error log (#78057) 2023-11-14 16:27:48 +02:00
pluginscdn Plugins: Add support for fetching plugin includes from plugin CDN (#91476) 2024-08-21 09:46:41 +01:00
repo Add debug headers when downloading plugins (#92579) 2024-08-29 11:30:21 +02:00
storage Plugins: Update CLI check if plugin is already installed (#91213) 2024-08-06 09:21:40 +01:00
apiserver_test.go K8s: Add basic query service (#80325) 2024-01-31 20:36:51 +02:00
apiserver.go K8s: Add basic query service (#80325) 2024-01-31 20:36:51 +02:00
errors.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
ifaces.go Plugins: Use handler middleware from the SDK (#93445) 2024-09-30 16:33:15 +02:00
localfiles_test.go chore: Updating linter, fixing some new warnings (#88863) 2024-06-06 13:01:27 -04:00
localfiles.go Plugins: Add support for fetching plugin includes from plugin CDN (#91476) 2024-08-21 09:46:41 +01:00
models.go Plugins: Add Subresource Integrity checks (#93024) 2024-10-04 14:55:09 +02:00
plugins_test.go Plugin Extensions: Require meta-data to be defined in plugin.json during development mode (#93429) 2024-10-04 08:41:26 +02:00
plugins.go Plugin Extensions: Require meta-data to be defined in plugin.json during development mode (#93429) 2024-10-04 08:41:26 +02:00
test_utils.go Plugins: Add support for fetching plugin includes from plugin CDN (#91476) 2024-08-21 09:46:41 +01:00