grafana/pkg/services/alerting
Joan López de la Franca Beltran 722c414fef
Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865)
* Encryption: Add support to encrypt/decrypt sjd

* Add datasources.Service as a proxy to datasources db operations

* Encrypt ds.SecureJsonData before calling SQLStore

* Move ds cache code into ds service

* Fix tlsmanager tests

* Fix pluginproxy tests

* Remove some securejsondata.GetEncryptedJsonData usages

* Add pluginsettings.Service as a proxy for plugin settings db operations

* Add AlertNotificationService as a proxy for alert notification db operations

* Remove some securejsondata.GetEncryptedJsonData usages

* Remove more securejsondata.GetEncryptedJsonData usages

* Fix lint errors

* Minor fixes

* Remove encryption global functions usages from ngalert

* Fix lint errors

* Minor fixes

* Minor fixes

* Remove securejsondata.DecryptedValue usage

* Refactor the refactor

* Remove securejsondata.DecryptedValue usage

* Move securejsondata to migrations package

* Move securejsondata to migrations package

* Minor fix

* Fix integration test

* Fix integration tests

* Undo undesired changes

* Fix tests

* Add context.Context into encryption methods

* Fix tests

* Fix tests

* Fix tests

* Trigger CI

* Fix test

* Add names to params of encryption service interface

* Remove bus from CacheServiceImpl

* Add logging

* Add keys to logger

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Add missing key to logger

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Undo changes in markdown files

* Fix formatting

* Add context to secrets service

* Rename decryptSecureJsonData to decryptSecureJsonDataFn

* Name args in GetDecryptedValueFn

* Add template back to NewAlertmanagerNotifier

* Copy GetDecryptedValueFn to ngalert

* Add logging to pluginsettings

* Fix pluginsettings test

Co-authored-by: Tania B <yalyna.ts@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-10-07 17:33:50 +03:00
..
conditions Alerting: Skip query cache for alert queries (#39010) 2021-09-09 16:16:05 +02:00
notifiers Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
testdata Alerting: improve alerting default datasource search when extracting alerts (#29993) 2021-01-07 21:33:17 +01:00
alerting_usage_test.go Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
alerting_usage.go API: Add by UID routes for data sources (#29884) 2021-01-13 13:16:27 -05:00
engine_integration_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
engine_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
engine.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
eval_context_test.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00
eval_context.go Chore: Use context.Context for the get home dashboard API endpoint (#36735) 2021-07-16 12:40:03 +02:00
eval_handler_test.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
eval_handler.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
extractor_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
extractor.go Chore: Improve save dashboard error messages (#35780) 2021-06-16 14:56:55 +02:00
interfaces.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
models.go Chore: Fix various spelling errors in back-end code (#25241) 2020-06-01 17:11:25 +02:00
notifier_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
notifier.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
reader.go Alerting: Log alert warnings for obsolete notifiers when extracting alerts and remove spammy error (#28162) 2020-10-22 14:43:12 +03:00
result_handler.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
rule_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
rule.go Alerting: Add checks for non supported units - disable defaulting to seconds (#32477) 2021-04-12 15:53:51 +03:00
scheduler.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
service_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
service.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
test_notification.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
test_rule.go Introduce TSDB service (#31520) 2021-03-08 07:02:49 +01:00
ticker_test.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
ticker.go AlertingNG: Create a scheduler to evaluate alert definitions (#29305) 2020-12-17 16:00:09 +02:00