grafana/pkg/services
Guilherme Caulada 2d8a91a846
Secrets: Improve unified secrets migration and implement compatibility flag (#50463)
* Implement disableSecretsCompatibility flag

* Allow secret deletion right after migration

* Use dialect.Quote for secure_json_data on secret deletion

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Set secure_json_data to NULL instead of empty json

* Run toggles_gen_test and use generated flag variable

* Add ID to delete data source secrets command on function call

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Remove extra query to get datasource on secret deletion

* Fix linting issues with CHANGELOG.md

* Use empty json string when deleting secure json data

* Implement secret migration as a background process

* Refactor secret migration as a background service

* Refactor migration to be inside secret store

* Re-add secret deletion function removed on merge

* Try using transaction to fix db lock during tests

* Disable migration for pipeline debugging

* Try adding sleep to fix database lock

* Remove unecessary time sleep from migration

* Fix merge issue, replace models with datasources

* Try event listener approach

* Fix merge issue, replace models with datasources

* Fix linting issues with unchecked error

* Remove unecessary trainling new line

* Increase wait interval on background secret migration

* Rename secret store migration folder for consistency

* Convert background migration to blocking

* Fix number of arguments on server tests

* Check error value of secret migration provider

* Fix linting issue with method varaible

* Revert unintended change on background services

* Move secret migration service provider to wire.go

* Remove unecessary else from datasource service

* Move transaction inside loop on secret migration

* Remove unecessary GetServices function

* Remove unecessary interface after method removal

* Rename Run to Migrate on secret migration interface

* Rename secret migrations service variable on server

* Use MustBool on datasource secret migration

* Revert changes to GetDataSources

* Implement GetAllDataSources function

* Remove DeleteDataSourceSecrets function

* Move datasource secret migration to datasource service

* Remove unecessary properties from datasource secret migration

* Make DecryptLegacySecrets a private method

* Remove context canceled check on secret migrator

* Log error when fail to unmarshal datasource secret

* Add necessary fields to update command on migration

* Handle high availability on secret migration

* Use kvstore for datasource secret migration status

* Add error check for migration status set on kvstore

* Remove NewSecretMigrationService from server tests

* Use const for strings on datasource secrets migration

* Test all cases for datasources secret migrations

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-12 17:27:37 -03:00
..
accesscontrol Service Accounts: Managed permissions for service accounts (#51818) 2022-07-08 05:53:18 -04:00
alerting Renderer: Add sanitize API (#50936) 2022-07-07 15:32:18 +04:00
annotations Chore : Replace dashboardid with dashboardUID in annotation API (#48481) 2022-05-02 11:35:36 +02:00
auth Split Create User (#50502) 2022-06-28 14:32:25 +02:00
cleanup backend/dashboardsnapshot service: move models (#50898) 2022-06-17 09:09:01 -04:00
comments backend/services: Move GetDashboard from sqlstore to dashboard service (#48971) 2022-05-17 14:52:22 -04:00
contexthandler Rendering: Fix user information when using render key (#50879) 2022-07-07 17:01:49 +02:00
dashboardimport Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
dashboards public dashboards: move into into its own service (#51358) 2022-07-06 17:51:44 -06:00
dashboardsnapshots chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
dashboardversion chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
datasourceproxy backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
datasources Secrets: Improve unified secrets migration and implement compatibility flag (#50463) 2022-07-12 17:27:37 -03:00
encryption Encryption: Add support for decrypting ciphertexts with algorithm metadata (#49312) 2022-05-20 17:11:51 +02:00
export Export: include alerts, thumbnails, usage stats, and short urls (#51938) 2022-07-11 16:25:40 -07:00
featuremgmt Secrets: Improve unified secrets migration and implement compatibility flag (#50463) 2022-07-12 17:27:37 -03:00
guardian RBAC: Refactor GetUserPermissions to use []accesscontrol.Permission (#50683) 2022-06-14 10:17:48 +02:00
hooks Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
kmsproviders Encryption: Refactor secrets.Service initialization (#51091) 2022-07-07 09:48:25 +02:00
ldap LDAP: Improve errors and documentation (#52111) 2022-07-12 11:11:09 -04:00
libraryelements chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
librarypanels Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
licensing RBAC: Make RBAC action names more consistent (#49730) 2022-06-02 13:14:48 +01:00
live sync routing tree with latest changes in Gin (#51541) 2022-06-29 19:05:57 +03:00
login Chore: Remove the old log format (#51526) 2022-07-08 09:56:30 -05:00
multildap Split Create User (#50502) 2022-06-28 14:32:25 +02:00
ngalert Alerting: refactor scheduler and separate notification logic (#48144) 2022-07-12 15:13:04 -04:00
notifications Split Create User (#50502) 2022-06-28 14:32:25 +02:00
oauthtoken backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
org Split Create User (#50502) 2022-06-28 14:32:25 +02:00
plugindashboards Chore: Make test tracer noop and return no errors (#50797) 2022-06-15 12:40:41 +02:00
pluginsettings Plugins: Add plugin settings DTO (#46283) 2022-03-18 20:49:13 +01:00
preference I18n: Add default locale server config option (#51035) 2022-06-21 11:12:49 +01:00
provisioning chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
publicdashboards public dashboards: move into into its own service (#51358) 2022-07-06 17:51:44 -06:00
query backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
queryhistory Split Create User (#50502) 2022-06-28 14:32:25 +02:00
quota Update quota service to accept context (#45186) 2022-02-10 22:17:50 +01:00
rendering Renderer: Add sanitize API (#50936) 2022-07-07 15:32:18 +04:00
screenshot Alerting: Better metrics and renamed BrowserScreenshotService (#51564) 2022-06-30 17:47:23 +01:00
search Search (SQL): support dashboardUID query parameter (#50121) 2022-06-02 12:56:01 -07:00
searchusers 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
searchV2 Search: pass the 'explain' flag from the UI and debug paging issues (#51847) 2022-07-08 15:28:21 -04:00
secrets Secrets: Improve unified secrets migration and implement compatibility flag (#50463) 2022-07-12 17:27:37 -03:00
serviceaccounts Service Accounts: Managed permissions for service accounts (#51818) 2022-07-08 05:53:18 -04:00
shorturls ShortURL: Use new Error type (#50859) 2022-06-15 15:11:36 +02:00
sqlstore Secrets: Improve unified secrets migration and implement compatibility flag (#50463) 2022-07-12 17:27:37 -03:00
star Chore: Exclude integration tests from running on test-backend step (#50359) 2022-06-10 11:46:21 -04:00
store Storage: Optionally overwrite existing files (#52067) 2022-07-12 09:13:57 -05:00
teamguardian Chore: Make test tracer noop and return no errors (#50797) 2022-06-15 12:40:41 +02:00
thumbs chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
updatechecker Logging: Unify logging fakes (#48822) 2022-05-06 17:44:22 +02:00
user Split Create User (#50502) 2022-06-28 14:32:25 +02:00
validations Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00