mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Encryption: Enable envelope encryption by default * Stop relying on feature toggles from settings (deprecated) * Database encryption docs (envelope encryption) * Remove deprecated (and no longer used) FT * Apply suggestions from code review Co-authored-by: Tania <yalyna.ts@gmail.com>
19 lines
518 B
Go
19 lines
518 B
Go
package secretsmigrations
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/cmd/grafana-cli/runner"
|
|
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
|
)
|
|
|
|
func ReEncryptDEKS(_ utils.CommandLine, runner runner.Runner) error {
|
|
if runner.Features.IsEnabled(featuremgmt.FlagDisableEnvelopeEncryption) {
|
|
logger.Warn("Envelope encryption is not enabled, quitting...")
|
|
return nil
|
|
}
|
|
|
|
return runner.SecretsService.ReEncryptDataKeys(context.Background())
|
|
}
|