Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Improve delete cert message
Carlos Monastyrski38c6352c9df4
diff --git a/backend/src/services/certificate-authority/certificate-issuance-queue.ts b/backend/src/services/certificate-authority/certificate-issuance-queue.tsindex 39b31f6b65..4bc446435b 100644--- a/backend/src/services/certificate-authority/certificate-issuance-queue.ts+++ b/backend/src/services/certificate-authority/certificate-issuance-queue.ts@@ -451,7 +451,7 @@ export const certificateIssuanceQueueFactory = ({}if (isRenewal && originalCertificateId && attemptsMade === 0) {- const originalCertificate = await certificateDAL.findById(originalCertificateId);+ const originalCertificate = await certificateDAL.findById(originalCertificateId, certificateDAL.primaryNode());if (originalCertificate) assertCertificateNotDeleted(originalCertificate);}diff --git a/docs/documentation/platform/pki/concepts/certificate-lifecycle.mdx b/docs/documentation/platform/pki/concepts/certificate-lifecycle.mdxindex 98d8534233..929b3ef31a 100644--- a/docs/documentation/platform/pki/concepts/certificate-lifecycle.mdx+++ b/docs/documentation/platform/pki/concepts/certificate-lifecycle.mdx@@ -43,6 +43,10 @@ Invalidate a certificate when it's compromised, misconfigured, or no longer need## Retirement-Deleting a certificate removes the certificate and its private key, and its details stay in the inventory as **Deleted**. A deleted certificate can't be renewed. Deleting doesn't revoke it, but you can still revoke it afterward if its certificate authority supports revocation. The exception is a certificate imported into a profile with an internal certificate authority, which you must revoke before deleting it. A deleted certificate issued from a certificate authority keeps counting toward your certificate quota until it expires or is revoked. Deleted imported and discovered certificates stop counting right away. Certificate Cleanup permanently removes expired certificates.+Deleting a certificate removes the certificate and its private key, and its details stay in the inventory as **Deleted**. A deleted certificate can't be renewed.++- **Revocation:** deleting doesn't revoke a certificate. You can still revoke it afterward if its certificate authority supports revocation. The exception is a certificate imported into a profile with an internal certificate authority, which you must revoke before deleting it.+- **Quota:** a deleted certificate issued from a certificate authority keeps counting toward your certificate quota until it expires or is revoked. Deleted imported and discovered certificates stop counting right away.+- **Cleanup:** Certificate Cleanup permanently removes expired certificates, including deleted ones.[Learn more about Certificate Cleanup →](/documentation/platform/pki/settings/certificate-cleanup)diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.test.ts b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.test.tsindex 0acec5d4dc..2bef43771a 100644--- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.test.ts+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.test.ts@@ -92,7 +92,7 @@ describe("getCertificateDeletionWarning", () => {notAfter: past,hasPrivateKey: false})- ).toBe("This removes the certificate.");+ ).toBe("This removes the certificate. This cannot be undone.");});it("says nothing about trust for a revoked or expired certificate", () => {diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.ts b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.tsindex 005f69dcde..aa9d81740e 100644--- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.ts+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.utils.ts@@ -123,7 +123,7 @@ export const getCertificateDeletionWarning = (? "This removes the certificate.": "This removes the certificate and its private key.";- return `${removed}${getCertificateTrustWarning(certificate, canRevoke, isRevocableAfterDeletion)}${getCertificateSyncRemovalWarning(holdingSyncs)}`;+ return `${removed}${getCertificateTrustWarning(certificate, canRevoke, isRevocableAfterDeletion)}${getCertificateSyncRemovalWarning(holdingSyncs)} This cannot be undone.`;};export const isExpiringWithinOneDay = (notAfter: string): boolean => {