-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Vanta role configuration for SOC2 monitoring
This will apply to all accounts by default - we can change the irrelevant ones to out-of-scope later in their UI if we want. https://app.clubhouse.io/highwing/story/1533/set-up-vanta-monitoring
- Loading branch information
Jay Zeschin
committed
Jan 25, 2021
0 parents
commit 0415fca
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
data "aws_iam_policy_document" "vanta_additional_permissions" { | ||
statement { | ||
actions = [ | ||
"ecr:DescribeImageScanFindings", | ||
"ecr:DescribeImages", | ||
"dynamodb:ListTagsOfResource", | ||
"ecr:ListTagsForResource", | ||
"sqs:ListQueueTags" | ||
] | ||
resources = ["*"] | ||
} | ||
|
||
statement { | ||
effect = "Deny" | ||
actions = [ | ||
"datapipeline:EvaluateExpression", | ||
"datapipeline:QueryObjects", | ||
"rds:DownloadDBLogFilePortion" | ||
] | ||
|
||
resources = ["*"] | ||
} | ||
} | ||
|
||
resource "aws_iam_policy" "vanta_additional_permissions" { | ||
name = "VantaAdditionalPermissions" | ||
description = "Additional permissions for Vanta monitoring" | ||
policy = data.aws_iam_policy_document.vanta_additional_permissions.json | ||
} | ||
|
||
data "aws_iam_policy_document" "vanta_assume_role_policy" { | ||
statement { | ||
actions = ["sts:AssumeRole"] | ||
|
||
principals { | ||
type = "AWS" | ||
identifiers = ["956993596390"] | ||
} | ||
|
||
condition { | ||
test = "StringEquals" | ||
variable = "sts:ExternalId" | ||
values = ["64AFC813486EC4B"] | ||
} | ||
} | ||
} | ||
|
||
resource "aws_iam_role" "vanta" { | ||
name = "vanta-auditor" | ||
assume_role_policy = data.aws_iam_policy_document.vanta_assume_role_policy.json | ||
} | ||
|
||
resource "aws_iam_role_policy_attachment" "vanta_additional_permissions" { | ||
role = aws_iam_role.vanta.name | ||
policy_arn = aws_iam_policy.vanta_additional_permissions.arn | ||
} | ||
|
||
data "aws_iam_policy" "aws_auditor" { | ||
arn = "arn:aws:iam::aws:policy/SecurityAudit" | ||
} | ||
|
||
resource "aws_iam_role_policy_attachment" "vanta_aws_auditor" { | ||
role = aws_iam_role.vanta.name | ||
policy_arn = data.aws_iam_policy.aws_auditor.arn | ||
} |