diff --git a/src/Core/KeyManagement/Commands/Interfaces/ISetAccountKeysForUserCommand.cs b/src/Core/KeyManagement/Commands/Interfaces/ISetAccountKeysForUserCommand.cs index 7346152248..f1bdfa24d0 100644 --- a/src/Core/KeyManagement/Commands/Interfaces/ISetAccountKeysForUserCommand.cs +++ b/src/Core/KeyManagement/Commands/Interfaces/ISetAccountKeysForUserCommand.cs @@ -2,6 +2,10 @@ namespace Bit.Core.KeyManagement.Commands.Interfaces; +/// +/// Command to set account keys for a new user that does not have keys yet. +/// This is intended for the TDE and Key-connector account registration flows. +/// public interface ISetAccountKeysForUserCommand { Task SetAccountKeysForUserAsync(Guid userId, diff --git a/src/Core/KeyManagement/Commands/SetAccountKeysForUserCommand.cs b/src/Core/KeyManagement/Commands/SetAccountKeysForUserCommand.cs index b47f60809b..01cf7c8552 100644 --- a/src/Core/KeyManagement/Commands/SetAccountKeysForUserCommand.cs +++ b/src/Core/KeyManagement/Commands/SetAccountKeysForUserCommand.cs @@ -39,7 +39,7 @@ public class SetAccountKeysForUserCommand : ISetAccountKeysForUserCommand user.SignedPublicKey = accountKeysData.PublicKeyEncryptionKeyPairData.SignedPublicKey; user.SecurityState = accountKeysData.SecurityStateData.SecurityState; user.SecurityVersion = accountKeysData.SecurityStateData.SecurityVersion; - await _userSignatureKeyPairRepository.UpsertAsync(new UserSignatureKeyPair + await _userSignatureKeyPairRepository.CreateAsync(new UserSignatureKeyPair { Id = CoreHelpers.GenerateComb(), UserId = userId,