Andres Martinez Gotor
f9cd0fe5d1
Add debug headers when downloading plugins ( #92579 )
2024-08-29 11:30:21 +02:00
Andres Martinez Gotor
21bf013a8e
Add support for synchronous plugin installation ( #92129 )
2024-08-21 16:11:55 +02:00
Andres Martinez Gotor
55381a3e77
Add check for update/uninstall of plugins ( #91889 )
2024-08-14 14:57:37 +02:00
Ieva
9bb2cf4968
RBAC: Allow omitting default permissions when a new resource is created ( #90720 )
...
* Cfg: Move rbac settings to own struct
* Cfg: Add setting to control if resource should generate managed permissions when created
* Dashboards: Check if we should generate default permissions when dashboard is created
* Folders: Check if we should generate default permissions when folder is created
* Datasource: Check if we should generate default permissions when datasource is created
* ServiceAccount: Check if we should generate default permissions when service account is created
* Cfg: Add option to specify resources for wich we should default seed
* ManagedPermissions: Move providers to their own files
* Dashboards: Default seed all possible managed permissions if configured
* Folders: Default seed all possible managed permissions if configured
* Cfg: Remove service account from list
* RBAC: Move utility function
* remove managed permission settings from the config file examples, change the setting names
* remove ini file changes from the PR
* fix setting reading
* fix linting errors
* fix tests
* fix wildcard role seeding
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: jguer <me@jguer.space>
2024-07-24 19:31:26 +03:00
Hugo Kiyodi Oshiro
5c966fd400
Plugins: Add logs to for plugin management actions ( #90587 )
...
* Plugins: Add logs to for plugin management actions
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-07-18 17:19:36 +02:00
Andres Martinez Gotor
a22c1ae424
Chore: Remove provisional APIVersion from plugin info ( #89831 )
2024-07-01 10:53:16 +02:00
Andres Martinez Gotor
d8904f3ca4
Add apiVersion to plugin models ( #87510 )
2024-05-14 13:58:27 +02:00
Andres Martinez Gotor
eac02a61e1
Return plugin error when requesting settings ( #86052 )
2024-04-18 14:29:02 +02:00
Alexander Zobnin
3127566a20
Access control: Use ResolveIdentity() for authorizing in org ( #85549 )
...
* Access control: Use ResolveIdentity() for authorizing in org
* Fix tests
* Fix middleware tests
* Use ResolveIdentity in HasGlobalAccess() function
* remove makeTmpUser
* Cleanup
* Fix linter errors
* Fix test build
* Remove GetUserPermissionsInOrg()
2024-04-10 12:42:13 +02:00
Selene
1181141b40
Schemas: Refactor plugin's metadata ( #83696 )
...
* Remove kinds verification for kind-registry
* Read plugin's json information with json library instead of use thema binding
* Remove grafanaplugin unification
* Don't use kindsys for extract the slot name
* Fix IsGroup
* Remove all plugindef generation
* Refactor schema interfaces
* Pushed this change from a different branch by mistake...
* Create small plugin definition structure adding additional information for plugins registration
* Add some validation checks
* Delete unused code
* Fix imports lint
2024-03-07 11:09:19 +01:00
김은빈
96dfb385ca
Grafana: Replace magic number with a constant variable in response status ( #80132 )
...
* Chore: Replace response status with const var
* Apply suggestions from code review
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add net/http import
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-02-27 18:39:51 +02:00
Will Browne
788b9afda3
Plugins: Make it possible to support multiple plugin versions ( #82116 )
...
* first pass
* use version in more places
* add comment
* update installer
* fix wire
* fix tests
* tidy
* simplify changes
* fix in mem
* remove unused step
* fix step dupe logic for child plugins + add tests
2024-02-12 12:47:49 +01:00
linoman
824e0f9ce8
Plugins: Display plugin permissions required ( #78355 )
...
* Add definition of external service registration
* Add style and tables for permissions needed
* Add external service registration to local without counterpart
* Add feature toggle check
* Add feature flag check in the backend as well
* Add the disclaimer for permissions
---------
Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
2023-12-20 16:29:13 +01:00
Gabriel MABILLE
5b70130e6c
Plugins: Rename externalServiceAuthentication
to iam
( #78686 )
...
Plugins: Rename externalServiceAuthentication to iam
2023-12-04 13:14:21 +01:00
Gabriel MABILLE
ef2c79d22a
Chore: use errutil for pluginRepo errors ( #78647 )
...
* Chore: use errutil for pluginRepo errors
* Update pkg/util/errutil/status.go
* Use errutil helper functions
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Forgot the log level
* Use entity
---------
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-11-30 15:49:27 +01:00
Gabriel MABILLE
24a6ee4a91
Plugins: Check installer's permissions include plugins' permissions ( #78211 )
...
* Check installer perm
* Failed eval better output
* Switch fetching json data in the repo
* Comment
* Account for feedback
* Mv single_organization config option
* Inline error check
* Starting to replace errors not to have to do the management in two places
* Continue error translation
* Cover ErrChecksumMismatch
* Refactor a bit
* Lint. Tab
* log instead of erroring out
* Nit.
* Revert change on kinds
* revert file again
* Fix tests
* Match core plugin error status code
* Skip permission check for Grafana Admin
* Use errutil templates
* Use errutil templating
* Inline
* Test templating
* revert error changes
* Remove isGrafanaAdmin skip
* Feature toggle check
* Small refactor on hasPluginRequestedPermissions
* Add test
* Imports
* Post install check
* change log messages so that they make sense
* Cover no scope case
* Inline
* Nit.
* Fix test
2023-11-24 16:02:44 +01:00
Will Browne
7d2d5fbe89
Plugins: Add referer and user login params to plugin CDN redirect logs ( #77942 )
...
add referer and user
2023-11-10 11:52:06 +01:00
Giuseppe Guerra
da117aea1c
Plugins: Allow disabling angular deprecation UI for specific plugins ( #77026 )
...
* Plugins:Allow disabling angular deprecation UI for specific plugins
* add backend test
* changed test names
* lint
* Removed angular properties from DataSourceDTO
* Update tests
* Move angularDetected and hideAngularDeprecation in angularMeta property
* Fix angular property name in AppPluginConfig
* Fix reference to angularMeta.detected
* Fix hide_angular_deprecation not working for core plugins
* lint
2023-11-10 11:44:54 +01:00
Jo
729dafaff9
Auth: Unfurl OrgID in pkg/api to allow using identity.Requester interface ( #76108 )
...
Unfurl OrgID in pkg/api to allow using identity.Requester interface
2023-10-06 11:34:36 +02:00
Andres Martinez Gotor
ece94b1e01
Chore: Remove plugincontext.ErrPluginNotFound ( #74997 )
2023-09-25 13:10:47 +03:00
Andres Martinez Gotor
1714fa598c
Chore: Refactor backend plugin errors ( #74928 )
2023-09-25 11:56:03 +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
Marcus Efraimsson
8ee43f3705
Instrumentation: Add status_source label to request metrics/logs ( #74114 )
...
Ref #68480
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2023-09-11 12:13:13 +02:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
Jo
26339f978b
Auth: Move access control API to SignedInUser interface ( #73144 )
...
* move access control api to SignedInUser interface
* remove unused code
* add logic for reading perms from a specific org
* move the specific org logic to org_user.go
* add a comment
---------
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
2023-08-18 11:42:18 +01:00
Will Browne
d29f4a8f76
Plugins: Add context to StaticRouteResolver and ErrorResolver interfaces ( #73121 )
...
* add ctx
* fix tests
2023-08-10 10:32:12 +02:00
Will Browne
91b0cdc871
Plugins: Account for nil user when constructing plugin context ( #69811 )
...
cater for nil user
2023-06-08 19:36:41 +03:00
Will Browne
624777258b
Plugins: Refactor creation of plugin context to dedicated service ( #66451 )
...
* first pass
* fix tests
* return errs
* change signature
* tidy
* delete unnecessary fields from test
* tidy
* fix tests
* simplify
* separate error check in API
* apply nits
2023-06-08 13:59:51 +02:00
Will Browne
a221e1d226
Plugins: Standardize Golang enum naming convention ( #69449 )
...
* standardize enum pattern
* fix up
2023-06-08 12:21:19 +02:00
Esteban Beltran
1ed4c0382b
Plugins: Add Initial implementation for frontend plugins sandboxing ( #68889 )
2023-06-05 10:51:36 +02:00
Ieva
d98813796c
RBAC: Remove legacy AC from HasAccess permission check ( #68995 )
...
* remove unused HasAdmin and HasEdit permission methods
* remove legacy AC from HasAccess method
* remove unused function
* update alerting tests to work with RBAC
2023-05-30 14:39:09 +01: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
16359c82a2
Plugins: Angular deprecation: Detect Angular plugins and expose in API ( #66824 )
...
* Plugins: Angular deprecation: Detect Angular plugins and expose in API
* Plugins: Angular detector: Close module.js
* Plugins: Angular detector: consistent error messages
* Plugins: Angular detector: Add test for missing module.js
* Plugins: Angular detector: Fix integration tests
* Plugins: Angular detector: Changed Angular detection patterns
* Moved inMemoryFS to test_utils.go
* Add different angular detectors
* Plugins: Update plugins/data/expectedListResp.json
* Plugins: Rename angular property to angularDetected
* Plugins: Rename angular to angularDetected in Plugin and PluginDTO
* Plugins: Add angularDetected to datasources, apps and plugins frontendsettings
* Plugins: Add test for AngularDetected frontend settings
2023-05-12 12:51:11 +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
98778289cb
Catalog: Show install error with incompatible version ( #65059 )
2023-04-19 10:22:24 +02: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
31d6416157
Plugins: Migrate licensing and access control to pkg/services/pluginsintegration package ( #65258 )
...
* migrate licensing + access control
* update package name
2023-03-27 11:15:37 +02:00
Will Browne
94f39e69a3
Plugins: Migrate plugincontext
, adapters
and pluginsettings
to pkg/services/pluginsintegration package ( #64154 )
...
* migrate plugincontext, adapter and pluginsettings
* add to CODEOWNERS
* fix imports
* fix CODEOWNERS
* take pluginsettings
* migrate wire stuff
2023-03-07 11:22:30 -05: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
Joey
fbd049a094
Profiling: Enable flame graph & Phlare/Parca data sources for all users ( #63488 )
...
* Remove flame graph toggle
* Remove beta badge from panel
* Update expectedListResp.json
* Update flame graph container to only show if there is data
2023-03-01 11:32:39 +00:00
Will Browne
200d2ad249
Plugins: Invalidate plugin context app settings cache post update ( #63279 )
...
invalid plugin settings
2023-02-24 12:13:22 +01:00
Giuseppe Guerra
af1e2d68da
Plugins: Allow loading panel plugins from a CDN ( #59096 )
...
* POC: Plugins CDN reverse proxy
* CDN proxy POC: changed env var names
* Add authorization: false for /public path in frontend plugin loader
* Moved CDN settings to Cfg, add some comments
* Fix error 500 in asset fetch if plugin is not using CDN
* Fix EnterpriseLicensePath declared twice
* Fix linter complaining about whitespaces
* Plugins CDN: Skip signature verification for CDN plugins
* Plugins CDN: Skip manifest and signature check for cdn plugins
* Plugins: use IsValid() and IsInternal() rather than equality checks
* Plugins CDN: remove comment
* Plugins CDN: Fix seeker can't seek when serving plugins from local fs
* Plugins CDN: add back error codes in getLocalPluginAssets
* Plugins CDN: call asset.Close() rather than asset.readSeekCloser.Close()
* Plugins CDN: Fix panic in JsonApiErr when errorMessageCoder wraps a nil error
* Plugins CDN: Add error handling to proxyCDNPluginAsset
* Plugins CDN: replace errorMessageCoder with errutil
* Plugins CDN POC: expose cdn plugin paths to frontend for system.js
* Plugins CDN: Fix cdn plugins showing as unsigned in frontend
* WIP: Add support for formatted URL
* Fix missing cdnPluginsBaseURLs in GrafanaConfig
* Plugins CDN: Remove reverse proxy mode and reverse proxy references
* Plugins CDN: Simplify asset serving logic
* Plugins CDN: sanitize redirect path
* Plugins CDN: Removed unused pluginAsset type
* Plugins CDN: Removed system.js changes
* Plugins CDN: Return different system.js baseURL and module for cdn plugins
* Plugins CDN: Ensure CDN is disabled for non-external plugins
* lint
* Plugins CDN: serve images and screenshots from CDN, refactoring
* Lint
* Plugins CDN: Fix URLs for system.js (baseUrl and module)
* Plugins CDN: Add more tests for RelativeURLForSystemJS
* Plugins CDN: Iterate only on apps when preloading
* Plugins CDN: Refactoring
* Plugins CDN: Add comments to url_constructor.go
* Plugins CDN: Update defaultHGPluginsCDNBaseURL
* Plugins CDN: undo extract meta from system js config
* refactor(plugins): migrate systemjs css plugin to typescript
* feat(plugins): introduce systemjs cdn loader plugin
* feat(plugins): add systemjs load type
* Plugins CDN: Removed RelativeURLForSystemJS
* Plugins CDN: Log backend redirect hits along with plugin info
* Plugins CDN: Add pluginsCDNBasePath to getFrontendSettingsMap
* feat(plugins): introduce cdn loading for angular plugins
* refactor(plugins): move systemjs cache buster into systemjsplugins directory
* Plugins CDN: Rename pluginsCDNBasePath to pluginsCDNBaseURL
* refactor(plugins): introduce pluginsCDNBaseURL to the frontend
* Plugins CDN: Renamed "cdn base path" to "cdn url template" in backend
* Plugins CDN: lint
* merge with main
* Instrumentation: Add prometheus counter for backend hits, log from Info to Warn
* Config: Changed key from plugins_cdn.url to plugins.plugins_cdn_base_url
* CDN: Add backend tests
* Lint: goimports
* Default CDN URL to empty string,
* Do not use CDN in setImages and module if the url template is empty
* CDN: Backend: Add test for frontend settings
* CDN: Do not log missing module.js warn if plugin is being loaded from CDN
* CDN: Add backend test for CDN plugin loader
* Removed 'cdn' signature level, switch to 'valid'
* Fix pfs.TestParseTreeTestdata for cdn plugin testdata dir
* Fix TestLoader_Load
* Fix gocyclo complexity of loadPlugins
* Plugins CDN: Moved prometheus metric to api package, removed asset_path label
* Fix missing in config
* Changes after review
* Add pluginscdn.Service
* Fix tests
* Refactoring
* Moved all remaining CDN checks inside pluginscdn.Service
* CDN url constructor: Renamed stringURLFor to stringPath
* CDN: Moved asset URL functionality to assetpath service
* CDN: Renamed HasCDN() to IsEnabled()
* CDN: Replace assert with require
* CDN: Changes after review
* Assetpath: Handle url.Parse error
* Fix plugin_resource_test
* CDN: Change fallback redirect from 302 to 307
* goimports
* Fix tests
* Switch to contextmodel.ReqContext in plugins.go
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-01-27 15:08:17 +01:00
idafurjes
6c5a573772
Chore: Move ReqContext to contexthandler service ( #62102 )
...
* Chore: Move ReqContext to contexthandler service
* Rename package to contextmodel
* Generate ngalert files
* Remove unused imports
2023-01-27 08:50:36 +01:00
Kristin Laemmert
6e9eb0d931
chore: move plugins models into pluginsettings svc ( #61944 )
2023-01-23 13:56:20 -05:00
Will Browne
9aed364898
Plugins: Fix plugin query help markdown ( #60485 )
...
* refactor(pluginhelp): rewrite as functional component with useAsync
* mimic old behaviour
* feat(pluginhelp): display message if backend returned an empty string
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-01-03 14:20:27 +01:00
Will Browne
76233f9997
Plugins: Unexport PluginDir field from PluginDTO ( #59190 )
...
* unexport pluginDir from dto
* more err checks
* tidy
* fix tests
* fix dboard file tests
* fix import
* fix tests
* apply PR feedback
* combine interfaces
* fix logs and clean up test
* filepath clean
* use fs.File
* rm explicit type
2022-12-02 13:46:55 +01:00
Will Browne
09e8cff06e
Plugins: Make "README" the default markdown request param ( #58264 )
...
* Plugins: Make README the default markdown request param
* undo devdboard changes
* fix missing prefix
* rm newline
* re-add space UFFFFF
2022-11-07 11:16:17 +01:00
Andrej Ocenas
0845ac2f53
Profiling: Add Phlare and Parca datasources ( #57809 )
...
* Add phlare datasource
* Rename
* Add parca
* Add self field to parca
* Make sure phlare works with add to dashboard flow
* Add profiling category and hide behind feature flag
* Update description and logos
* Update phlare icon
* Cleanup logging
* Clean up logging
* Fix for shift+enter
* onRunQuery to set label
* Update type naming
* Fix lint
* Fix test and quality issues
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
2022-10-28 13:33:37 +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