You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix resetEncryption to remove secrets in 4S (#4683)
* fix(crypto): `resetEncryption` remove secrets in 4S
Remove the cross signing keys and the backup decryption key of the 4S when calling `resetEncryption`
* test(crypto): expect secrets to be deleted in 4S when `resetEncryption` is called
* test(secret storage): add test case when the secret is set at null
* fix(crypto): remove default key in 4S
* test(crypto): default key should be removed from 4S
* Details of the encryption keys to be used must previously have been stored in account data
283
-
* (for example, via {@link ServerSideSecretStorage#addKey}.
283
+
* (for example, via {@link ServerSideSecretStorageImpl#addKey}. {@link SecretStorageCallbacks#getSecretStorageKey} will be called to obtain a secret storage
284
+
* key to decrypt the secret.
285
+
*
286
+
* If the secret is `null`, the secret value in the account data will be set to an empty object.
287
+
* This is considered as "removing" the secret.
284
288
*
285
289
* @param name - The name of the secret - i.e., the "event type" to be stored in the account data
286
290
* @param secret - The secret contents.
287
291
* @param keys - The IDs of the keys to use to encrypt the secret, or null/undefined to use the default key
@@ -504,17 +508,15 @@ export class ServerSideSecretStorageImpl implements ServerSideSecretStorage {
504
508
}
505
509
506
510
/**
507
-
* Store an encrypted secret on the server.
508
-
*
509
-
* Details of the encryption keys to be used must previously have been stored in account data
510
-
* (for example, via {@link ServerSideSecretStorageImpl#addKey}. {@link SecretStorageCallbacks#getSecretStorageKey} will be called to obtain a secret storage
511
-
* key to decrypt the secret.
512
-
*
513
-
* @param name - The name of the secret - i.e., the "event type" to be stored in the account data
514
-
* @param secret - The secret contents.
515
-
* @param keys - The IDs of the keys to use to encrypt the secret, or null/undefined to use the default key.
511
+
* Implementation of {@link ServerSideSecretStorage#store}.
0 commit comments