Skip to content

Commit c591202

Browse files
authored
Merge pull request #65268 from bmcelvee/ingress-controller-edit
Ingress controller edit
2 parents 3350cf2 + 4b5491f commit c591202

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Topics:
8585
- Name: ROSA prerequisites
8686
File: rosa-mobb-prerequisites-tutorial
8787
- Name: Configuring ROSA/OSD to use custom TLS ciphers on the ingress controllers
88-
File: rosa-mobb-configure-custom-tls-ciphers
88+
File: cloud-experts-configure-custom-tls-ciphers
8989
- Name: Verifying Permissions for a ROSA STS Deployment
9090
File: rosa-mobb-verify-permissions-sts-deployment
9191
---

cloud_experts_tutorials/rosa-mobb-configure-custom-tls-ciphers.adoc renamed to cloud_experts_tutorials/cloud-experts-configure-custom-tls-ciphers.adoc

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
:_content-type: ASSEMBLY
2-
[id="rosa-mobb-configure-cutsom-tls-ciphers"]
3-
= Tutorial: Configuring ROSA/OSD to use custom TLS ciphers on the ingress controllers
2+
[id="cloud-experts-configure-custom-tls-ciphers"]
3+
= Tutorial: Configuring ROSA/OSD to use custom TLS ciphers on the Ingress Controller
44
include::_attributes/attributes-openshift-dedicated.adoc[]
5-
:context: rosa-mobb-configure-cutsom-tls-ciphers
5+
:context: cloud-experts-configure-custom-tls-ciphers
66

77
toc::[]
88

99
// ---
1010
// date: '2022-08-24'
11-
// title: Configure ROSA/OSD to use custom TLS ciphers on the ingress controllers
11+
// title: Configure ROSA/OSD to use custom TLS ciphers on the Ingress Controller
1212
// aliases: ['/docs/ingress/tls-cipher-customization']
1313
// tags: ["ROSA", "AWS", "OSD"]
1414
// authors:
1515
// - Michael McNeill
1616
// - Connor Wooley
1717
// ---
1818

19-
This guide demonstrates how to properly patch the cluster ingress controllers, as well as ingress controllers created by the Custom Domain Operator.
20-
This functionality allows customers to modify the `tlsSecurityProfile` value on cluster ingress controllers.
21-
This guide will demonstrate how to apply a custom `tlsSecurityProfile`, a scoped service account (with the associated role and role binding), and a CronJob that the cipher changes are reapplied with 60 minutes (in the event that an ingress controller is recreated or modified).
19+
include::snippets/mobb-support-statement.adoc[leveloffset=+1]
20+
//Adding the support statement based on a conversation with Michael McNeill
21+
22+
This guide demonstrates how to properly patch the cluster Ingress Controllers, as well as Ingress Controllers created by the Custom Domain Operator.
23+
This functionality allows customers to modify the `tlsSecurityProfile` value on cluster Ingress Controllers.
24+
This guide demonstrates how to apply a custom `tlsSecurityProfile`, a scoped service account with the associated role and role binding, and a CronJob that the cipher changes are reapplied with 60 minutes in the event that an Ingress Controller is recreated or modified.
2225

2326
.Prerequisites
2427

25-
* Review the link:https://docs.openshift.com/container-platform/4.13/networking/ingress-operator.html#configuring-ingress-controller-tls[OpenShift Documentation that explains the options for the `tlsSecurityProfile`]. By default, ingress controllers are configured to use the `Intermediate` profile, which corresponds to the link:https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29[Intermediate Mozilla profile].
28+
* Review the link:https://docs.openshift.com/container-platform/4.13/networking/ingress-operator.html#configuring-ingress-controller-tls[OpenShift Documentation that explains the options for the `tlsSecurityProfile`]. By default, Ingress Controllers are configured to use the `Intermediate` profile, which corresponds to the link:https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29[Intermediate Mozilla profile].
2629
2730
.Procedure
2831

