Todd Treece
dc77da11cf
Plugins: API sync ( #112452 )
2025-10-24 08:09:26 -04:00
Andreas Christou
fa9d6be255
Azure: Use SSO settings in plugin context ( #112058 )
...
* Bump grafana-azure-sdk-go
* Set override values
* Add Azure settings helper covering SSO cases
* Ensure Azure settings are correctly created
- Add mock for sso settings service
- Add tests
- Update wire
* Minor improvements
* Test updates
* Move fake implementation
* add interface to limit leakage
* rename
* work sync
* Fix wire
* Add fake provider
* Update tests
* Actually fix the workspace
* More go dependency fixes
* Update tests
* Update workspace, again
* Add missing tests
* Fix dependencies
* These dependencies..
* More dependency things
* Okay now dependencies really are fixed
* Lint
* Update pkg/services/pluginsintegration/pluginconfig/request.go
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com >
---------
Co-authored-by: Will Browne <wbrowne@tcd.ie >
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com >
2025-10-10 11:46:26 +01:00
Will Browne
69f788ad55
Plugins: Remove pluginAssetProvider feature toggle ( #112046 )
...
* remove toggle
* fix lint issue
2025-10-10 10:35:22 +01:00
Will Browne
f6ed9e6ff0
Plugins: Introduce plugin asset provider ( #108063 )
...
* introduce plugin asset provider
* simply with PR feedback
* fix linter
2025-07-17 16:20:35 +01:00
Andres Martinez Gotor
8e663b50e9
Advisor: Allow to define enterprise checks ( #108114 )
2025-07-17 11:37:32 +02:00
Will Browne
3d37f969e7
Plugins: Move discovery logic to plugin sources ( #106911 )
...
* move finder behaviour to source
* tidy
* undo go.mod changes
* fix comment
* tidy unsafe local source
2025-06-19 10:28:23 +01:00
Hugo Kiyodi Oshiro
43748e43bb
Plugins: Add plugins auto update feature ( #104112 )
2025-05-09 15:58:04 +02:00
Andres Martinez Gotor
89c70fcdcf
Chore: Advisor stats ( #103711 )
2025-04-10 10:51:00 +02:00
Will Browne
5b67ae1876
Plugins: Remove support for secrets manager plugins ( #101467 )
...
* remove secrets manager code
* remove unused struct
* add test toggles back
* rollback golden file changes
* add missing TestMain
* update betterer
2025-03-20 10:00:59 +00:00
Andres Martinez Gotor
a9634f9b12
Advisor: Skip plugin check for provisioned plugins ( #101782 )
2025-03-13 15:04:08 +01:00
Giuseppe Guerra
ccb9cab131
Plugins: Add synchronous CDN plugin loader ( #99096 )
...
* WIP
* Run plugin validations and validation steps sequentially if feature is off
* Remove dependency between sources.Service and pluginscdn.Service
* lint
* Parallelize validation only if class is CDN
* re-generate feature toggles
* remove waitgroup usage
* PR review: Add loader concurrency limit setting
* re-generate feature toggles
* pr review feedback
* fix const name
* Skip module.js validation for cdn plugins
* do not run validation steps in parallel
* lint
* reduce diff
* re-generate feature toggles
* lint
* pr review feedback
* remove leftover config.PluginManagementCfg from sources.Service
2025-02-07 11:07:08 +01:00
Andres Martinez Gotor
b0e74cf737
Grafana Advisor: Plugin checks ( #99502 )
2025-01-27 16:39:46 +01:00
Gábor Farkas
3a719a2cfd
api: use alerting headers ( #95118 )
...
* api: use alerting headers
* improve code, add integration test
* better comment
* fixed test
* merged tests
2024-10-23 09:39:22 +02:00
Marcus Efraimsson
b28085110d
Plugins: Auto instrumentation improvements ( #94193 )
2024-10-15 14:02:34 +02:00
Marcus Efraimsson
b7a7f2bd62
Plugins: Use handler middleware from the SDK ( #93445 )
...
updates sdk to v0.251.0
2024-09-30 16:33:15 +02:00
Will Browne
2c47d246fc
Plugins: Introduce LoadingStrategy for frontend loading logic ( #92392 )
...
* do it all
* feat(plugins): move loadingStrategy to ds pluginMeta and add to plugin settings endpoint
* support child plugins and update tests
* use relative path for nested plugins
* feat(plugins): support nested plugins in the plugin loader cache by extracting pluginId from path
* feat(grafana-data): add plugin loading strategy to plugin meta and export
* feat(plugins): pass down loadingStrategy to fe plugin loader
* refactor(plugins): make PluginLoadingStrategy an enum
* feat(plugins): add the loading strategy to the fe plugin loader cache
* feat(plugins): load fe plugin js assets as script tags based on be loadingStrategy
* add more tests
* feat(plugins): add loading strategy to plugin preloader
* feat(plugins): make loadingStrategy a maybe and provide fetch fallback
* test(alerting): update config.apps mocks to include loadingStrategy
* fix format
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com >
2024-09-09 10:38:35 +01:00
Sven Grossmann
5ad7c47816
Plugin Instrumentation: Add target property to request logs ( #91946 )
...
* Plugin Instrumentation: Add `target` property to request logs
* remove comment
* remove error
2024-09-02 17:41:26 +02:00
Ryan McKinley
2e60f28044
Auth: remove id token flag ( #92209 )
2024-08-21 16:30:17 +03:00
Andres Martinez Gotor
d342e76f63
Chore: Add skeleton for background plugin installer ( #91743 )
2024-08-12 16:39:31 +02:00
Will Browne
1b3fa8c47f
Plugins: Hide version information when plugin is managed ( #88065 )
...
* first pass
* fixup
* fix linter issues
* fix API test
* update naming
* rework
* update var name
* empty check
* prettier
* fix test
* fix lint
2024-07-29 11:18:43 +01:00
Andres Martinez Gotor
60ce523b72
Refactor plugin context initialization ( #88343 )
2024-05-28 16:59:06 +03:00
Andres Martinez Gotor
ab5a065256
Revamp plugin loading error management ( #85939 )
2024-04-11 16:18:04 +02:00
Dave Henderson
5687243d0b
Feature Flags: use FeatureToggles interface where possible ( #85131 )
...
* Feature Flags: use FeatureToggles interface where possible
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
* Replace TestFeatureToggles with existing WithFeatures
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
2024-04-04 12:22:31 -04:00
Serge Zaitsev
4d4c06b480
Chore: Vendor wire into pkg/build ( #84637 )
...
* vendor latest wire into pkg/build
* use vendored wire in builds
* fix wire import path
* remove wire from bingo
* also support google/wire import
* make prettier happy
* change package in tess
* add debug walk for drone
* add wire_gen in tests
* remove debug walk
* restore imports
2024-03-25 11:23:27 +01:00
Marcus Efraimsson
488bbaacab
Chore: Remove unused dependenices in plugin client middlewares ( #84624 )
...
* Chore: Remove unused dependenices in plugin client middlewares
* refactor logger middleware to remove cfg dependency
* hack to make tracing work in api group builders
2024-03-22 12:54:35 +01:00
Will Browne
225ac8003c
Plugins: Tidy config struct ( #84168 )
...
* tidy plugins config usage
* fix tests
2024-03-11 16:28:46 +01:00
Will Browne
5edd96ae77
Plugins: Refactor plugin config into separate env var and request scoped services ( #83261 )
...
* seperate services for env + req
* merge with main
* fix tests
* undo changes to golden file
* fix linter
* remove unused fields
* split out new config struct
* provide config
* undo go mod changes
* more renaming
* fix tests
* undo bra.toml changes
* update go.work.sum
* undo changes
* trigger
* apply PR feedback
2024-02-27 12:38:02 +01:00
Giuseppe Guerra
68fe045ec7
Plugins: Remove pluginsInstrumentationStatusSource feature toggle ( #83067 )
...
* Plugins: Remove pluginsInstrumentationStatusSource feature toggle
* update tests
* Inline pluginRequestDurationWithLabels, pluginRequestCounterWithLabels, pluginRequestDurationSecondsWithLabels
2024-02-21 12:57:40 +01:00
Andres Martinez Gotor
26bc87b60e
Chore: Replace core plugins as external warning ( #81877 )
2024-02-07 16:17:13 +02:00
Ieva
c310a20966
AuthZ: add headers for IP range AC checks for cloud data sources ( #80208 )
...
* add feature toggle
* add a middleware that appens headers for IP range AC
* sort imports
* sign IP range header and only append it if the request is going to allow listed data sources
* sign a random generated string instead of IP, also change the name of the middleware to make it more generic
* remove the DS IP range AC options from the config file; remove unwanted change
* add test
* sanitize the URLs when comparing
* cleanup and fixes
* check if X-Real-Ip is present, and set the internal request header if it is not present
* use split string function from the util package
2024-01-31 18:09:24 +01:00
Will Browne
3f30cbf91c
DataSources: Add datasource fetching + querying interface ( #80749 )
...
* first pass
* separate oss + enterprise
* tidy things up
* add ctx
* fix tests
* use standalone svcs
* mv plugin context provide
* fix wire
* fix import
2024-01-19 15:56:52 +01:00
Michael Mandrus
db83eb30a2
Caching: Remove useCachingService feature toggle ( #80695 )
...
remove useCachingService feature toggle
2024-01-17 16:53:25 -05:00
Will Browne
ce8fd14f1f
Plugins: Make renderer service load renderer plugin ( #77854 )
...
* rendering service loads renderer plugin
* update naming
* tidy
* apply PR feedback
* fix missing feature manager
* fix step
* set plugin
2023-12-14 17:33:29 +01:00
Ryan McKinley
f69fd3726b
FeatureToggles: Add context and and an explicit global check ( #78081 )
2023-11-14 12:50:27 -08:00
Giuseppe Guerra
46261de32d
Plugins: Fix status_source always being "plugin" in plugin request logs ( #77433 )
...
* Plugins: Fix status_source always being "plugin" in plugin logs
* add tests
* Fix TestInstrumentationMiddlewareStatusSource
2023-10-31 13:42:39 +01:00
Hugo Kiyodi Oshiro
dfc1875061
Plugins: Add managed instance installation resources ( #76767 )
...
* Plugins: Add configs to allow managed install
* Expose methods to use with cloud plugin installer
* Change plugins installer bind to OSS
2023-10-24 16:21:37 +02:00
Alexander Zobnin
cad3c43bb1
Team LBAC: Move middleware to enterprise ( #76969 )
...
* Team LBAC: Move middleware to enterprise
* Remove ds proxy part
* Move utils to enterprise
2023-10-24 14:06:18 +03:00
Eric Leijonmarck
be5ba68132
Team LBAC: Add teamHeaders for datasource proxy requests ( #76339 )
...
* Add teamHeaders for datasource proxy requests
* adds validation for the teamHeaders
* added tests for applying teamHeaders
* remove previous implementation
* validation for header values being set to authproxy
* removed unnecessary checks
* newline
* Add middleware for injecting headers on the data source backend
* renamed feature toggle
* Get user teams from context
* Fix feature toggle name
* added test for validation of the auth headers and fixed evaluation to cover headers
* renaming of teamHeaders to teamHTTPHeaders
* use of header set for non-existing header and add for existing headers
* moves types into datasources
* fixed unchecked errors
* Refactor
* Add tests for data model
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com >
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com >
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com >
Co-authored-by: Victor Cinaglia <victor@grafana.com >
2023-10-17 11:23:54 +01:00
Giuseppe Guerra
c4fefd8da9
Plugins: Add status_source label to plugin request logs ( #76676 )
2023-10-17 11:09:01 +02:00
Giuseppe Guerra
f5076d1868
Plugins: Add status_source label to plugin request metrics ( #76236 )
...
* Plugins: Chore: Renamed instrumentation middleware to metrics middleware
* Removed repeated logger attributes in middleware and contextual logger
* renamed loggerParams to logParams
* PR review suggestion
* Add pluginsInstrumentationStatusSource feature toggle
* Plugin error source prometheus metrics
* Add error_source to logs
* re-generate feature toggles
* fix compilation issues
* remove unwanted changes
* Removed logger middleware changes, implement error source using context
* Renamed pluginmeta to pluginrequestmeta, changed some method names
* Fix comment
* pluginrequestmeta.go -> plugin_request_meta.go
* Replaced plugin request meta with status source
* Add tests for pluginrequestmeta status source
* Fix potential nil pointer dereference in instrmentation middleware
* Add metrics middleware tests
* Sort imports in clienttest.go
* Add StatusSourceFromContext test
* Add error_source label to plugin_request_duration_seconds
* Re-generate feature flags
* lint
* Use StatusSourcePlugin by default
* re-generate feature flags
2023-10-17 10:27:45 +02:00
Giuseppe Guerra
50504ba008
Plugins: Chore: Renamed instrumentation middleware to metrics middleware ( #76186 )
...
* Plugins: Chore: Renamed instrumentation middleware to metrics middleware
* Removed repeated logger attributes in middleware and contextual logger
* renamed loggerParams to logParams
* PR review suggestion
* Add contextual logger middleware
* Removed unused params from logRequest
* Removed unwanted changes
* Safer FromContext method
* Removed traceID from logParams
2023-10-11 12:42:32 +02:00
Giuseppe Guerra
cfcfbe4aaa
Plugins: Refactoring: Implement plugin instrumentation as a middleware ( #76011 )
...
* Plugins: Refactor instrumentation as plugin client middleware
* Simplify repeated code
* Fix compilation error
* Add comments
* Moved status and endpoint consts to utils.go
* Fix wrong endpoint name in CheckHealth InstrumentationMiddleware
* Add tests
* Fix wrong endpoint value in instrumentPluginRequestSize
* removed todo
* PR review feedback: use MustRegister
* PR review feedback: move tracing middleware before instrumentation middleware
* PR review feedback: removed decommissioned check
* PR review feedback: extract prometheus metrics into separate variables
2023-10-09 14:12:57 +02:00
Karl Persson
684d68365e
IDforwarding: forward signed id to plugins ( #75651 )
...
* Plugins: Add client middlware that forwards the signed grafana id token if present
* DsProxy: Set grafana id header if id token exists
* Add util function to apply id token to header
* Only add id forwarding middleware if feature toggle is enabled
* Add feature toggles to ds proxy and check if id forwarding is enabled
* Clean up test setup
* Change to use backend.ForwardHTTPHeaders interface
* PluginProxy: Forward signed identity when feature toggle is enabled
* PluginProxy: forrward signed id header
2023-10-02 09:14:10 +02:00
Gabriel MABILLE
969e6a17ba
Plugins: Rename oauth package to auth ( #75611 )
...
* Plugins: Rename oauth package to auth
* Missed one comment
2023-09-28 12:18:09 +02:00
Marcus Efraimsson
f70990d8eb
Plugins: Refactor instrumentation to logger middleware ( #74726 )
2023-09-12 17:33:48 +02:00
Will Browne
e855efb13d
Plugins: Move store and plugin dto to pluginsintegration ( #74655 )
...
move store and plugin dto
2023-09-11 13:59:24 +02:00
Will Browne
75b0788377
Plugins: Remove registry dependency from process manager ( #73241 )
...
simplify
2023-08-16 10:46:00 +02:00
Will Browne
72da44db0e
Plugins: Add validation stage to plugin loader pipeline ( #73053 )
...
* first pass
* change validation signature
* err tracking
* fix
* undo golden
* 1 more
* fix
* adjust doc
* add test helper
* fix linter
2023-08-09 18:25:28 +02:00
Will Browne
60b4a0b2a4
Plugins: Add termination stage to plugin loader pipeline ( #72822 )
...
* add termination stage
* uid -> pluginID (for now)
* also fix fakes
* add simple test
* Fix logger name
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com >
* inline stop func call
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com >
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com >
2023-08-04 11:57:49 +02:00
Will Browne
ad2705fa0b
Plugins: Add inititialization stage to plugin loader pipeline ( #72667 )
...
* first pass
* migrate tests
* simplify
* fix comments
* fix linter
* nil checks
* remove comment
2023-08-02 16:29:12 +00:00