Skip to content

Commit

Permalink
RavenDB-22265 Audit log on client certificates management operations
Browse files Browse the repository at this point in the history
  • Loading branch information
ml054 authored and ppekrol committed Dec 4, 2024
1 parent 2d5439c commit 644489c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public async Task Generate()
{
var permissions = FormatPermissions(certificate);

LogAuditFor("Certificates", "ADD",
$"Generate certificate {certificate?.Name}. Security Clearance: {certificate?.SecurityClearance}. Permissions: {permissions}. TwoFactor: {string.IsNullOrEmpty(twoFactorAuthenticationKey)}");
LogAuditFor("Certificates", "GENERATE",
$"Certificate {certificate?.Name}. Security Clearance: {certificate?.SecurityClearance}. Permissions: {permissions}. TwoFactor: {string.IsNullOrEmpty(twoFactorAuthenticationKey)}");
}

byte[] certs = null;
Expand Down Expand Up @@ -776,7 +776,7 @@ public async Task Edit()
var permissions = FormatPermissions(newCertificate);

LogAuditFor("Certificates", "CHANGE",
$"Edit certificate {newCertificate?.Name}. Security Clearance: {newCertificate?.SecurityClearance}. Permissions: {permissions}. TwoFactor: {string.IsNullOrEmpty(twoFactorAuthenticationKey)}");
$"Certificate {newCertificate?.Name}. Security Clearance: {newCertificate?.SecurityClearance}. Permissions: {permissions}. TwoFactor: {string.IsNullOrEmpty(twoFactorAuthenticationKey)}");
}

var cmd = new PutCertificateCommand(newCertificate.Thumbprint,
Expand Down Expand Up @@ -1003,7 +1003,7 @@ public async Task ForceRenew()

if (LoggingSource.AuditLog.IsInfoEnabled)
{
LogAuditFor("Certificates", "RENEW", "Renew server certificate");
LogAuditFor("Certificates", "RENEW", "Server certificate");
}

try
Expand Down

0 comments on commit 644489c

Please sign in to comment.