From 2c3bfb16efc0612eaa21e50cee04cf24464058c6 Mon Sep 17 00:00:00 2001 From: Mickael Bourgois Date: Fri, 16 Feb 2024 11:18:05 +0100 Subject: [PATCH] ARSN-400: Add scuba admin actions --- lib/policyEvaluator/RequestContext.ts | 2 +- lib/policyEvaluator/utils/actionMaps.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/policyEvaluator/RequestContext.ts b/lib/policyEvaluator/RequestContext.ts index 659057b3e..349494dd2 100644 --- a/lib/policyEvaluator/RequestContext.ts +++ b/lib/policyEvaluator/RequestContext.ts @@ -110,7 +110,7 @@ function _buildArn( } case 'scuba': { return `arn:scality:scuba::${requesterInfo!.accountid}:` + - `${generalResource}/${specificResource || ''}`; + `${generalResource}${specificResource ? '/' + specificResource : ''}`; } default: return undefined; diff --git a/lib/policyEvaluator/utils/actionMaps.ts b/lib/policyEvaluator/utils/actionMaps.ts index 787ae00c1..4382a3e9c 100644 --- a/lib/policyEvaluator/utils/actionMaps.ts +++ b/lib/policyEvaluator/utils/actionMaps.ts @@ -208,6 +208,10 @@ const actionMapMetadata = { const actionMapScuba = { GetMetrics: 'scuba:GetMetrics', + AdminStartIngest: 'scuba:AdminStartIngest', + AdminStopIngest: 'scuba:AdminStopIngest', + AdminReadRaftCseq: 'scuba:AdminReadRaftCseq', + AdminTriggerRepair: 'scuba:AdminTriggerRepair', }; export {