@@ -36,47 +39,47 @@ To create a service account, run the following command:
3639
$ oc create sa cron-ingress-patch-sa -n openshift-ingress-operator
3740
----
3841

39-
. Create a role and role binding that allows limited access to patch the ingress controllers.
42+
. Create a role and role binding that allows limited access to patch the Ingress Controllers.
4043
+
4144
Role-based access control (RBAC) is critical to ensuring security inside your cluster.
42-
Creating a role allows us to provide scoped access to only the API resources we need within the cluster. To create the role, run the following command:
45+
Creating a role allows us to provide scoped access to only the API resources needed within the cluster. To create the role, run the following command:
4346
+
4447
[source,terminal]
4548
----
4649
$ oc create role cron-ingress-patch-role --verb=get,patch,update --resource=ingresscontroller.operator.openshift.io -n openshift-ingress-operator
4750
----
4851
+
49-
Once the role has been created, you need to bind the role to the service account using a role binding.
52+
Once the role has been created, you must bind the role to the service account using a role binding.
5053
To create the role binding, run the following command:
5154
+
5255
[source,terminal]
5356
----
5457
$ oc create rolebinding cron-ingress-patch-rolebinding --role=cron-ingress-patch-role --serviceaccount=openshift-ingress-operator:cron-ingress-patch-sa -n openshift-ingress-operator
5558
----
5659

57-
. Patch the ingress controller.
60+
. Patch the Ingress Controllers.
5861
+
5962
[IMPORTANT]
6063
====
61-
The examples provided below add an additional cipher to the ingress controller's `tlsSecurityProfile` to allow IE 11 access from Windows Server 2008 R2.
62-
You should modify this command to meet your specific business requirements.
64+
The examples provided below add an additional cipher to the Ingress Controller's `tlsSecurityProfile` to allow IE 11 access from Windows Server 2008 R2.
65+
Modify this command to meet your specific business requirements.
6366
====
6467
+
65-
Before we create the CronJob, we first want to apply the `tlsSecurityProfile` configuration to validate our changes.
68+
Before creating the CronJob, apply the `tlsSecurityProfile` configuration to validate changes.
6669
This process depends on if you are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator].
6770
+
6871
.. Clusters not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator]:
6972
+
70-
If you are only using the default ingress controller, and not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], run the following command to patch the ingress controller:
73+
If you are only using the default Ingress Controller, and not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], run the following command to patch the Ingress Controller:
7174
+
7275
[source,terminal]
7376
----
7477
$ oc patch ingresscontroller/default -n openshift-ingress-operator --type=merge -p '{"spec":{"tlsSecurityProfile":{"type":"Custom","custom":{"ciphers":["TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-ECDSA-CHACHA20-POLY1305","ECDHE-RSA-CHACHA20-POLY1305","DHE-RSA-AES128-GCM-SHA256","DHE-RSA-AES256-GCM-SHA384","TLS_CHACHA20_POLY1305_SHA256","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"],"minTLSVersion":"VersionTLS12"}}}}'
7578
----
7679
+
77-
This patch will add the `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA` cipher which allows access from IE 11 on Windows Server 2008 R2 when using RSA certificates.
80+
This patch adds the `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA` cipher which allows access from IE 11 on Windows Server 2008 R2 when using RSA certificates.
7881
+
79-
Once you have run the command, you will receive a response that looks like this:
82+
Once you run the command, you will receive a response that looks like this:
8083
+
8184
.Example output
8285
[source,terminal]
@@ -86,15 +89,15 @@ ingresscontroller.operator.openshift.io/default patched
8689
+
8790
.. Clusters using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator]:
8891
+
89-
Customers who are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator] will need to loop through each of their ingress controllers to patch each one.
90-
To patch all of your cluster's ingress controllers, run the following command:
92+
Customers who are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator] need to loop through each of their Ingress Controllers to patch each one.
93+
To patch all of your cluster's Ingress Controllers, run the following command:
9194
+
9295
[source,terminal]
9396
----
9497
$ for ic in $(oc get ingresscontroller -o name -n openshift-ingress-operator); do oc patch ${ic} -n openshift-ingress-operator --type=merge -p '{"spec":{"tlsSecurityProfile":{"type":"Custom","custom":{"ciphers":["TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-ECDSA-CHACHA20-POLY1305","ECDHE-RSA-CHACHA20-POLY1305","DHE-RSA-AES128-GCM-SHA256","DHE-RSA-AES256-GCM-SHA384","TLS_CHACHA20_POLY1305_SHA256","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"],"minTLSVersion":"VersionTLS12"}}}}'; done
9598
----
9699
+
97-
Once you have run the command, you will receive a response that looks like this:
100+
Once you run the command, you will receive a response that looks like this:
98101
+
99102
.Example output
100103
[source,terminal]
@@ -106,13 +109,13 @@ ingresscontroller.operator.openshift.io/custom2 patched
106109

