Chore: Refactor securedata to remove global encryption calls from dashboard snapshots (#38714)
* Add encryption service * Add tests for encryption service * Inject encryption service into http server * Replace encryption global function usage in login tests * Migrate to Wire * Move Encryption bindings to OSS Wire set * Chore: Refactor securedata to remove global encryption calls from dashboard snapshots * Fix dashboard snapshot tests * Remove no longer user test * Add dashboard snapshots service tests * Refactor service initialization * Set up dashboard snapshots service as a background service Co-authored-by: Tania B <yalyna.ts@gmail.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Tania B
Emil Tullstedt
parent
a4e253bcf9
commit
6cfb640a0b
@@ -1,16 +0,0 @@
|
||||
package securedata
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
type SecureData []byte
|
||||
|
||||
func Encrypt(data []byte) (SecureData, error) {
|
||||
return util.Encrypt(data, setting.SecretKey)
|
||||
}
|
||||
|
||||
func (s SecureData) Decrypt() ([]byte, error) {
|
||||
return util.Decrypt(s, setting.SecretKey)
|
||||
}
|
||||
Reference in New Issue
Block a user