Skip to content

Commit 3dbaa98

Browse files
authored
Merge pull request #100618 from openshift-cherrypick-robot/cherry-pick-100264-to-enterprise-4.20
[enterprise-4.20] OSDOCS-16442:Reduced overly permissive permissions in OSD-GCP docs
2 parents 195c19a + 7d472a9 commit 3dbaa98

File tree

4 files changed

+137
-18
lines changed

4 files changed

+137
-18
lines changed

modules/ccs-gcp-iam.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The `sd-sre-platform-gcp-access` Google group is granted access to the GCP proje
7070

7171
[NOTE]
7272
====
73-
* For information regarding the roles within the `sd-sre-platform-gcp-access` group that are specific to clusters created when using the Workload Identity Federation (WIF) authentication type, see link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.17/vanilla.yaml[managed-cluster-config].
73+
* For information regarding the roles within the `sd-sre-platform-gcp-access` group that are specific to clusters created when using the Workload Identity Federation (WIF) authentication type, see link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.19/vanilla.yaml[managed-cluster-config].
7474
* For information about creating a cluster using the Workload Identity Federation authentication type, see _Additional resources_.
7575
====
7676
The following roles are attached to the group:

modules/create-wif-cluster-cli.adoc

Lines changed: 124 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Creating and managing workload identity pools and providers in a dedicated proje
8484
2024/09/26 13:05:52 IAM service account cloud-credential-operator-oeub created
8585
2024/09/26 13:05:52 IAM service account openshift-cloud-network-c-oeub created
8686
2024/09/26 13:05:53 IAM service account openshift-ingress-gcp-oeub created
87-
2024/09/26 13:05:55 Role "osd_deployer_v4.18" updated
87+
2024/09/26 13:05:55 Role "osd_deployer_v4.19" updated
8888
----
8989
--
9090
+
@@ -101,6 +101,11 @@ $ ocm gcp create wif-config --name <wif_name> \ <1>
101101
+
102102
Once the WIF is configured, the following service accounts, roles, and groups are created.
103103
+
104+
[NOTE]
105+
====
106+
Red{nbsp}Hat custom roles are versioned with every OpenShift y-stream release, for example 4.19.
107+
====
108+
+
104109
.WIF configuration service accounts, group and roles
105110
[cols="2a,3a",options="header"]
106111
|===
@@ -110,8 +115,7 @@ Once the WIF is configured, the following service accounts, roles, and groups ar
110115

111116

112117
|osd-deployer
113-
|osd_deployer_v4.18
114-
118+
|osd_deployer_v<y-stream-version>
115119

116120
|osd-control-plane
117121
|- compute.instanceAdmin
@@ -124,35 +128,34 @@ Once the WIF is configured, the following service accounts, roles, and groups ar
124128
- compute.viewer
125129

126130
|cloud-credential-operator-gcp-ro-creds
127-
|cloud_credential_operator_gcp_ro_creds_v{product-version}
131+
|cloud_credential_operator_gcp_ro_creds_v<y-stream-version>
128132

129133
|openshift-cloud-network-config-controller-gcp
130-
|openshift_cloud_network_config_controller_gcp_v{product-version}
134+
|openshift_cloud_network_config_controller_gcp_v<y-stream-version>
131135

132136
|openshift-gcp-ccm
133-
|openshift_gcp_ccm_v{product-version}
137+
|openshift_gcp_ccm_v<y-stream-version>
134138

135139
|openshift-gcp-pd-csi-driver-operator
136140
|- compute.storageAdmin
137141
- iam.serviceAccountUser
138142
- resourcemanager.tagUser
139-
- openshift_gcp_pd_csi_driver_operator_v{product-version}
143+
- openshift_gcp_pd_csi_driver_operator_v<y-stream-version>
140144

141145
|openshift-image-registry-gcp
142-
|openshift_image_registry_gcs_v{product-version}
146+
|openshift_image_registry_gcs_v<y-stream-version>
143147

144148
|openshift-ingress-gcp
145-
|openshift_ingress_gcp_v{product-version}
149+
|openshift_ingress_gcp_v<y-stream-version>
146150

147151
|openshift-machine-api-gcp
148-
|openshift_machine_api_gcp_v{product-version}
152+
|openshift_machine_api_gcp_v<y-stream-version>
149153

150154
|Access via SRE group:sd-sre-platform-gcp-access
151155
|sre_managed_support
152-
153156
|===
154157

155-
For further details about WIF configuration roles and their assigned permissions, see link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.18/vanilla.yaml[managed-cluster-config].
158+
For the complete list of WIF configuration roles and their assigned permissions, see link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.19/vanilla.yaml[managed-cluster-config].
156159

157160
[id="create-wif-cluster_{context}"]
158161
== Creating a WIF cluster
@@ -246,8 +249,32 @@ Updating a WIF configuration is only applicable for y-stream updates. For an ove
246249
====
247250
Before upgrading a WIF-enabled {product-title} cluster to a newer version, you must update the wif-config to that version as well. If you do not update the wif-config version before attempting to upgrade the cluster version, the cluster version upgrade will fail.
248251

249-
You can update a wif-config to a specific {product-title} version by running the following command:
252+
As part of Red{nbsp}Hat's ongoing commitment to the principle of least privilege, certain permissions previously assigned to the `osd-deployer` service account in WIF configurations have been removed. These changes help enhance the security of your clusters by ensuring that service accounts have only the permissions they need to perform their functions.
253+
254+
For the complete list of WIF configuration roles and their assigned permissions, see link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.19/vanilla.yaml[managed-cluster-config].
255+
256+
To align your existing WIF configurations with these updated permissions, you can run the `ocm gcp update wif-config` command. This command updates the WIF configuration to include the latest permissions and roles required for optimal operation.
257+
258+
When you update a wif-config or create a new one, ensure your {cluster-manager} CLI (`ocm`) is up to date. Not updating to the latest version of the `ocm` can result in error messages and service disruptions.
250259

260+
.Example output
261+
[source,text]
262+
----
263+
Error: failed to create wif-config: failed to create wif-config: status is 400, identifier is '400', code is 'CLUSTERS-MGMT-400', at '2025-10-06T15:18:37Z' and operation identifier is 'f9551d63-a58a-4e3c-b847-5f99ba1b0b74': Client version is out of date for WIF operations. Please update from vOCM-CLI/1.0.7 to v1.0.8 and try again.
264+
----
265+
266+
.Procedure
267+
. To check the version of your `ocm`, run the following command:
268+
+
269+
[source,terminal]
270+
----
271+
$ ocm version
272+
----
273+
+
274+
. Optional: If your `ocm` version is not the latest available, download and install the latest version from the link:https://console.redhat.com/openshift/downloads[Downloads] page on {cluster-manager}.
275+
+
276+
. Update a wif-config to a specific {product-title} version by running the following command:
277+
+
251278
[source,terminal]
252279
----
253280
ocm gcp update wif-config <wif_name> \ <1>
@@ -256,6 +283,90 @@ ocm gcp update wif-config <wif_name> \ <1>
256283
<1> Replace `<wif_name>` with the name of the WIF configuration you want to update.
257284
<2> Optional: Replace `<version>` with the {product-title} y-stream version you plan to update the cluster to. If you do not specify a version, the wif-config will be updated to support the latest {product-title} y-stream version as well as the last three {product-title} supported y-stream versions (beginning with version 4.17).
258285

286+
[id="wif-removing-stale-permissions_{context}"]
287+
== Removing stale permissions from service accounts managed by a WIF configuration
288+
289+
The stale set of permissions previously assigned to the `osd-deployer` service account will remain on the account after updating the wif-config. You need to manually access the roles and remove these stale permissions from them.
290+
291+
[id="wif-removing-stale-deployer-permissions_{context}"]
292+
=== Removing stale deployer permissions from service accounts managed by a WIF configuration
293+
294+
To remove the stale deployer permissions, run the following commands on a terminal with access to the Google Cloud project hosting the service accounts.
295+
296+
.Procedure
297+
298+
. Retrieve the existing role definition, ensuring the `PROJECT_ID` environment variable points to your Google Cloud project:
299+
+
300+
[source,terminal]
301+
----
302+
$ gcloud iam roles describe \
303+
osd_deployer_v4.18 \
304+
--project $PROJECT_ID \
305+
--format=yaml > /tmp/role.yaml
306+
----
307+
+
308+
. Remove the unwanted permissions. You can do this by filtering out the unwanted permissions from the role definition file and saving the updated definition to a new file:
309+
+
310+
[source,terminal]
311+
----
312+
$ cat /tmp/role.yaml | \
313+
grep -v "resourcemanager.projects.setIamPolicy" | \
314+
grep -v "iam.serviceAccounts.signBlob" | \
315+
grep -v "iam.serviceAccounts.actAs" > /tmp/updated_role.yaml
316+
----
317+
+
318+
. Review the changes in the output between the original and updated role definitions to ensure only the unwanted permissions have been removed:
319+
+
320+
[source,terminal]
321+
----
322+
$ diff /tmp/role.yaml /tmp/updated_role.yaml
323+
----
324+
+
325+
. Update the role in Google Cloud with the updated role definition file, ensuring the `PROJECT_ID` environment variable points to your Google Cloud project:
326+
+
327+
[source,terminal]
328+
----
329+
$ gcloud iam roles update \
330+
osd_deployer_v4.18 \
331+
--project=$PROJECT_ID \
332+
--file=/tmp/updated_role.yaml
333+
----
334+
335+
[id="wif-removing-stale-support-permissions_{context}"]
336+
=== Removing stale support permissions from service accounts managed by a WIF configuration
337+
338+
To remove stale support permissions, run the following commands on a terminal with access to the Google Cloud project hosting the service accounts.
339+
340+
.Procedure
341+
342+
. Retrieve the existing role defintion, ensuring the `PROJECT_ID` environment variable points to your Google Cloud project:
343+
+
344+
[source,terminal]
345+
----
346+
$ gcloud iam roles describe sre_managed_support --project $PROJECT_ID --format=yaml > /tmp/role.yaml
347+
----
348+
+
349+
. Remove the unwanted permissions. You can do this by filtering out the unwanted permissions from the role definition file and saving the updated definition to a new file:
350+
+
351+
[source,terminal]
352+
----
353+
$ cat /tmp/role.yaml | grep -v "compute.firewalls.create" > /tmp/updated_role.yaml
354+
----
355+
+
356+
. Review the changes in the output between the original and updated role definitions to ensure only the unwanted permissions have been removed:
357+
+
358+
[source,terminal]
359+
----
360+
$ diff /tmp/role.yaml /tmp/updated_role.yaml
361+
----
362+
+
363+
. Update the role in Google Cloud with the updated role definition file, ensuring the `PROJECT_ID` environment variable points to your Google Cloud project:
364+
+
365+
[source,terminal]
366+
----
367+
$ gcloud iam roles update sre_managed_support --project $PROJECT_ID --file=/tmp/updated_role.yaml
368+
----
369+
259370
[id="ocm-cli-verify-wif-commands_{context}"]
260371
== Verifying a WIF configuration
261372
You can verify that the configuration of resources associated with a WIF configuration are correct by running the `ocm gcp verify wif-config` command. If a misconfiguration is found, the output provides details about the misconfiguration and recommends that you update the WIF configuration.

modules/gcp-limits.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A standard {product-title} cluster uses the following resources. Note that some
2121
|Resources removed after bootstrap
2222

2323

24-
|Service account |IAM |Global |5 |0
24+
|Service account |IAM |Global |10 |0
2525
|Firewall Rules |Compute |Global |11 |1
2626
|Forwarding Rules |Compute |Global |2 |0
2727
|In-use global IP addresses |Compute |Global |4 |1

osd_whats_new/osd-whats-new.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,21 @@ With its foundation in Kubernetes, {product-title} is a complete {OCP} cluster p
1717

1818
[id="osd-q3-2025_{context}"]
1919
=== Q3 2025
20+
21+
* **Updates to Workload Identity Federation (WIF) permissions and roles.**
22+
The default IAM permissions for WIF in the link:https://github.com/openshift/managed-cluster-config/blob/master/resources/wif/4.19/vanilla.yaml[managed-cluster-config] template have been updated. This means newly created WIF configurations will have fewer, less overly permissive permissions by default.
23+
** The `[email protected]` principal no longer needs the `compute.firewalls.create` permission. If Red{nbsp}Hat SREs ever need this permission, they will reach out through a support case.
24+
** The `osd-deployer` service account no longer requires the `resourcemanager.projects.setIamPolicy` permission, which has been removed.
25+
** The `osd-deployer` service account no longer uses the `iam.serviceAccounts.signBlob` permission. This has been replaced with the `iam.serviceAccountTokenCreator` role, which is now specifically assigned to the service accounts that require it.
26+
** The `osd-deployer` service account no longer uses the `iam.serviceAccounts.actAs` permission. This has been replaced with the `iam.serviceAccountUser` role, which is now specifically assigned to the service accounts that require it.
27+
28+
If you have existing `wif-config` instances, you can get these new, less permissive permissions by running the `ocm gcp update wif-config` command. For more information, see xref:../osd_gcp_clusters/creating-a-gcp-cluster-with-workload-identity-federation.adoc#wif-configuration-update_osd-creating-a-cluster-on-gcp-with-workload-identity-federation[Updating a WIF configuration].
29+
2030
* **Workload Identify Federation (WIF) is now the default authentication type for {product-title} clusters on {GCP}.**
2131
In alignment with the principle of least privilege as well as Google Cloud's preferred method of credential authentication, WIF is now the default authentication type when creating an {product-title} cluster on {GCP}. WIF greatly improves an {product-title} cluster's resilience against unauthorized access by using short-lived, least-privilege credentials and eliminating the need for static service account keys. For more information, see xref:../osd_gcp_clusters/creating-a-gcp-cluster-with-workload-identity-federation.adoc[Creating a cluster on GCP with Workload Identity Federation authentication].
2232

2333
* **Support for managing workload identity pools and providers in a dedicated {GCP} project.**
24-
{product-title} on {GCP} now supports the option of creating and managing workload identity pools and providers in a specified dedicated project during the creation of a WIF configuration. Red{nbsp}Hat plans on offering this option for existing WIF configurations in an upcoming release. For more information, see xref:../osd_gcp_clusters/creating-a-gcp-cluster-with-workload-identity-federation.adoc#create-wif-configuration_osd-creating-a-cluster-on-gcp-with-workload-identity-federation[Creating a WIF configuration].
34+
{product-title} on {GCP} now supports the option of creating and managing workload identity pools and providers in a specified dedicated project during the creation of a WIF configuration. Red{nbsp}Hat plans on offering this option for existing WIF configurations in an upcoming release. For more information, see xref:../osd_gcp_clusters/creating-a-gcp-cluster-with-workload-identity-federation.adoc#create-wif-configuration_osd-creating-a-cluster-on-gcp-with-workload-identity-federation[Creating a WIF configuration].
2535

2636

2737

@@ -36,8 +46,6 @@ If your cluster uses the OpenShift SDN network plugin, you cannot upgrade to fut
3646
For more information about migrating to OVN-Kubernetes, see xref:../networking/ovn_kubernetes_network_provider/migrate-from-openshift-sdn-osd.adoc#migrate-from-openshift-sdn[Migrating from OpenShift SDN network plugin to OVN-Kubernetes network plugin].
3747

3848
* **New version of {product-title} available.** {product-title} on {gcp} and {product-title} on {aws} versions 4.19 are now available for new clusters.
39-
// re-add once upgrade to 4.19 is available
40-
// For more information about upgrading to this latest version, see xref:../upgrading/osd-upgrades.adoc#osd-upgrades[Red Hat OpenShift Dedicated cluster upgrades].
4149

4250
* **Support for enabling and disabling Secure Boot for Shielded VMs on a per machine basis.**
4351
{product-title} on {GCP} users can now enable or disable Secure Boot for Shielded VMs on a per machine basis. For more information, see xref:../osd_cluster_admin/osd_nodes/osd-managing-worker-nodes.adoc#osd-managing-worker-nodes[Managing compute nodes].

0 commit comments

Comments
 (0)