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
non-zero-max-ttl
Maidul Islam1f97ac519201
diff --git a/backend/src/models/identityAccessToken.ts b/backend/src/models/identityAccessToken.tsindex 7acdb2dbe3..82b2e6778c 100644--- a/backend/src/models/identityAccessToken.ts+++ b/backend/src/models/identityAccessToken.ts@@ -53,13 +53,13 @@ const identityAccessTokenSchema = new Schema(accessTokenTTL: { // seconds// incremental lifetimetype: Number,- default: 7200,+ default: 2592000, // 30 daysrequired: true},accessTokenMaxTTL: { // seconds// max lifetimetype: Number,- default: 7200,+ default: 2592000, // 30 daysrequired: true},accessTokenTrustedIps: {diff --git a/backend/src/validation/auth.ts b/backend/src/validation/auth.tsindex 84fea54b6f..e723ba7d9d 100644--- a/backend/src/validation/auth.ts+++ b/backend/src/validation/auth.ts@@ -117,7 +117,9 @@ export const AddUniversalAuthToIdentityV1 = z.object({.min(1).default([{ ipAddress: "0.0.0.0/0" }]),accessTokenTTL: z.number().int().min(0).default(7200),- accessTokenMaxTTL: z.number().int().min(0).default(0),+ accessTokenMaxTTL: z.number().int().refine(value => value !== 0, {+ message: "accessTokenMaxTTL must have a non zero number",+ }).default(2592000), // 30 daysaccessTokenNumUsesLimit: z.number().int().min(0).default(0)})});@@ -143,7 +145,9 @@ export const UpdateUniversalAuthToIdentityV1 = z.object({.optional(),accessTokenTTL: z.number().int().min(0).optional(),accessTokenNumUsesLimit: z.number().int().min(0).optional(),- accessTokenMaxTTL: z.number().int().min(0).default(0),+ accessTokenMaxTTL: z.number().int().refine(value => value !== 0, {+ message: "accessTokenMaxTTL must have a non zero number",+ }).default(2592000),}),});diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityUniversalAuthForm.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityUniversalAuthForm.tsxindex a1d0a0bd2d..6d327f9d47 100644--- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityUniversalAuthForm.tsx+++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityUniversalAuthForm.tsx@@ -88,8 +88,8 @@ export const IdentityUniversalAuthForm = ({} = useForm<FormData>({resolver: yupResolver(schema),defaultValues: {- accessTokenTTL: "7200",- accessTokenMaxTTL: "0",+ accessTokenTTL: "2592000",+ accessTokenMaxTTL: "2592000",accessTokenNumUsesLimit: "0",clientSecretTrustedIps: [{ipAddress: "0.0.0.0/0"@@ -136,8 +136,8 @@ export const IdentityUniversalAuthForm = ({});} else {reset({- accessTokenTTL: "7200",- accessTokenMaxTTL: "0",+ accessTokenTTL: "2592000",+ accessTokenMaxTTL: "2592000",accessTokenNumUsesLimit: "0",clientSecretTrustedIps: [{ipAddress: "0.0.0.0/0"@@ -211,7 +211,7 @@ export const IdentityUniversalAuthForm = ({<form onSubmit={handleSubmit(onFormSubmit)}><Controllercontrol={control}- defaultValue="7200"+ defaultValue="2592000"name="accessTokenTTL"render={({ field, fieldState: { error } }) => (<FormControl@@ -221,7 +221,7 @@ export const IdentityUniversalAuthForm = ({><Input{...field}- placeholder="7200"+ placeholder="2592000"type="number"min="0"step="1"@@ -231,7 +231,7 @@ export const IdentityUniversalAuthForm = ({/><Controllercontrol={control}- defaultValue="7200"+ defaultValue="2592000"name="accessTokenMaxTTL"render={({ field, fieldState: { error } }) => (<FormControl@@ -241,9 +241,9 @@ export const IdentityUniversalAuthForm = ({><Input{...field}- placeholder="7200"+ placeholder="2592000"type="number"- min="0"+ min="1"step="1"/></FormControl>