grafana/pkg/models
Michael Mandrus c043a8818a
Secrets: add better error handling for secret plugin failures when updating datasources (#50542)
* Add protobuf config and generated code, and client wrapper

* wire up loading of secretsmanager plugin, using renderer plugin as a model

* update kvstore provider to check if we should use the grpc plugin. return false always in OSS

* add OSS remote plugin check

* refactor wire gen file

* log which secrets manager is being used

* Fix argument types for remote checker

* Turns out if err != nil, then the result is always nil. Return empty values if there is an error.

* remove duplicate import

* ensure atomicity by adding secret management as a step to sql operations and rolling back if necessary

* Update pkg/services/secrets/kvstore/kvstore.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update pkg/services/secrets/kvstore/kvstore.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* refactor RemotePluginCheck interface to just return the Plugin client directly

* rename struct to something less silly

* add special error handling for remote secrets management

* switch to errors.as instead of type inference

* remove unnecessary rollback call

* just declare error once

* refactor .proto file according to prior PR suggestions

* re-generate protobuf files and fix compilation errors

* only wrap (ergo display in the front end) errors that are user friendly from the plugin

* rename error type to suggest user friendly only

* rename plugin functions to be more descriptive

* change delete message name

* Revert "change delete message name"

This reverts commit 8ca978301e.

* Revert "rename plugin functions to be more descriptive"

This reverts commit 4355c9b9ff.

* fix pointer to pointer problem

* change plugin user error to just hold a string

* fix sequencing problem with datasource updates

* clean up some return statements

* need to wrap multiple transactions with the InTransaction() func in order to keep the lock

* make linter happy

* revert input var name

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-06-16 12:26:57 -04:00
..
address.go feat(organization): added update org address to http api and to org details settings view, closes #2672 2015-09-08 14:22:44 +02:00
alert_notifications.go API: Extract OpenAPI specification from source code using go-swagger (#40528) 2022-02-08 13:38:43 +01:00
alert_test.go Chore: Rewrite models alert test to standard library (#30021) 2021-01-01 13:18:47 +01:00
alert.go Add missing option "OK" for Error state (#45262) 2022-03-02 19:07:55 -05:00
apikey.go Access control: Pass access control metadata for api keys (#48445) 2022-04-29 15:30:24 +02:00
context_test.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
context.go PublicDashboards: Frontend routing for public dashboards (#48834) 2022-06-02 14:57:55 -06:00
dashboard_acl_test.go Chore: Rewrite models dashboard acl test to standard library (#30022) 2021-01-01 13:22:48 +01:00
dashboard_acl.go Forbid creation of dashboard permissions with both a user and a team (#40104) 2021-10-13 12:16:58 -06:00
dashboard_queries_test.go Start of dashboard query API (#49547) 2022-06-13 15:23:56 -08:00
dashboard_queries.go Start of dashboard query API (#49547) 2022-06-13 15:23:56 -08:00
dashboard_snapshot.go API: Extract OpenAPI specification from source code using go-swagger (#40528) 2022-02-08 13:38:43 +01:00
dashboard_thumbs.go Previews: capability check (#44601) 2022-02-16 21:49:50 +04:00
dashboards_public.go Start of dashboard query API (#49547) 2022-06-13 15:23:56 -08:00
dashboards_test.go Chore: Rewrite models dashboards test to standard library (#30023) 2021-01-01 13:29:40 +01:00
dashboards.go public dashboards: insert default public dashboard config into database on save (#49131) 2022-06-02 18:27:23 -08:00
datasource.go Secrets: add better error handling for secret plugin failures when updating datasources (#50542) 2022-06-16 12:26:57 -04:00
folders.go Access control: use uid for dashboard and folder scopes (#46807) 2022-03-30 15:14:26 +02:00
health.go feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
helpflags.go Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
jwt.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
libraryelements.go LibraryElements: Creates usage stats for panels and variables (#34476) 2021-05-24 06:11:01 +02:00
licensing.go FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382) 2022-01-24 16:08:05 +01:00
live.go Live: proxy subscribe data for subscribe and runstream plugin calls (#42824) 2021-12-14 20:12:00 +03:00
login_attempt.go login: uses epochs for login throtting. 2018-02-16 17:25:46 +01:00
models.go Okta OAuth provider (team sync support) (#22972) 2020-04-02 17:35:48 +03:00
notifications.go Email: Allow configuration of content types for email notifications (#34530) 2021-07-19 13:31:51 +03:00
org_user.go AccessControl: Replace IsEnterprise checks with license checks (#49572) 2022-05-25 20:40:41 +02:00
org.go Chore: Fix staticcheck issues (#28860) 2020-11-05 13:07:06 +01:00
playlist.go backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609) 2022-06-14 15:32:52 -04:00
plugin_settings.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
quotas.go Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) 2021-09-29 16:16:40 +02:00
search_user_filter.go Create search filters by interface (#39843) 2021-10-07 16:06:16 +02:00
search.go Search (SQL): support dashboardUID query parameter (#50121) 2022-06-02 12:56:01 -07:00
shorturl.go ShortURL: Use new Error type (#50859) 2022-06-15 15:11:36 +02:00
star.go Chore: Fix staticcheck issues (#28860) 2020-11-05 13:07:06 +01:00
stats.go Encryption: Add support for multiple data keys per day (#47765) 2022-05-23 13:13:55 +02:00
tags_test.go Chore: Rewrite models tags test to standard library (#30041) 2021-01-05 17:20:41 +01:00
tags.go Create annotations (#8197) 2017-10-07 10:31:39 +02:00
team_member.go AccessControl: Implement SQL filters for team members filtering (#44898) 2022-02-09 17:46:37 +01:00
team.go RBAC: Make RBAC action names more consistent (#49730) 2022-06-02 13:14:48 +01:00
temp_user.go Users: Expire old user invites (#27361) 2020-10-13 12:30:09 +02:00
theme.go Dash previews: populate crawler queue from SQL query (#44083) 2022-02-09 13:23:32 +04:00
user_auth.go LDAP: Use an interface instead of a bus to get group teams (#42165) 2022-02-01 12:03:21 +01:00
user_token.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
user.go Access control: Using RBAC to filter users in list view that you have read access to (#47963) 2022-05-13 09:26:34 +02:00
validations.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00