kms: add a lock, secrets could be modified concurrently for cached users

also reduce the size of the JSON payload omitting empty secrets
This commit is contained in:
Nicola Murino
2021-03-22 19:03:25 +01:00
parent 28f1d66ae5
commit 5e375f56dd
12 changed files with 130 additions and 26 deletions

View File

@@ -1331,7 +1331,6 @@ func TestUserCacheIsolation(t *testing.T) {
if assert.True(t, ok) {
cachedUser := result.(*dataprovider.CachedUser).User
assert.Equal(t, vfs.LocalFilesystemProvider, cachedUser.FsConfig.Provider)
// FIXME: should we really allow to modify the cached users concurrently?????
assert.False(t, cachedUser.FsConfig.S3Config.AccessSecret.IsEncrypted())
}