Skip to content

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

fix(kmip): client-side length caps on the auth-method modal AWS fields

bernie-ge5d9d82e236e
diff --git a/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerAuthMethod/KmipServerAuthMethodModal.tsx b/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerAuthMethod/KmipServerAuthMethodModal.tsx
index 34e98d24ef..6f27539b5d 100644
--- a/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerAuthMethod/KmipServerAuthMethodModal.tsx
+++ b/frontend/src/pages/organization/KmipServersPage/KmipServerDetailsByIDPage/components/KmipServerAuthMethod/KmipServerAuthMethodModal.tsx
@@ -33,9 +33,11 @@ const METHOD_OPTIONS: { value: SettableMethod; label: string }[] = [
const schema = z
.object({
method: z.enum(["aws", "token"]),
- stsEndpoint: z.string(),
- allowedPrincipalArns: z.string(),
- allowedAccountIds: z.string()
+ stsEndpoint: z.string().max(255, "STS endpoint must be at most 255 characters"),
+ allowedPrincipalArns: z
+ .string()
+ .max(4096, "Allowed principal ARNs must be at most 4096 characters"),
+ allowedAccountIds: z.string().max(2048, "Allowed account IDs must be at most 2048 characters")
})
.superRefine((data, ctx) => {
if (data.method === "aws") {