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
fix(pki): use the CSR's own algorithms in the ACME approval pre-check
Saifde651c0b90f8
diff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.tsindex 947ef78437..176b3190e0 100644--- a/backend/src/ee/services/pki-acme/pki-acme-service.ts+++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts@@ -1260,9 +1260,11 @@ export const pkiAcmeServiceFactory = ({throw new NotFoundError({ message: "Certificate policy not found" });}+ // The CSR's own algorithms are spread in so a profile default cannot override what the+ // key actually is, which would fail a policy the CSR itself satisfies.const validationResult = await certificatePolicyService.validateCertificateRequest(policy.id,- applyProfileDefaults(certificateRequest, profile.defaults)+ applyProfileDefaults({ ...certificateRequest, ...extractAlgorithmsFromCSR(csr) }, profile.defaults));if (!validationResult.isValid) {throw new AcmeBadCSRError({ message: `Invalid CSR: ${validationResult.errors.join(", ")}` });