Skip to content

Commit

Permalink
update apigateway permission
Browse files Browse the repository at this point in the history
  • Loading branch information
jjzhangjjzhang committed Dec 13, 2023
1 parent 0a010bc commit 3c376a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ The audit policy is comprised of the following permissions:
| SSO | sso:DescribeAccountAssignmentDeletionStatus | * |
| | sso:DescribeInstanceAccessControlAttributeConfiguration | |
| | sso:GetInlinePolicyForPermissionSet | |
| APIGATEWAY | apigateway:GET | * |
| APIGATEWAYV2 | apigatewayv2:GET | * |
| APIGATEWAY | apigateway:GET | arn:aws:apigateway:*::/apikeys/* | |
| WAFREGIONAL | waf-regional:ListRules | * |
| | waf-regional:GetRule | |
| | waf-regional:ListRuleGroups | |
Expand Down
22 changes: 9 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,9 @@ data "aws_iam_policy_document" "lacework_audit_policy" {
statement {
sid = "APIGATEWAY"
actions = ["apigateway:GET"]
resources = ["*"]
resources = ["arn:aws:apigateway:*::/apikeys/*"]
}

statement {
sid = "APIGATEWAYV2"
actions = ["apigatewayv2:GET"]
resources = ["*"]
}
statement {
sid = "WAFREGIONAL"
actions = ["waf-regional:ListRules",
Expand All @@ -120,17 +115,18 @@ data "aws_iam_policy_document" "lacework_audit_policy" {
}

statement {
sid = "SNS"
actions = ["sns:GetDataProtectionPolicy",
"sns:ListPlatformApplications",
"sns:GetSubscriptionAttributes",
sid = "CODEBUILD"
actions = ["codebuild:ListBuilds",
"codebuild:BatchGetBuilds",
]
resources = ["*"]
}

statement {
sid = "CODEBUILD"
actions = ["codebuild:ListBuilds",
"codebuild:BatchGetBuilds",
sid = "SNS"
actions = ["sns:GetDataProtectionPolicy",
"sns:ListPlatformApplications",
"sns:GetSubscriptionAttributes",
]
resources = ["*"]
}
Expand Down

0 comments on commit 3c376a7

Please sign in to comment.