diff --git a/backend/src/ee/services/certificate-authority-crl/certificate-authority-crl-service.ts b/backend/src/ee/services/certificate-authority-crl/certificate-authority-crl-service.ts index 11825722a..e518dffed 100644 --- a/backend/src/ee/services/certificate-authority-crl/certificate-authority-crl-service.ts +++ b/backend/src/ee/services/certificate-authority-crl/certificate-authority-crl-service.ts @@ -2,7 +2,7 @@ import { ForbiddenError } from "@casl/ability"; import * as x509 from "@peculiar/x509"; import { TCertificateAuthorityCrlDALFactory } from "@app/ee/services/certificate-authority-crl/certificate-authority-crl-dal"; -import { TLicenseServiceFactory } from "@app/ee/services/license/license-service"; +// import { TLicenseServiceFactory } from "@app/ee/services/license/license-service"; import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/ee/services/permission/project-permission"; import { BadRequestError, NotFoundError } from "@app/lib/errors"; @@ -19,7 +19,7 @@ type TCertificateAuthorityCrlServiceFactoryDep = { projectDAL: Pick; kmsService: Pick; permissionService: Pick; - licenseService: Pick; + // licenseService: Pick; }; export type TCertificateAuthorityCrlServiceFactory = ReturnType; @@ -29,8 +29,7 @@ export const certificateAuthorityCrlServiceFactory = ({ certificateAuthorityCrlDAL, projectDAL, kmsService, - permissionService, - licenseService + permissionService // licenseService }: TCertificateAuthorityCrlServiceFactoryDep) => { /** * Return CRL with id [crlId] @@ -85,12 +84,12 @@ export const certificateAuthorityCrlServiceFactory = ({ ProjectPermissionSub.CertificateAuthorities ); - const plan = await licenseService.getPlan(actorOrgId); - if (!plan.caCrl) - throw new BadRequestError({ - message: - "Failed to get CA certificate revocation lists (CRLs) due to plan restriction. Upgrade plan to get the CA CRL." - }); + // const plan = await licenseService.getPlan(actorOrgId); + // if (!plan.caCrl) + // throw new BadRequestError({ + // message: + // "Failed to get CA certificate revocation lists (CRLs) due to plan restriction. Upgrade plan to get the CA CRL." + // }); const caCrls = await certificateAuthorityCrlDAL.find({ caId: ca.id }, { sort: [["createdAt", "desc"]] }); diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts index 2454e92cb..363688ac2 100644 --- a/backend/src/server/routes/index.ts +++ b/backend/src/server/routes/index.ts @@ -646,8 +646,8 @@ export const registerRoutes = async ( certificateAuthorityCrlDAL, projectDAL, kmsService, - permissionService, - licenseService + permissionService + // licenseService }); const certificateTemplateService = certificateTemplateServiceFactory({ diff --git a/docs/documentation/platform/pki/certificates.mdx b/docs/documentation/platform/pki/certificates.mdx index ab6f4df59..43026cc73 100644 --- a/docs/documentation/platform/pki/certificates.mdx +++ b/docs/documentation/platform/pki/certificates.mdx @@ -151,18 +151,24 @@ In the following steps, we explore how to revoke a X.509 certificate under a CA 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. + against the CRL of a CA by heading to its Issuing CA and downloading the CRL. ![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 cert.pem +``` + +Note that you can also obtain the CRL from the certificate itself by +referencing the CRL distribution point extension on the certificate itself. + +To check a certificate against the CRL distribution point specified within it with OpenSSL, you can use the following command: + +```bash +openssl verify -verbose -crl_check -crl_download -CAfile chain.pem cert.pem ``` diff --git a/docs/images/platform/pki/ca-crl-modal.png b/docs/images/platform/pki/ca-crl-modal.png deleted file mode 100644 index af26b1aca..000000000 Binary files a/docs/images/platform/pki/ca-crl-modal.png and /dev/null differ diff --git a/docs/images/platform/pki/ca-crl.png b/docs/images/platform/pki/ca-crl.png index 4794034a1..efe7d3b4a 100644 Binary files a/docs/images/platform/pki/ca-crl.png and b/docs/images/platform/pki/ca-crl.png differ