mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-17 12:59:25 +00:00
Add SRP password recovery and E2EE reset
Add proof-based password registration, login, enrollment, and change flows, with rate limiting and encrypted recovery-key envelopes. Support explicit E2EE identity resets while preserving historical signer verification, and document and test the new recovery workflows.
This commit is contained in:
@@ -15,6 +15,7 @@ public class GovorDbContext(DbContextOptions<GovorDbContext> options) : DbContex
|
||||
public virtual DbSet<UserPushToken> UserPushTokens { get; set; }
|
||||
public virtual DbSet<UserCryptoSession> UserCryptoSessions { get; set; }
|
||||
public virtual DbSet<E2eeRecoveryVault> E2eeRecoveryVaults { get; set; }
|
||||
public DbSet<E2eeIdentityChange> E2eeIdentityChanges { get; set; }
|
||||
public virtual DbSet<SignedPreKey> SignedPreKeys { get; set; }
|
||||
public virtual DbSet<OneTimePreKey> OneTimePreKeys { get; set; }
|
||||
public virtual DbSet<Friendship> Friendships { get; set; }
|
||||
@@ -42,6 +43,14 @@ public class GovorDbContext(DbContextOptions<GovorDbContext> options) : DbContex
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<E2eeIdentityChange>(b =>
|
||||
{
|
||||
b.HasKey(c => new { c.UserId, c.Epoch });
|
||||
b.Property(c => c.PreviousIdentityKey).HasMaxLength(200);
|
||||
b.Property(c => c.IdentityKey).HasMaxLength(200);
|
||||
b.Property(c => c.PreviousDeviceKeyJson).HasMaxLength(10000);
|
||||
b.HasOne<User>().WithMany().HasForeignKey(c => c.UserId).OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
modelBuilder.ApplyConfiguration(new E2eeRecoveryVaultConfiguration());
|
||||
modelBuilder.ApplyConfiguration(new UserSessionConfiguration());
|
||||
modelBuilder.ApplyConfiguration(new FriendshipConfiguration());
|
||||
|
||||
Reference in New Issue
Block a user