Encryption: Fix multiple data keys migration (#49848)
* Add migration * Migrator: Extend support to rename columns * Fix getting current key * Fix column name in migration * Fix deks reencryption * Fix caching * Add back separate caches for byName and byPrefix * Do not concatenate prefix with uid * Rename DataKey struc fields * SQLStore: Add deprecation comments for breaking migrations * Add comment * Minor corrections Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
This commit is contained in:
co-authored by
Joan López de la Franca Beltran
parent
8de4ffe61f
commit
4f8111e24e
@@ -24,9 +24,9 @@ func (f FakeSecretsStore) GetDataKey(_ context.Context, id string) (*secrets.Dat
|
||||
return key, nil
|
||||
}
|
||||
|
||||
func (f FakeSecretsStore) GetCurrentDataKey(_ context.Context, name string) (*secrets.DataKey, error) {
|
||||
func (f FakeSecretsStore) GetCurrentDataKey(_ context.Context, label string) (*secrets.DataKey, error) {
|
||||
for _, key := range f.store {
|
||||
if key.Name == name && key.Active {
|
||||
if key.Label == label && key.Active {
|
||||
return key, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user