mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add acceptedAuthModes for v2 secrets
This commit is contained in:
@@ -12,7 +12,9 @@ const router = express.Router();
|
|||||||
*/
|
*/
|
||||||
router.post(
|
router.post(
|
||||||
'/batch-create/workspace/:workspaceId/environment/:environmentName',
|
'/batch-create/workspace/:workspaceId/environment/:environmentName',
|
||||||
requireAuth,
|
requireAuth({
|
||||||
|
acceptedAuthModes: ['jwt']
|
||||||
|
}),
|
||||||
requireWorkspaceAuth({
|
requireWorkspaceAuth({
|
||||||
acceptedRoles: [ADMIN, MEMBER]
|
acceptedRoles: [ADMIN, MEMBER]
|
||||||
}),
|
}),
|
||||||
@@ -27,7 +29,11 @@ router.post(
|
|||||||
* Get a single secret by secret id
|
* Get a single secret by secret id
|
||||||
*/
|
*/
|
||||||
router.get(
|
router.get(
|
||||||
'/:secretId', requireAuth, param('secretId').exists().trim(),
|
'/:secretId',
|
||||||
|
requireAuth({
|
||||||
|
acceptedAuthModes: ['jwt']
|
||||||
|
}),
|
||||||
|
param('secretId').exists().trim(),
|
||||||
requireWorkspaceAuth({
|
requireWorkspaceAuth({
|
||||||
acceptedRoles: [ADMIN, MEMBER]
|
acceptedRoles: [ADMIN, MEMBER]
|
||||||
}),
|
}),
|
||||||
@@ -40,7 +46,9 @@ router.get(
|
|||||||
*/
|
*/
|
||||||
router.delete(
|
router.delete(
|
||||||
'/batch/workspace/:workspaceId/environment/:environmentName',
|
'/batch/workspace/:workspaceId/environment/:environmentName',
|
||||||
requireAuth,
|
requireAuth({
|
||||||
|
acceptedAuthModes: ['jwt']
|
||||||
|
}),
|
||||||
param('workspaceId').exists().isMongoId().trim(),
|
param('workspaceId').exists().isMongoId().trim(),
|
||||||
param('environmentName').exists().trim(),
|
param('environmentName').exists().trim(),
|
||||||
body('secretIds').exists().isArray().custom(array => array.length > 0),
|
body('secretIds').exists().isArray().custom(array => array.length > 0),
|
||||||
@@ -57,7 +65,9 @@ router.delete(
|
|||||||
*/
|
*/
|
||||||
router.patch(
|
router.patch(
|
||||||
'/batch-modify/workspace/:workspaceId/environment/:environmentName',
|
'/batch-modify/workspace/:workspaceId/environment/:environmentName',
|
||||||
requireAuth,
|
requireAuth({
|
||||||
|
acceptedAuthModes: ['jwt']
|
||||||
|
}),
|
||||||
body('secrets').exists().isArray().custom((secrets: ModifySecretRequestBody[]) => secrets.length > 0),
|
body('secrets').exists().isArray().custom((secrets: ModifySecretRequestBody[]) => secrets.length > 0),
|
||||||
param('workspaceId').exists().isMongoId().trim(),
|
param('workspaceId').exists().isMongoId().trim(),
|
||||||
param('environmentName').exists().trim(),
|
param('environmentName').exists().trim(),
|
||||||
|
|||||||
Reference in New Issue
Block a user