Skip to content

Commit a861835

Browse files
authored
Merge pull request #46838 from michaelryanmcneill/OSDOCS-3745
OSDOCS-3745: Fixing KMS policy to not prevent mounting issues and be more granular
2 parents 614fbc9 + e13e2f2 commit a861835

File tree

1 file changed

+56
-16
lines changed

1 file changed

+56
-16
lines changed

modules/rosa-sts-creating-a-cluster-with-customizations.adoc

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,62 @@ $ aws kms get-key-policy --key-id <key_id_or_arn> --policy-name default --output
6363
[source,json]
6464
----
6565
{
66-
"Version": "2012-10-17",
67-
"Id": "key-default-1",
68-
"Statement": [
69-
{
70-
"Sid": "Enable IAM User Permissions",
71-
"Effect": "Allow",
72-
"Principal": {
73-
"AWS": [
74-
"arn:aws:iam::<aws_account_id>:root",
75-
"arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Installer-Role" <1>
76-
]
77-
},
78-
"Action": "kms:*",
79-
"Resource": "*"
80-
}
81-
]
66+
"Version": "2012-10-17",
67+
"Id": "key-rosa-policy-1",
68+
"Statement": [
69+
{
70+
"Sid": "Enable IAM User Permissions",
71+
"Effect": "Allow",
72+
"Principal": {
73+
"AWS": "arn:aws:iam::<aws-account-id>:root"
74+
},
75+
"Action": "kms:*",
76+
"Resource": "*"
77+
},
78+
{
79+
"Sid": "Allow ROSA use of the key",
80+
"Effect": "Allow",
81+
"Principal": {
82+
"AWS": [
83+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Support-Role",
84+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Installer-Role",
85+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Worker-Role",
86+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-ControlPlane-Role"
87+
]
88+
},
89+
"Action": [
90+
"kms:Encrypt",
91+
"kms:Decrypt",
92+
"kms:ReEncrypt*",
93+
"kms:GenerateDataKey*",
94+
"kms:DescribeKey"
95+
],
96+
"Resource": "*"
97+
},
98+
{
99+
"Sid": "Allow attachment of persistent resources",
100+
"Effect": "Allow",
101+
"Principal": {
102+
"AWS": [
103+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Support-Role",
104+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Installer-Role",
105+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-Worker-Role",
106+
"arn:aws:iam::<aws-account-id>:role/ManagedOpenShift-ControlPlane-Role"
107+
]
108+
},
109+
"Action": [
110+
"kms:CreateGrant",
111+
"kms:ListGrants",
112+
"kms:RevokeGrant"
113+
],
114+
"Resource": "*",
115+
"Condition": {
116+
"Bool": {
117+
"kms:GrantIsForAWSResource": "true"
118+
}
119+
}
120+
}
121+
]
82122
}
83123
----
84124
<1> You must specify the ARN for the account-wide role that will be used when you create the ROSA cluster. The ARNs listed in the section must be comma-separated.

0 commit comments

Comments
 (0)