Skip to content

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

Add docs for certificate revocation

Tuan Dang31de0755a2e0
diff --git a/docs/documentation/platform/pki/certificates.mdx b/docs/documentation/platform/pki/certificates.mdx
index 12fa7c4814..83759762f9 100644
--- a/docs/documentation/platform/pki/certificates.mdx
+++ b/docs/documentation/platform/pki/certificates.mdx
@@ -6,7 +6,7 @@ description: "Learn how to issue X.509 certificates with Infisical."
## Concept
-Assuming that you've created a Private CA hierarchy with a root CA and an intermediate CA, you can now issue X.509 certificates using the intermediate CA.
+Assuming that you've created a Private CA hierarchy with a root CA and an intermediate CA, you can now issue/revoke X.509 certificates using the intermediate CA.
<div align="center">
@@ -23,17 +23,19 @@ graph TD
## Workflow
-The typical workflow for issuing certificates consists of the following steps:
+The typical workflow for managing certificates consists of the following steps:
1. Issuing a certificate under an intermediate CA with details like name and validity period.
-2. Managing certificate lifecycle events such as certificate renewal, revocation, and reissuance.
+2. Managing certificate lifecycle events such as certificate renewal and revocation. As part of the certificate revocation flow,
+ you can also query for a Certificate Revocation List [CRL](https://en.wikipedia.org/wiki/Certificate_revocation_list), a time-stamped, signed
+ data structure issued by a CA containing a list of revoked certificates to check if a certificate has been revoked.
<Note>
Note that this workflow can be executed via the Infisical UI or manually such
as via API.
</Note>
-## Guide
+## Guide to Issuing Certificates
In the following steps, we explore how to issue a X.509 certificate under a CA using the Infisical UI.
@@ -67,6 +69,40 @@ In the following steps, we explore how to issue a X.509 certificate under a CA u
</Step>
</Steps>
+## Guide to Revoking Certificates
+
+In the following steps, we explore how to revoke a X.509 certificate under a CA and obtain a Certificate Revocation List (CRL) for a CA using the Infisical UI.
+
+<Steps>
+ <Step title="Revoking a Certificate">
+ Assuming that you've issued a certificate under a CA, you can revoke it by
+ selecting the **Revoke Certificate** option for it and specifying the reason
+ for revocation. Image 1 Image 2
+
+ ![pki revoke certificate](/images/platform/pki/cert-revoke.png)
+
+ ![pki revoke certificate modal](/images/platform/pki/cert-revoke-modal.png)
+
+ </Step>
+ <Step title="Obtaining a CRL">
+ In order to check the revocation status of a certificate, you can check it
+ against the CRL of a CA by selecting the **View CRL** option under the
+ issuing CA and downloading the CRL file.
+
+ ![pki view crl](/images/platform/pki/ca-crl.png)
+
+ ![pki download crl](/images/platform/pki/ca-crl-modal.png)
+
+ To verify a certificate against the
+ downloaded CRL with OpenSSL, you can use the following command:
+
+```bash
+openssl verify -crl_check -CAfile chain.pem -CRLfile crl.pem certificate.pem
+```
+
+ </Step>
+</Steps>
+
## FAQ
<AccordionGroup>
diff --git a/docs/images/platform/pki/ca-crl-modal.png b/docs/images/platform/pki/ca-crl-modal.png
new file mode 100644
index 0000000000..af26b1acaf
Binary files /dev/null and b/docs/images/platform/pki/ca-crl-modal.png differ
diff --git a/docs/images/platform/pki/ca-crl.png b/docs/images/platform/pki/ca-crl.png
new file mode 100644
index 0000000000..4794034a13
Binary files /dev/null and b/docs/images/platform/pki/ca-crl.png differ
diff --git a/docs/images/platform/pki/cert-revoke-modal.png b/docs/images/platform/pki/cert-revoke-modal.png
new file mode 100644
index 0000000000..07bc7fce86
Binary files /dev/null and b/docs/images/platform/pki/cert-revoke-modal.png differ
diff --git a/docs/images/platform/pki/cert-revoke.png b/docs/images/platform/pki/cert-revoke.png
new file mode 100644
index 0000000000..ff7fcc5978
Binary files /dev/null and b/docs/images/platform/pki/cert-revoke.png differ
diff --git a/frontend/src/views/Project/CertificatesPage/components/CaTab/components/CaTable.tsx b/frontend/src/views/Project/CertificatesPage/components/CaTab/components/CaTable.tsx
index d0b3066f8b..b91671dbd3 100644
--- a/frontend/src/views/Project/CertificatesPage/components/CaTab/components/CaTable.tsx
+++ b/frontend/src/views/Project/CertificatesPage/components/CaTab/components/CaTable.tsx
@@ -133,27 +133,30 @@ export const CaTable = ({ handlePopUpOpen }: Props) => {
)}
</ProjectPermissionCan>
)}
- <ProjectPermissionCan
- I={ProjectPermissionActions.Read}
- a={ProjectPermissionSub.CertificateAuthorities}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed && "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={async () =>
- handlePopUpOpen("caCrl", {
- caId: ca.id
- })
- }
- disabled={!isAllowed}
- icon={<FontAwesomeIcon icon={faFile} />}
- >
- View CRL
- </DropdownMenuItem>
- )}
- </ProjectPermissionCan>
+ {ca.status !== CaStatus.PENDING_CERTIFICATE && (
+ <ProjectPermissionCan
+ I={ProjectPermissionActions.Read}
+ a={ProjectPermissionSub.CertificateAuthorities}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ className={twMerge(
+ !isAllowed &&
+ "pointer-events-none cursor-not-allowed opacity-50"
+ )}
+ onClick={async () =>
+ handlePopUpOpen("caCrl", {
+ caId: ca.id
+ })
+ }
+ disabled={!isAllowed}
+ icon={<FontAwesomeIcon icon={faFile} />}
+ >
+ View CRL
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ )}
<ProjectPermissionCan
I={ProjectPermissionActions.Read}
a={ProjectPermissionSub.CertificateAuthorities}