-
Notifications
You must be signed in to change notification settings - Fork 2
/
reduced-permissions-mode.json
166 lines (166 loc) · 5.19 KB
/
reduced-permissions-mode.json
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "iam:SimulatePrincipalPolicy",
"Resource": "arn:aws:iam::${ACCOUNT_ID}:role/*"
},
{
"Sid": "ResourceTag",
"Effect": "Allow",
"Action": [
"autoscaling:SuspendProcesses",
"autoscaling:UpdateAutoScalingGroup",
"cloudformation:DescribeStackEvents",
"cloudformation:UpdateStack",
"ec2:DeleteKeyPair"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:ResourceTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "RequestTag",
"Effect": "Allow",
"Action": [
"eks:TagResource"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/Cloudera-Resource-Name": "crn:cdp:*"
}
}
},
{
"Sid": "CFRequestTag",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup"
],
"Resource": "*",
"Condition": {
"StringLike": {
"aws:RequestTag/Cloudera-Resource-Name": "crn:cdp:*"
},
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFEks",
"Effect": "Allow",
"Resource": "arn:aws:eks:*:*:cluster/env-*-dwx-stack-eks",
"Action": [
"eks:DescribeCluster"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "CFCloudwatch",
"Effect": "Allow",
"Resource": "arn:aws:eks:*::log-group:/aws/eks/env-*-dwx-stack-eks/cluster:*",
"Action": [
"logs:CreateLogStream",
"logs:DescribeLogStreams",
"logs:PutLogEvents",
"logs:PutRetentionPolicy"
],
"Condition": {
"ForAnyValue:StringEquals": {
"aws:CalledVia": "cloudformation.amazonaws.com"
}
}
},
{
"Sid": "gocodeCF",
"Effect": "Allow",
"Action": "cloudformation:DescribeStacks",
"Resource": "arn:aws:cloudformation:*:*:stack/env-*-dwx-stack/*"
},
{
"Sid": "gocodeEks",
"Effect": "Allow",
"Resource": "arn:aws:eks:*:*:cluster/env-*-dwx-stack-eks",
"Action": [
"eks:DescribeUpdate",
"eks:UpdateClusterConfig",
"eks:UpdateClusterVersion"
]
},
{
"Sid": "Role",
"Effect": "Allow",
"Action": [
"iam:DeleteRolePolicy",
"iam:GetRolePolicy",
"iam:PutRolePolicy"
],
"Resource": [
"arn:aws:iam::*:instance-profile/env-*-dwx-stack-NodeInstanceProfile-*",
"arn:aws:iam::*:role/env-*-dwx-stack-EKSServiceRole-*",
"arn:aws:iam::*:role/env-*-dwx-stack-NodeInstanceRole-*"
]
},
{
"Sid": "S3PutGetObject",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::${DATALAKE_BUCKET}/cf-templates/*",
"arn:aws:s3:::${DATALAKE_BUCKET}/backup/*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"acm:DescribeCertificate",
"acm:ListCertificates",
"autoscaling:DescribeAutoScalingGroups",
"ec2:CreateKeyPair",
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:DescribeDhcpOptions",
"ec2:DescribeKeyPairs",
"ec2:DescribeRouteTables",
"ec2:DescribeSubNets",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcs",
"ec2:DescribeInstanceTypes",
"iam:ListAttachedRolePolicies",
"iam:SimulatePrincipalPolicy",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:PutObjectAcl"
],
"Resource": "*"
},
{
"Sid": "StartStopRDS",
"Effect": "Allow",
"Action": [
"rds:StartDBInstance",
"rds:StopDBInstance",
"rds:DescribeDBInstances"
],
"Resource": [
"arn:aws:rds:*:*:db:env-*-dwx-stack-rds",
"arn:aws:rds:*:*:subgrp:env-*-dwx-stack-dbsubnetgroup-*"
]
}
]
}