mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +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,8 @@ public class E2eeRecoveryVaultConfiguration : IEntityTypeConfiguration<E2eeRecov
|
||||
b.Property(v => v.IdentityKey).HasMaxLength(200);
|
||||
b.Property(v => v.Signature).HasMaxLength(100);
|
||||
b.Property(v => v.Ciphertext).HasMaxLength(4_000_000);
|
||||
b.Property(v => v.PasswordCiphertext).HasMaxLength(4096);
|
||||
b.Property(v => v.PasswordSignature).HasMaxLength(100);
|
||||
b.HasOne<User>().WithOne().HasForeignKey<E2eeRecoveryVault>(v => v.UserId).OnDelete(DeleteBehavior.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ public class UserConfiguration : IEntityTypeConfiguration<User>
|
||||
public void Configure(EntityTypeBuilder<User> builder)
|
||||
{
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.Property(u => u.SrpSalt).HasMaxLength(64);
|
||||
builder.Property(u => u.SrpIdentity).HasMaxLength(64);
|
||||
builder.Property(u => u.SrpVerifier).HasMaxLength(1024);
|
||||
builder.Property(u => u.CredentialVersion).IsConcurrencyToken();
|
||||
|
||||
builder.HasIndex(u => u.Username).IsUnique();
|
||||
builder.HasIndex(u => u.CreatedOn);
|
||||
@@ -32,4 +36,4 @@ public class UserConfiguration : IEntityTypeConfiguration<User>
|
||||
.IsRequired()
|
||||
.HasMaxLength(128);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user