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
bug fix, migration fix, frontend tweak
x0322057447d17e94ad
diff --git a/backend/src/db/migrations/20250429232917_store-cert-secret-key-and-chain.ts b/backend/src/db/migrations/20250429232917_store-cert-secret-key-and-chain.tsindex cb5e44a036..a627bf83c4 100644--- a/backend/src/db/migrations/20250429232917_store-cert-secret-key-and-chain.ts+++ b/backend/src/db/migrations/20250429232917_store-cert-secret-key-and-chain.ts@@ -4,9 +4,12 @@ import { TableName } from "../schemas";export async function up(knex: Knex): Promise<void> {if (await knex.schema.hasTable(TableName.CertificateBody)) {- await knex.schema.alterTable(TableName.CertificateBody, (t) => {- t.binary("encryptedCertificateChain").nullable();- });+ const hasColumn = await knex.schema.hasColumn(TableName.CertificateBody, "encryptedCertificateChain");+ if (!hasColumn) {+ await knex.schema.alterTable(TableName.CertificateBody, (t) => {+ t.binary("encryptedCertificateChain").nullable();+ });+ }}if (!(await knex.schema.hasTable(TableName.CertificateSecret))) {@@ -26,8 +29,11 @@ export async function down(knex: Knex): Promise<void> {}if (await knex.schema.hasTable(TableName.CertificateBody)) {- await knex.schema.alterTable(TableName.CertificateBody, (t) => {- t.dropColumn("encryptedCertificateChain");- });+ const hasColumn = await knex.schema.hasColumn(TableName.CertificateBody, "encryptedCertificateChain");+ if (hasColumn) {+ await knex.schema.alterTable(TableName.CertificateBody, (t) => {+ t.dropColumn("encryptedCertificateChain");+ });+ }}}diff --git a/backend/src/services/certificate/certificate-service.ts b/backend/src/services/certificate/certificate-service.tsindex 634fe791bf..927fab4adc 100644--- a/backend/src/services/certificate/certificate-service.ts+++ b/backend/src/services/certificate/certificate-service.ts@@ -485,7 +485,7 @@ export const certificateServiceFactory = ({await certificateSecretDAL.create({- certId: cert.id,+ certId: txCert.id,encryptedPrivateKey},txdiff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsxindex 2331d08109..c4cffe7b01 100644--- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificateImportModal.tsx@@ -175,11 +175,7 @@ export const CertificateImportModal = ({ popUp, handlePopUpToggle }: Props) => {errorText={error?.message}isRequired>- <TextArea- {...field}- placeholder={"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}- isDisabled={Boolean(cert)}- />+ <TextArea {...field} isDisabled={Boolean(cert)} /></FormControl>)}/>@@ -194,13 +190,7 @@ export const CertificateImportModal = ({ popUp, handlePopUpToggle }: Props) => {errorText={error?.message}isRequired>- <TextArea- {...field}- placeholder={- "-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----"- }- isDisabled={Boolean(cert)}- />+ <TextArea {...field} isDisabled={Boolean(cert)} /></FormControl>)}/>@@ -215,11 +205,7 @@ export const CertificateImportModal = ({ popUp, handlePopUpToggle }: Props) => {errorText={error?.message}isRequired>- <TextArea- {...field}- placeholder={"-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}- isDisabled={Boolean(cert)}- />+ <TextArea {...field} isDisabled={Boolean(cert)} /></FormControl>)}/>