Allow MI to create another MI test

This commit is contained in:
Tuan Dang
2023-12-05 19:34:43 +07:00
parent 87e997e7a0
commit 855158d0bb
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ router.post(
router.post(
"/",
requireAuth({
acceptedAuthModes: [AuthMode.JWT]
acceptedAuthModes: [AuthMode.JWT, AuthMode.MACHINE_ACCESS_TOKEN]
}),
machineIdentityController.createMachineIdentity
);

View File

@@ -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)
})
});