Ryan McKinley
f69fd3726b
FeatureToggles: Add context and and an explicit global check ( #78081 )
2023-11-14 12:50:27 -08:00
Gabriel MABILLE
fe8d0e6381
ExtSvcAuth: Refactor external service registry to use ExternalServiceRegistry variables ( #78056 )
...
ExtSvcAuth: Refactor external service registry to use ExternalServiceRegistry
2023-11-13 16:23:11 +01:00
Gabriel MABILLE
20a2840046
Plugin: Remove external service on plugin removal ( #77712 )
...
* Plugin: Remove external service on plugin removal
* Add feature flag check in the service registration service
* Initialize map
* Add HasExternalService as suggested
* Commit suggestion
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com >
* Nit on test.
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com >
---------
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com >
2023-11-13 13:18:13 +01:00
Gabriel MABILLE
25b30aeb6d
Plugin: Enable service account based on plugin settings on init ( #77193 )
...
* Disable plugin service account
* Revert extsvc injection
* handle plugin state changes
* Use isProxyEnabled
* Remove plugininteg changes
* Change update function to also work for mysql 😩
* Plugin: enable service account based on plugin settings on
initialization
* Remove misleading comment
* Fix tests
* test message
* Clean up tests
* Simplify tests
* Re-order imports
* Remove unecessary comment
* Enable datasource plugins by default
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com >
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com >
2023-10-27 14:27:06 +02: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
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
Andres Martinez Gotor
1714fa598c
Chore: Refactor backend plugin errors ( #74928 )
2023-09-25 11:56:03 +02:00
Andres Martinez Gotor
1a8a19a9ed
Chore: Avoid stopping plugin ( #74654 )
2023-09-12 10:34:12 +02:00
lean.dev
5e0b20266e
Licensing: Pass func to update env variables when starting plugin ( #74620 )
2023-09-11 09:33:10 -03: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
557b1654f9
Plugins: Ensure service registration occurs in right order ( #74001 )
...
* make sure service registration occurs in right order
* fix test
2023-08-29 14:55:08 +02:00
Will Browne
3c50db328d
Plugins: Make Installer responsible for removing plugins from file system ( #73323 )
...
* installer is responsible for removing from file system
* take plugin as arg
* remove resolve step
* return plugin in test
2023-08-16 15:44:20 +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
Will Browne
a8577c21ba
Plugins: Migrate PluginStore mock to pre-existing fakes package ( #71664 )
...
* migrate to existing fakes package
* fix imports
2023-07-17 10:21:44 +00:00
Will Browne
162dde5bdd
Plugins: Use suffix for plugin directory ( #71375 )
...
* plugin dir suffix
* fix whitespace
* fix cli
* fix tests
* fixup
* simplify
* undo uninstall changes
2023-07-14 11:49:05 +02:00
Andres Martinez Gotor
025465e611
Chore: Update plugin schema with service registration info ( #70692 )
2023-06-27 08:47:25 +02:00
Andres Martinez Gotor
4ff0abd0d1
SaveExternalService (OAuth) on plugin load ( #69764 )
2023-06-26 16:38:43 +02:00
Will Browne
1fd4953833
Plugins: Optimize creation of Golang errors and slices ( #69448 )
...
* tidy up
* fix tests
2023-06-07 17:22:43 +02:00
Will Browne
12dc56ad0c
Plugins: Refactor plugin repository API ( #69063 )
...
* support grafana wildcard version
* undo go.mod changes
* tidy
* flesh out tests
* refactor
* add tests
* tidy naming
* undo some changes
* split interfaces
* separation
* update new signature
* simplify
* update var namings
* unexport types
* introduce opts pattern
* reorder test
* fix compat checks
* middle ground
* unexport client
* move back
* fix tests
* inline logger
* make client usable
* use fake logger
* tidy errors
* remove unused types
* fix test
* review fixes
* rework compatibility
* adjust installer
* fix tests
* opts => cfg
* remove unused var
* fix var name
2023-05-30 11:48:52 +02:00
Giuseppe Guerra
bfe1b68800
Plugins: Fs: Add option to access unallowed files in dev mode ( #66492 )
...
* Plugins: Fs: Add option to access unallowed files in dev mode
* Plugins: Fs: allow accessing unallowed files only when in dev mode
* Plugins: Fs: Add ProvideLocalFinder
* Plugins: FS: Pass whole config in NewLocalFinder()
* Plugins: FS: Add AllowListLocalFS
* Plugins: FS: Fix some tests
* Plugins: FS: Update tests
* Plugins: FS: Removed dead code
* Plugins: FS: Add tests for AllowListFS
* Plugins: FS: Update comments
* Plugins: FS: Use variadic arguments for allow list rather than map
* Plugins: FS: Remove unnecessary log
* Plugins: FS: Do not escape plugin root dir
* Fix merge conflict
* Plugins: FS: Update comments
* Plugins: FS: PR review changes
* Fix merge conflict
* Fix tests
* Cleanup
* Fix flaky test
* Changes from PR review
* Lint
* Add comment to LocalFS.Remove
* Fix Windows
* Renamed devMode to production
2023-04-27 10:26:15 +02:00
Will Browne
739c7f1c68
Plugins: Simplify plugin file removal ( #66115 )
...
* make explicit class check when attempting to remove plugin
* simplify plugin file tracking
* fix test
* apply feedback
* fix linter
2023-04-20 11:52:59 +02:00
Andres Martinez Gotor
52f39e6fa0
Chore: Soft failure in plugin initialization ( #66210 )
2023-04-12 12:34:16 +03:00
Will Browne
7bbe255150
Plugins: Add file store abstraction for handling plugin files ( #65432 )
...
* add file store
* fix markdown fetch bug
* add markdown tests
* fix var name
2023-03-29 12:55:55 +02:00
Will Browne
1387fec51d
Plugins: Markdown fetch retry with lowercase ( #65384 )
...
* retry with lowercase
* undo incorrect err check
* re-add defer to close file
* fix test
2023-03-27 19:44:06 +03:00
Will Browne
ee2dd62a1f
Plugins: Refactor loader + finder to support multiple sourcing methods ( #64735 )
...
* it's cdn time
* tidy body closing
* auto signed
* fix close
* update log name
* remove comments
2023-03-20 14:35:49 +01:00
lean.dev
0b0140b761
Licensing: Send the app url to plugin ( #64258 )
2023-03-08 14:44:04 -03:00
Will Browne
68df83c86d
Plugins: Add Plugin FS abstraction ( #63734 )
...
* unexport pluginDir from dto
* first pass
* tidy
* naming + add mutex
* add dupe checking
* fix func typo
* interface + move logic from renderer
* remote finder
* remote signing
* fix tests
* tidy up
* tidy markdown logic
* split changes
* fix tests
* slim interface down
* fix status code
* tidy exec path func
* fixup
* undo changes
* remove unused func
* remove unused func
* fix goimports
* fetch remotely
* simultaneous support
* fix linter
* use var
* add exception for gosec warning
* fixup
* fix tests
* tidy
* rework cfg pattern
* simplify
* PR feedback
* fix dupe field
* remove g304 nolint
* apply PR feedback
* remove unnecessary gosec nolint
* fix finder loop and update comment
* fix map alloc
* fix test
* remove commented code
2023-03-07 16:47:02 +01:00
Will Browne
ec82719372
Plugins: Introduce plugin package specific logger ( #62204 )
...
* refactor
* implement with infra log for now
* undo moving
* update package name
* update name
* fix tests
* update pretty signature
* update naming
* simplify
* fix typo
* delete comment
* fix import
* retrigger
2023-02-28 16:10:27 +01:00
Will Browne
ab8de1a0e3
Plugins: Add simple plugin sources service ( #63814 )
...
add simple plugin sources svc
2023-02-28 15:27:11 +01:00
Will Browne
c54aa18cd8
Plugins: Add tailored interface for plugins licensing needs ( #61045 )
...
* tailored licensing service
* appease linter
* fix
* retrigger
2023-01-18 18:02:54 +01:00
Gabriel MABILLE
30fae33f66
RBAC: Allow role registration for plugins ( #57387 )
...
* Picking role registration from OnCall POC branch
* Fix test
* Remove include actions from this PR
* Removing unused permission
* Adding test to DeclarePluginRoles
* Add testcase to RegisterFixed role
* Additional test case
* Adding tests to validate plugins roles
* Add test to plugin loader
* Nit.
* Scuemata validation
* Changing the design to decouple accesscontrol from plugin management
Co-authored-by: Kalle Persson <kalle.persson@grafana.com >
* Fixing tests
Co-authored-by: Jguer <joao.guerreiro@grafana.com >
* Add missing files
Co-authored-by: Jguer <joao.guerreiro@grafana.com >
* Remove feature toggle check from loader
* Remove feature toggleimport
* Feedback
Co-Authored-By: marefr <marcus.efraimsson@gmail.com >
* Fix test'
* Make plugins.RoleRegistry interface typed
* Remove comment question
* No need for json tags anymore
* Nit. log
* Adding the schema validation
* Remove group to take plugin Name instead
* Revert sqlstore -> db
* Nit.
* Nit. on tests
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com >
* Update pkg/services/accesscontrol/plugins.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com >
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com >
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com >
* Remove unecessary method. Update test name.
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com >
* Fix linting
* Update cue descriptions
* Fix test
Co-authored-by: Kalle Persson <kalle.persson@grafana.com >
Co-authored-by: Jguer <joao.guerreiro@grafana.com >
Co-authored-by: marefr <marcus.efraimsson@gmail.com >
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com >
2022-11-07 11:30:45 +01:00
Torkel Ödegaard
e31cb93ec0
NavTree: Make it possible to configure where in nav tree plugins live ( #55484 )
...
* NewIA: Plugin nav config
* progress
* Progress
* Things are working
* Add monitoring node
* Add alerts and incidents
* added experiment with standalone page
* Refactoring by adding a type for navtree root
* First test working
* More tests
* more tests
* Progress on richer config and sorting
* Sort weight working
* Path config
* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing
* fixed index routes
* removed file
* Fixes
* Fixing tests
* Fixing more tests and adding support for weight config
* Updates
* Remove unused fake
* More fixes
* Minor tweak
* Minor fix
* Can now control position using sortweight even when existing items have no sortweight
* Added tests for frontend standalone page logic
* more tests
* Remove unused fake and fixed lint issue
* Moving reading settings to navtree impl package
* remove nav_id setting prefix
* Remove old test file
* Fix trailing newline
* Fixed bug with adding nil node
* fixing lint issue
* remove some code we have to rethink
* move read settings to PrivideService and switch to util.SplitString
2022-09-28 08:29:35 +02:00
Will Browne
d0d8544ded
Plugins: Create single point of entry for adding / removing plugins ( #55463 )
...
* split out plugin manager
* remove whitespace
* fix tests
* split up tests
* updating naming conventions
* simplify manager
* tidy
* explorations
* fix build
* tidy
* fix tests
* add logger helper
* pass the tests
* tidying
* fix tests
* tidy and re-add test
* store depends on loader
* enrich tests
* fix test
* undo gomod changes
2022-09-23 14:27:01 +02:00
Will Browne
cd7a464f7e
Plugins: Ensure plugin uninstall success for "pre-installed" community plugins ( #55322 )
...
* track pre-installed external plugins in store
* fix tests
2022-09-19 12:14:30 +02:00
Will Browne
4a707e2a88
Plugins: Split plugin manager into smaller components ( #54384 )
...
* split out plugin manager
* remove whitespace
* fix tests
* split up tests
* updating naming conventions
* simplify manager
* tidy
* add more fakes
* testing time
* add query verif to int test
* renaming
* add process tests
* tidy up manager tests
* add extra case to int test
* add more coverage to store and process tests
* remove comment
* fix capatilization
* init on provide
* remove addfromsource from API
2022-08-30 17:30:43 +02:00