diff --git a/backend/src/ee/routes/v3/machineIdentity.ts b/backend/src/ee/routes/v3/machineIdentity.ts index 66d32b13c..0550cf14f 100644 --- a/backend/src/ee/routes/v3/machineIdentity.ts +++ b/backend/src/ee/routes/v3/machineIdentity.ts @@ -37,7 +37,7 @@ router.post( router.post( "/", requireAuth({ - acceptedAuthModes: [AuthMode.JWT] + acceptedAuthModes: [AuthMode.JWT, AuthMode.MACHINE_ACCESS_TOKEN] }), machineIdentityController.createMachineIdentity ); diff --git a/backend/src/validation/machineIdentity.ts b/backend/src/validation/machineIdentity.ts index 49347a306..74d3ee92a 100644 --- a/backend/src/validation/machineIdentity.ts +++ b/backend/src/validation/machineIdentity.ts @@ -51,7 +51,7 @@ export const CreateMachineIdentityV3 = z.object({ .array() .min(1) .default([{ ipAddress: "0.0.0.0/0" }]), - accessTokenTTL: z.number().int().min(1) + accessTokenTTL: z.number().int().min(1).default(7200) }) });