Skip to content

Conversation

@Strnadj
Copy link

@Strnadj Strnadj commented Nov 26, 2025

Current configuration leads to too wide open permissions in AWS like:

  policy = jsonencode({
    Version = "2012-10-17",
    Statement = [
      {
        Effect = "Allow",
        Action = [
          # https://github.com/0xPolygonID/issuer-node/blob/main/go.mod#L7
          "kms:Decrypt",
          "kms:Encrypt",
          "kms:GenerateDataKey"
        ],
        Resource = "*"
      },
      {
        Effect = "Allow",
        Action = [
          # https://github.com/0xPolygonID/issuer-node/blob/main/go.mod#L7
          "secretsmanager:GetSecretValue",
          "secretsmanager:DescribeSecret",
          "secretsmanager:CreateSecret",
          "secretsmanager:PutSecretValue",
          "secretsmanager:DeleteSecret",
          "secretsmanager:TagResource",
          "secretsmanager:ListSecrets"
        ],
        # https://github.com/0xPolygonID/issuer-node/blob/main/internal/kms/aws_secret_storage_provider.go#L82
        Resource = "*"
      }
    ]
  })

if you add a tag, it allows to create more restrictive permissions:

Condition = {
  StringEquals = {
    "aws:RequestTag/source" = "polygon-issuer-node"
  }
}

@Strnadj Strnadj requested a review from a team as a code owner November 26, 2025 18:29
@Strnadj Strnadj changed the base branch from main to develop November 27, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant