Encrypt realm data with dek which is encrypted with kek. The signing keys are also encrypted with the kek.
This commit is contained in:
parent
644b005f2a
commit
650fe99990
36 changed files with 399 additions and 129 deletions
|
|
@ -125,7 +125,7 @@ public class RealmApisTests : IClassFixture<ApplicationFactory>
|
|||
public async Task GetJwks()
|
||||
{
|
||||
// setup
|
||||
IEncryptionService encryptionService = _factory.Services.GetRequiredService<IEncryptionService>();
|
||||
IDekEncryptionService dekEncryptionService = _factory.Services.GetRequiredService<IDekEncryptionService>();
|
||||
|
||||
using var rsa = RSA.Create(2048);
|
||||
RSAParameters parameters = rsa.ExportParameters(includePrivateParameters: false);
|
||||
|
|
@ -134,7 +134,7 @@ public class RealmApisTests : IClassFixture<ApplicationFactory>
|
|||
{
|
||||
Id = Guid.NewGuid(),
|
||||
KeyType = "RSA",
|
||||
Key = encryptionService.Encrypt(rsa.ExportPkcs8PrivateKey()),
|
||||
Key = dekEncryptionService.Encrypt(rsa.ExportPkcs8PrivateKey()),
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue