|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * rosa_cli/rosa-cli-permission-examples.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="rosa-cli-hcp-classic-examples_{context}"] |
| 7 | += Least privilege permissions for common ROSA CLI commands |
| 8 | + |
| 9 | +The following required minimum permissions for the listed ROSA CLI commands are applicable for hosted control plane (HCP) and Classic clusters. |
| 10 | + |
| 11 | +[id="rosa-create-OIDC-providers-hcp-classic_{context}"] |
| 12 | +== Create an OpenID Connect (OIDC) provider |
| 13 | +Run the following command with the specified permissions to create your OIDC provider by using `auto` mode. |
| 14 | + |
| 15 | +.Input |
| 16 | +[source,terminal] |
| 17 | +---- |
| 18 | +$ rosa create oidc-config --mode auto |
| 19 | +---- |
| 20 | +.Minimum permissions |
| 21 | +[source,json] |
| 22 | +---- |
| 23 | +{ |
| 24 | + "Version": "2012-10-17", |
| 25 | + "Statement": [ |
| 26 | + { |
| 27 | + "Sid": "CreateOidcConfig", |
| 28 | + "Effect": "Allow", |
| 29 | + "Action": [ |
| 30 | + "iam:TagOpenIDConnectProvider", |
| 31 | + "iam:CreateOpenIDConnectProvider" |
| 32 | + ], |
| 33 | + "Resource": "*" |
| 34 | + } |
| 35 | + ] |
| 36 | +} |
| 37 | +---- |
| 38 | + |
| 39 | +[id="rosa-list-account-roles-hcp-classic_{context}"] |
| 40 | +== List your account roles |
| 41 | +Run the following command with the specified permissions to list your account roles. |
| 42 | + |
| 43 | +.Input |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +$ rosa list account-roles |
| 47 | +---- |
| 48 | +.Minimum permissions |
| 49 | +[source,json] |
| 50 | +---- |
| 51 | +{ |
| 52 | + "Version": "2012-10-17", |
| 53 | + "Statement": [ |
| 54 | + { |
| 55 | + "Sid": "ListAccountRoles", |
| 56 | + "Effect": "Allow", |
| 57 | + "Action": [ |
| 58 | + "iam:ListRoleTags", |
| 59 | + "iam:ListRoles" |
| 60 | + ], |
| 61 | + "Resource": "*" |
| 62 | + } |
| 63 | + ] |
| 64 | +} |
| 65 | +---- |
| 66 | + |
| 67 | +[id="rosa-list-operator-roles-hcp-classic_{context}"] |
| 68 | +== List your Operator roles |
| 69 | +Run the following command with the specified permissions to list your Operator roles. |
| 70 | + |
| 71 | +.Input |
| 72 | +[source,terminal] |
| 73 | +---- |
| 74 | +$ rosa list operator-roles |
| 75 | +---- |
| 76 | +.Minimum permissions |
| 77 | +[source,json] |
| 78 | +---- |
| 79 | +{ |
| 80 | + "Version": "2012-10-17", |
| 81 | + "Statement": [ |
| 82 | + { |
| 83 | + "Sid": "ListOperatorRoles", |
| 84 | + "Effect": "Allow", |
| 85 | + "Action": [ |
| 86 | + "iam:ListRoleTags", |
| 87 | + "iam:ListAttachedRolePolicies", |
| 88 | + "iam:ListRoles", |
| 89 | + "iam:ListPolicyTags" |
| 90 | + ], |
| 91 | + "Resource": "*" |
| 92 | + } |
| 93 | + ] |
| 94 | +} |
| 95 | +
|
| 96 | +---- |
| 97 | + |
| 98 | +[id="rosa-list-OIDC-providers-hcp-classic_{context}"] |
| 99 | +== List your OIDC providers |
| 100 | + |
| 101 | +Run the following command with the specified permissions to list your OIDC providers. |
| 102 | + |
| 103 | +.Input |
| 104 | +[source,terminal] |
| 105 | +---- |
| 106 | +$ rosa list oidc-providers |
| 107 | +---- |
| 108 | +.Minimum permissions |
| 109 | +[source,json] |
| 110 | +---- |
| 111 | +{ |
| 112 | + "Version": "2012-10-17", |
| 113 | + "Statement": [ |
| 114 | + { |
| 115 | + "Sid": "ListOidcProviders", |
| 116 | + "Effect": "Allow", |
| 117 | + "Action": [ |
| 118 | + "iam:ListOpenIDConnectProviders", |
| 119 | + "iam:ListOpenIDConnectProviderTags" |
| 120 | + ], |
| 121 | + "Resource": "*" |
| 122 | + } |
| 123 | + ] |
| 124 | +} |
| 125 | +---- |
| 126 | + |
| 127 | +[id="rosa-verify-quota-hcp-classic_{context}"] |
| 128 | +== Verify your quota |
| 129 | + |
| 130 | +Run the following command with the specified permissions to verify your quota. |
| 131 | + |
| 132 | +.Input |
| 133 | +[source,terminal] |
| 134 | +---- |
| 135 | +$ rosa verify quota |
| 136 | +---- |
| 137 | +.Minimum permissions |
| 138 | +[source,json] |
| 139 | +---- |
| 140 | +{ |
| 141 | + "Version": "2012-10-17", |
| 142 | + "Statement": [ |
| 143 | + { |
| 144 | + "Sid": "VerifyQuota", |
| 145 | + "Effect": "Allow", |
| 146 | + "Action": [ |
| 147 | + "elasticloadbalancing:DescribeAccountLimits", |
| 148 | + "servicequotas:ListServiceQuotas" |
| 149 | + ], |
| 150 | + "Resource": "*" |
| 151 | + } |
| 152 | + ] |
| 153 | +} |
| 154 | +
|
| 155 | +---- |
| 156 | + |
| 157 | +[id="rosa-delete-account-roles-hcp-classic_{context}"] |
| 158 | +== Delete your account roles |
| 159 | + |
| 160 | +Run the following command with the specified permissions to delete the account roles in `auto` mode. |
| 161 | + |
| 162 | +.Input |
| 163 | +[source,terminal] |
| 164 | +---- |
| 165 | +$ rosa delete account-roles -–mode auto |
| 166 | +---- |
| 167 | +.Minimum permissions |
| 168 | +[source,json] |
| 169 | +---- |
| 170 | +{ |
| 171 | + "Version": "2012-10-17", |
| 172 | + "Statement": [ |
| 173 | + { |
| 174 | + "Sid": "DeleteAccountRoles", |
| 175 | + "Effect": "Allow", |
| 176 | + "Action": [ |
| 177 | + "iam:GetRole", |
| 178 | + "iam:ListInstanceProfilesForRole", |
| 179 | + "iam:DetachRolePolicy", |
| 180 | + "iam:ListAttachedRolePolicies", |
| 181 | + "iam:ListRoles", |
| 182 | + "iam:DeleteRole", |
| 183 | + "iam:ListRolePolicies" |
| 184 | + ], |
| 185 | + "Resource": "*" |
| 186 | + } |
| 187 | + ] |
| 188 | +} |
| 189 | +
|
| 190 | +---- |
| 191 | + |
| 192 | +[id="rosa-delete-operator-roles-hcp-classic_{context}"] |
| 193 | +== Delete your Operator roles |
| 194 | + |
| 195 | +Run the following command with the specified permissions to delete your Operator roles in `auto` mode. |
| 196 | + |
| 197 | +.Input |
| 198 | +[source,terminal] |
| 199 | +---- |
| 200 | +$ rosa delete operator-roles -–mode auto |
| 201 | +---- |
| 202 | +.Minimum permissions |
| 203 | +[source,json] |
| 204 | +---- |
| 205 | +
|
| 206 | +{ |
| 207 | + "Version": "2012-10-17", |
| 208 | + "Statement": [ |
| 209 | + { |
| 210 | + "Sid": "DeleteOperatorRoles", |
| 211 | + "Effect": "Allow", |
| 212 | + "Action": [ |
| 213 | + "iam:GetRole", |
| 214 | + "iam:DetachRolePolicy", |
| 215 | + "iam:ListAttachedRolePolicies", |
| 216 | + "iam:ListRoles", |
| 217 | + "iam:DeleteRole" |
| 218 | + ], |
| 219 | + "Resource": "*" |
| 220 | + } |
| 221 | + ] |
| 222 | +} |
| 223 | +
|
| 224 | +---- |
| 225 | + |
| 226 | +[id="rosa-delete-oidc-config-hcp-classic_{context}"] |
| 227 | +== Delete your OIDC configuration |
| 228 | + |
| 229 | +Run the following command with the specified permissions to delete your OIDC configuration by using `auto` mode. |
| 230 | + |
| 231 | +.Input |
| 232 | +[source,terminal] |
| 233 | +---- |
| 234 | +$ rosa delete oidc-config -–mode auto |
| 235 | +---- |
| 236 | +.Minimum permissions |
| 237 | +[source,json] |
| 238 | +---- |
| 239 | +
|
| 240 | +{ |
| 241 | + "Version": "2012-10-17", |
| 242 | + "Statement": [ |
| 243 | + { |
| 244 | + "Sid": "DeleteOidcConfig", |
| 245 | + "Effect": "Allow", |
| 246 | + "Action": [ |
| 247 | + "iam:ListOpenIDConnectProviders", |
| 248 | + "iam:DeleteOpenIDConnectProvider" |
| 249 | + ], |
| 250 | + "Resource": "*" |
| 251 | + } |
| 252 | + ] |
| 253 | +} |
| 254 | +
|
| 255 | +---- |
| 256 | + |
0 commit comments