107110
. Create the CronJob to ensure that the TLS configuration is not overwritten.
108111
+
109-
Occasionally, the cluster's ingress controller can get recreated. In these cases, the ingress controller will likely not retain the `tlsSecurityProfile` changes that we have made.
110-
To ensure this does not happen, we will create a CronJob that goes through and updates the cluster's ingress controller(s).
112+
Occasionally, the cluster's Ingress Controllers can get recreated. In these cases, the Ingress Controller will likely not retain the `tlsSecurityProfile` changes that were applied.
113+
To ensure this does not happen, create a CronJob that goes through and updates the cluster's Ingress Controllers.
111114
This process depends on if you are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator].
112115
+
113116
.. Clusters not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator]:
114117
+
115-
If you are not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], creating the CronJob is as simple as running the following command:
118+
If you are not using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], create the CronJob by running the following command:
116119
+
117120
[source,terminal]
118121
----
@@ -142,9 +145,9 @@ EOF
142145
+
143146
[NOTE]
144147
====
145-
This CronJob will run every hour, and will patch the ingress controller, if necessary.
148+
This CronJob runs every hour and patches the Ingress Controllers, if necessary.
146149
It is important that this CronJob does not run constantly, as it can trigger reconciles that could overload the OpenShift Ingress Operator.
147-
Most of the time, the logs of the CronJob pod will look something like this, as it will not be changing anything:
150+
Most of the time, the logs of the CronJob pod looks like the following example, as it will not be changing anything:
148151
149152
.Example output
150153
[source,terminal]
@@ -155,7 +158,7 @@ ingresscontroller.operator.openshift.io/default patched (no change)
155158
+
156159
.. Clusters using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator]:
157160
+
158-
If you are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], the CronJob will need to loop through and patch each ingress controller.
161+
If you are using the xref:../applications/deployments/osd-config-custom-domains-applications.adoc#osd-config-custom-domains-applications[Custom Domain Operator], the CronJob needs to loop through and patch each Ingress Controller.
159162
To create this CronJob, run the following command:
160163
+
161164
[source,terminal]
@@ -186,7 +189,7 @@ EOF
186189
+
187190
[NOTE]
188191
====
189-
This CronJob will run every hour, and will patch the ingress controller, if necessary. It is important that this CronJob does not run constantly, as it can trigger reconciles that could overload the OpenShift Ingress Operator. Most of the time, the logs of the CronJob pod will look something like this, as it will not be changing anything:
192+
This CronJob runs every hour and patches the Ingress Controllers, if necessary. It is important that this CronJob does not run constantly, as it can trigger reconciles that could overload the OpenShift Ingress Operator. Most of the time, the logs of the CronJob pod will look something like this, as it will not be changing anything:
190193
191194
.Example output
192195
[source,terminal]

0 commit comments

Comments
 (0)