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
refactor(pam): update AwsIamAccountForm to use structured submit data
Victor Santos817d5a27c35a
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/AwsIamAccountForm.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/AwsIamAccountForm.tsxindex 90e6cfa2ed..779c21ba7e 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/AwsIamAccountForm.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/AwsIamAccountForm.tsx@@ -30,11 +30,20 @@ import { GenericAccountFields, genericAccountFieldsSchema } from "./GenericAccouconst AWS_STS_MIN_SESSION_DURATION = 900; // 15 minutesconst AWS_STS_MAX_SESSION_DURATION_ROLE_CHAINING = 3600; // 1 hour+type SubmitData = {+ name: string;+ description?: string | null;+ credentials: {+ targetRoleArn: string;+ defaultSessionDuration: number;+ };+};+type Props = {account?: TAwsIamAccount;resourceId?: string;resourceType?: PamResourceType;- onSubmit: (formData: FormData) => Promise<void>;+ onSubmit: (formData: SubmitData) => Promise<void>;};const arnRoleRegex = /^arn:aws:iam::\d{12}:role\/[\w+=,.@/-]+$/;@@ -152,12 +161,13 @@ export const AwsIamAccountForm = ({ account, resourceId, resourceType, onSubmitconst durationSeconds = Math.floor(durationMs / 1000);await onSubmit({- ...formData,+ name: formData.name,+ description: formData.description,credentials: {- ...formData.credentials,+ targetRoleArn: formData.credentials.targetRoleArn,defaultSessionDuration: durationSeconds}- } as any);+ });};return (