This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.yaml
103 lines (102 loc) · 3.95 KB
/
account.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
AWSTemplateFormatVersion: "2010-09-09"
Description: Allows Fugue to check this account for security and compliance
Parameters:
RoleName:
Type: String
Description: Name of the IAM role to create for Fugue
FugueAccountId:
Type: String
Description: Fugue AWS account ID
FugueExternalId:
Type: String
Description: External ID associated with your Fugue account
Resources:
FugueRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Ref RoleName
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
AWS: !Join [ ":", [ "arn:aws:iam:", !Ref FugueAccountId, "role/generate-credentials" ] ]
Action: "sts:AssumeRole"
Condition:
StringEquals:
"sts:ExternalId": !Ref FugueExternalId
Policies:
- PolicyName: Fugue
PolicyDocument: {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "0",
"Effect": "Allow",
"Resource": "*",
"Action": [
"acm-pca:DescribeCertificateAuthority",
"acm-pca:GetCertificateAuthorityCertificate",
"acm-pca:GetCertificateAuthorityCsr",
"acm-pca:ListCertificateAuthorities",
"acm-pca:ListTags",
"apigateway:GET",
"cloudwatch:GetDashboard",
"cloudwatch:ListDashboards",
"cloudwatch:ListTagsForResource",
"cognito-idp:DescribeIdentityProvider",
"cognito-idp:DescribeResourceServer",
"cognito-idp:DescribeUserPool",
"cognito-idp:DescribeUserPoolClient",
"cognito-idp:DescribeUserPoolDomain",
"cognito-idp:GetGroup",
"cognito-idp:ListGroups",
"cognito-idp:ListIdentityProviders",
"cognito-idp:ListResourceServers",
"cognito-idp:ListUserPoolClients",
"ds:DescribeConditionalForwarders",
"ds:ListTagsForResource",
"dynamodb:ListTagsOfResource",
"ecr:ListTagsForResource",
"elasticache:ListTagsForResource",
"elasticfilesystem:DescribeLifecycleConfiguration",
"elasticfilesystem:DescribeTags",
"glacier:GetVaultNotifications",
"glacier:ListTagsForVault",
"kinesis:DescribeStreamSummary",
"lambda:GetAlias",
"lambda:GetEventSourceMapping",
"lambda:GetFunction",
"macie:ListMemberAccounts",
"macie:ListS3Resources",
"mediastore:DescribeContainer",
"mediastore:ListTagsForResource",
"secretsmanager:DescribeSecret",
"sns:GetSubscriptionAttributes",
"sns:ListSubscriptions",
"sns:ListTagsForResource",
"ssm:GetDocument",
"ssm:GetMaintenanceWindow",
"ssm:GetMaintenanceWindowTask",
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetPatchBaseline",
"ssm:ListAssociations",
"ssm:ListResourceDataSync",
"ssm:ListTagsForResource",
"states:DescribeStateMachine",
"states:ListTagsForResource",
"waf:GetLoggingConfiguration",
"waf:GetWebACL",
"waf:ListTagsForResource"
]
}
]
}
ManagedPolicyArns: ["arn:aws:iam::aws:policy/SecurityAudit"]
Outputs:
FugueRoleArn:
Description: IAM Role for Fugue
Value: !GetAtt FugueRole.Arn
Export:
Name: !Join [ ":", [ !Ref "AWS::StackName", FugueRoleArn ] ]