Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(pki): add status to automated renew audit event

bernie-g2cad6bbfd146
diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.ts
index 32e3888dd2..7c242004e6 100644
--- a/backend/src/ee/services/audit-log/audit-log-types.ts
+++ b/backend/src/ee/services/audit-log/audit-log-types.ts
@@ -3431,8 +3431,9 @@ interface AutomatedRenewCertificate {
newCertificateId?: string;
commonName: string;
profileId: string;
- renewBeforeDays?: number;
+ renewBeforeDays: string;
profileName: string;
+ status: CertificateRequestStatus;
serialNumber?: string;
};
}
@@ -3443,7 +3444,7 @@ interface AutomatedRenewCertificateFailed {
certificateId: string;
commonName: string;
profileId: string;
- renewBeforeDays?: number;
+ renewBeforeDays: string;
profileName: string;
error: string;
};
diff --git a/backend/src/services/certificate-v3/certificate-v3-queue.ts b/backend/src/services/certificate-v3/certificate-v3-queue.ts
index 122d06fd94..ba9efc29c4 100644
--- a/backend/src/services/certificate-v3/certificate-v3-queue.ts
+++ b/backend/src/services/certificate-v3/certificate-v3-queue.ts
@@ -94,8 +94,9 @@ export const certificateV3QueueServiceFactory = ({
newCertificateId: renewed.certificateId,
commonName: certificate.commonName || "",
profileId: certificate.profileId!,
- renewBeforeDays: certificate.renewBeforeDays ?? undefined,
+ renewBeforeDays: certificate.renewBeforeDays?.toString() || "",
profileName: certificate.profileName || "",
+ status: renewed.status,
serialNumber: renewed.serialNumber
}
}
@@ -115,7 +116,7 @@ export const certificateV3QueueServiceFactory = ({
certificateId: certificate.id,
commonName: certificate.commonName || "",
profileId: certificate.profileId || "",
- renewBeforeDays: certificate.renewBeforeDays ?? undefined,
+ renewBeforeDays: certificate.renewBeforeDays?.toString() || "",
profileName: certificate.profileName || "",
error: errorMessage
}
diff --git a/frontend/src/hooks/api/auditLogs/types.tsx b/frontend/src/hooks/api/auditLogs/types.tsx
index 2798bc3393..b18b884d05 100644
--- a/frontend/src/hooks/api/auditLogs/types.tsx
+++ b/frontend/src/hooks/api/auditLogs/types.tsx
@@ -1,4 +1,5 @@
import { CaStatus } from "../ca";
+import { CrlReason } from "../certificates/enums";
import { IdentityTrustedIp } from "../identities/types";
import { PkiItemType } from "../pkiCollections/constants";
import { WorkflowIntegration } from "../workflowIntegrations/types";
@@ -705,6 +706,7 @@ interface RevokeCert {
certId: string;
cn: string;
serialNumber: string;
+ revocationReason?: CrlReason;
};
}