Skip to content

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

improvement(auth): increase azure spid field length

Scott Wilsonda7f4d20916b
diff --git a/backend/src/db/migrations/20260318200000_increase-azure-spid-field-size.ts b/backend/src/db/migrations/20260318200000_increase-azure-spid-field-size.ts
new file mode 100644
index 0000000000..ccd785f23f
--- /dev/null
+++ b/backend/src/db/migrations/20260318200000_increase-azure-spid-field-size.ts
@@ -0,0 +1,21 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.IdentityAzureAuth, "allowedServicePrincipalIds");
+ if (hasColumn) {
+ await knex.schema.alterTable(TableName.IdentityAzureAuth, (t) => {
+ t.string("allowedServicePrincipalIds", 2048).notNullable().alter();
+ });
+ }
+}
+
+export async function down(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.IdentityAzureAuth, "allowedServicePrincipalIds");
+ if (hasColumn) {
+ await knex.schema.alterTable(TableName.IdentityAzureAuth, (t) => {
+ t.string("allowedServicePrincipalIds").notNullable().alter();
+ });
+ }
+}