Skip to content

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

feat: made ldap cert nullable and optional

=6671c42d0f4d
diff --git a/backend/src/db/migrations/20250109104508_directory-config-to-kms.ts b/backend/src/db/migrations/20250109104508_directory-config-to-kms.ts
index 4addc2d810..9771e57c5a 100644
--- a/backend/src/db/migrations/20250109104508_directory-config-to-kms.ts
+++ b/backend/src/db/migrations/20250109104508_directory-config-to-kms.ts
@@ -296,7 +296,7 @@ const reencryptLdapConfig = async (knex: Knex) => {
await knex.schema.alterTable(TableName.LdapConfig, (t) => {
if (!hasEncryptedLdapBindPassColumn) t.binary("encryptedLdapBindPass").notNullable().alter();
if (!hasEncryptedLdapBindDNColum) t.binary("encryptedLdapBindDN").notNullable().alter();
- if (!hasEncryptedCertificateColumn) t.binary("encryptedLdapCaCertificate").notNullable().alter();
+ if (!hasEncryptedCertificateColumn) t.binary("encryptedLdapCaCertificate");
});
}
};
diff --git a/backend/src/db/schemas/ldap-configs.ts b/backend/src/db/schemas/ldap-configs.ts
index 94bf0dd03b..778e7be6e4 100644
--- a/backend/src/db/schemas/ldap-configs.ts
+++ b/backend/src/db/schemas/ldap-configs.ts
@@ -32,7 +32,7 @@ export const LdapConfigsSchema = z.object({
uniqueUserAttribute: z.string().default(""),
encryptedLdapBindDN: zodBuffer,
encryptedLdapBindPass: zodBuffer,
- encryptedLdapCaCertificate: zodBuffer
+ encryptedLdapCaCertificate: zodBuffer.nullable().optional()
});
export type TLdapConfigs = z.infer<typeof LdapConfigsSchema>;