Skip to content

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

don't allow OAUTH tokens to create a new project

Matheus Nogueiraaebec863bb47
diff --git a/backend/src/ee/routes/v2/secret-scanning-v2-routers/secret-scanning-v2-router.ts b/backend/src/ee/routes/v2/secret-scanning-v2-routers/secret-scanning-v2-router.ts
index a045aa6be9..b377ceddf3 100644
--- a/backend/src/ee/routes/v2/secret-scanning-v2-routers/secret-scanning-v2-router.ts
+++ b/backend/src/ee/routes/v2/secret-scanning-v2-routers/secret-scanning-v2-router.ts
@@ -47,7 +47,7 @@ export const registerSecretScanningV2Router = async (server: FastifyZodProvider)
200: z.object({ projectId: z.string() })
}
},
- onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN, AuthMode.OAUTH]),
+ onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const projectId = await server.services.secretScanningV2Instance.resolveActiveProjectId({
actor: req.permission.type,
@@ -85,7 +85,7 @@ export const registerSecretScanningV2Router = async (server: FastifyZodProvider)
})
}
},
- onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN, AuthMode.OAUTH]),
+ onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) =>
server.services.secretScanningV2Instance.getInstanceState({
actor: req.permission.type,