* Encryption: Add support for data keys re-encryption
* Add tests for data keys re-encryption
* Update code after refactorings
Co-authored-by: Leonard Gram <leo@xlson.com>
(cherry picked from commit b2655750e8)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
This commit is contained in:
co-authored by
Joan López de la Franca Beltran
parent
71a0ae7931
commit
a7ad5ee55f
@@ -24,6 +24,8 @@ type Service interface {
|
||||
DecryptJsonData(ctx context.Context, sjd map[string][]byte) (map[string]string, error)
|
||||
|
||||
GetDecryptedValue(ctx context.Context, sjd map[string][]byte, key, fallback string) string
|
||||
|
||||
ReEncryptDataKeys(ctx context.Context) error
|
||||
}
|
||||
|
||||
// Store defines methods to interact with secrets storage
|
||||
@@ -33,6 +35,7 @@ type Store interface {
|
||||
CreateDataKey(ctx context.Context, dataKey DataKey) error
|
||||
CreateDataKeyWithDBSession(ctx context.Context, dataKey DataKey, sess *xorm.Session) error
|
||||
DeleteDataKey(ctx context.Context, name string) error
|
||||
ReEncryptDataKeys(ctx context.Context, providers map[ProviderID]Provider, currProvider ProviderID) error
|
||||
}
|
||||
|
||||
// Provider is a key encryption key provider for envelope encryption
|
||||
|
||||
Reference in New Issue
Block a user