mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: updated aws principal arn field size to 2048
This commit is contained in:
@@ -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.IdentityAwsAuth, "allowedPrincipalArns");
|
||||||
|
if (hasColumn) {
|
||||||
|
await knex.schema.alterTable(TableName.IdentityAwsAuth, (t) => {
|
||||||
|
t.string("allowedPrincipalArns", 2048).notNullable().alter();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(knex: Knex): Promise<void> {
|
||||||
|
const hasColumn = await knex.schema.hasColumn(TableName.IdentityAwsAuth, "allowedPrincipalArns");
|
||||||
|
if (hasColumn) {
|
||||||
|
await knex.schema.alterTable(TableName.IdentityAwsAuth, (t) => {
|
||||||
|
t.string("allowedPrincipalArns", 255).notNullable().alter();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ const arnRegex = new RE2(/^arn:aws:iam::\d{12}:(user\/[a-zA-Z0-9_.@+*/-]+|role\/
|
|||||||
export const validateAccountIds = z
|
export const validateAccountIds = z
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
|
.max(2048)
|
||||||
.default("")
|
.default("")
|
||||||
// Custom validation to ensure each part is a 12-digit number
|
// Custom validation to ensure each part is a 12-digit number
|
||||||
.refine(
|
.refine(
|
||||||
@@ -36,6 +37,7 @@ export const validateAccountIds = z
|
|||||||
export const validatePrincipalArns = z
|
export const validatePrincipalArns = z
|
||||||
.string()
|
.string()
|
||||||
.trim()
|
.trim()
|
||||||
|
.max(2048)
|
||||||
.default("")
|
.default("")
|
||||||
// Custom validation for ARN format
|
// Custom validation for ARN format
|
||||||
.refine(
|
.refine(
|
||||||
|
|||||||
Reference in New Issue
Block a user