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
improvement(pki): drop the keystore entry fields nothing consumes
Saifae0173076c75
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex d4cb77a4ee..3ac9349415 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -2133,8 +2133,6 @@ export const CERTIFICATES = {commonName: "The common name of the certificate, if it has one.",altNames: "The subject alternative names of the certificate, comma separated, if it has any.",keyAlgorithm: "The algorithm and size of the private key, such as 'RSA 2048' or 'ECDSA P-256'.",- entrySerialNumber: "The serial number of the certificate.",- notBefore: "The date the certificate becomes valid.",notAfter: "The date the certificate expires.",fingerprintSha256: "The SHA-256 fingerprint of the certificate.",chainWarning:diff --git a/backend/src/server/routes/v1/certificate-router.ts b/backend/src/server/routes/v1/certificate-router.tsindex 762a9b07e6..5b8bb1cac2 100644--- a/backend/src/server/routes/v1/certificate-router.ts+++ b/backend/src/server/routes/v1/certificate-router.ts@@ -1620,8 +1620,6 @@ export const registerCertificateRouter = async (server: FastifyZodProvider) => {commonName: z.string().max(1024).nullable().describe(CERTIFICATES.EXTRACT_PKCS12.commonName),altNames: z.string().max(2048).nullable().describe(CERTIFICATES.EXTRACT_PKCS12.altNames),keyAlgorithm: z.string().max(64).describe(CERTIFICATES.EXTRACT_PKCS12.keyAlgorithm),- serialNumber: z.string().max(256).describe(CERTIFICATES.EXTRACT_PKCS12.entrySerialNumber),- notBefore: z.string().describe(CERTIFICATES.EXTRACT_PKCS12.notBefore),notAfter: z.string().describe(CERTIFICATES.EXTRACT_PKCS12.notAfter),fingerprintSha256: z.string().max(256).describe(CERTIFICATES.EXTRACT_PKCS12.fingerprintSha256),chainWarning: z.string().max(512).nullable().describe(CERTIFICATES.EXTRACT_PKCS12.chainWarning),diff --git a/backend/src/services/certificate/certificate-pkcs12-fns.test.ts b/backend/src/services/certificate/certificate-pkcs12-fns.test.tsindex 403f23be6e..ca62629b3a 100644--- a/backend/src/services/certificate/certificate-pkcs12-fns.test.ts+++ b/backend/src/services/certificate/certificate-pkcs12-fns.test.ts@@ -116,7 +116,6 @@ describe("extractPkcs12Entries chain building", () => {const { entries } = await extract(fixtures.notYetValidLeaf, "test");expect(entries).toHaveLength(1);- expect(new Date(entries[0].notBefore).getTime()).toBeGreaterThan(Date.now());expect(entries[0].chainPem).toBeUndefined();expect(entries[0].chainWarning).toContain("No usable issuer chain");});diff --git a/backend/src/services/certificate/certificate-pkcs12-fns.ts b/backend/src/services/certificate/certificate-pkcs12-fns.tsindex 659dc577f9..081c19c1ac 100644--- a/backend/src/services/certificate/certificate-pkcs12-fns.ts+++ b/backend/src/services/certificate/certificate-pkcs12-fns.ts@@ -36,8 +36,6 @@ export type TPkcs12Entry = {commonName: string | null;altNames: string | null;keyAlgorithm: string;- serialNumber: string;- notBefore: string;notAfter: string;fingerprintSha256: string;chainWarning: string | null;@@ -57,7 +55,6 @@ const MAX_CHAIN_DEPTH = 10;const CHAIN_WARNING = "No usable issuer chain was found in the keystore, so this will be imported on its own.";const MAX_SUBJECT_LENGTH = 2048;-const MAX_SERIAL_LENGTH = 256;const MAX_ALIAS_LENGTH = 1024;const toPem = (type: string, derBytes: string) => forge.pem.encode({ type, body: derBytes });@@ -374,8 +371,6 @@ export const extractPkcs12Entries = async ({subject: cert.cert.subject.slice(0, MAX_SUBJECT_LENGTH),commonName: cert.cert.subjectName.getField("CN")[0]?.slice(0, MAX_SUBJECT_LENGTH) ?? null,altNames: readAltNames(cert.cert),- serialNumber: cert.cert.serialNumber.slice(0, MAX_SERIAL_LENGTH),- notBefore: cert.cert.notBefore.toISOString(),notAfter: cert.cert.notAfter.toISOString(),fingerprintSha256: cert.fingerprint,certificatePem: cert.pemdiff --git a/frontend/src/hooks/api/certificates/types.ts b/frontend/src/hooks/api/certificates/types.tsindex e01d4b4d01..3706b7badf 100644--- a/frontend/src/hooks/api/certificates/types.ts+++ b/frontend/src/hooks/api/certificates/types.ts@@ -92,8 +92,6 @@ export type TPkcs12Entry = {commonName: string | null;altNames: string | null;keyAlgorithm: string;- serialNumber: string;- notBefore: string;notAfter: string;fingerprintSha256: string;chainWarning: string | null;