Skip to content

Commit bad56bd

Browse files
committed
fix(mpc-party): split KMS permissions for GetPublicKey action
Signed-off-by: Ghislain Cheng <ghislain.cheng@zama.ai>
1 parent 3fd2248 commit bad56bd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

modules/mpc-party/main.tf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,16 @@ resource "aws_kms_key" "mpc_party" {
262262
policy = jsonencode({
263263
Version = "2012-10-17"
264264
Statement = [
265+
{
266+
Effect = "Allow",
267+
Principal = {
268+
AWS = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${module.iam_assumable_role_mpc_party.iam_role_name}"
269+
},
270+
Action = [
271+
"kms:GetPublicKey",
272+
],
273+
Resource = "*",
274+
},
265275
{
266276
Effect = "Allow",
267277
Principal = {
@@ -270,7 +280,6 @@ resource "aws_kms_key" "mpc_party" {
270280
Action = [
271281
"kms:Decrypt",
272282
"kms:GenerateDataKey",
273-
"kms:GetPublicKey"
274283
],
275284
Resource = "*",
276285
Condition = {
@@ -343,7 +352,6 @@ resource "aws_kms_key" "mpc_party_backup" {
343352
Action = [
344353
"kms:Decrypt",
345354
"kms:GenerateDataKey",
346-
"kms:GetPublicKey"
347355
],
348356
Resource = "*",
349357
Condition = {

0 commit comments

Comments
 (0)