Skip to content

Commit 77f709c

Browse files
committed
OSDOCS-9614: Created documentation to create a ROSA with HCP cluster that uses external auth for OIDC
1 parent 1a8cd89 commit 77f709c

10 files changed

+556
-5
lines changed

_attributes/attributes-openshift-dedicated.adoc

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:experimental:
66
:imagesdir: images
77
:OCP: OpenShift Container Platform
8+
:OCP-short: OpenShift
89
:ocp-version: 4.14
910
:op-system-first: Red Hat Enterprise Linux CoreOS (RHCOS)
1011
:cluster-manager-first: Red Hat OpenShift Cluster Manager
@@ -21,6 +22,9 @@
2122
:rhq-short: Red Hat Quay
2223
:SMProductName: Red Hat OpenShift Service Mesh
2324
:pipelines-title: Red Hat OpenShift Pipelines
25+
:sts-first: Security Token Service (STS)
26+
:sts-full: Security Token Service
27+
:sts-short: STS
2428
//logging
2529
:logging-title: logging for Red Hat OpenShift
2630
:logging-title-uc: Logging for Red Hat OpenShift
@@ -47,4 +51,3 @@
4751
:hcp-title: ROSA with HCP
4852
:hcp-title-first: {product-title} (ROSA) with {hcp} (HCP)
4953
//ROSA CLI variables
50-
:word: Testing this variable let's go www.google.com

_topic_maps/_topic_map_rosa.yml

+2
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ Topics:
227227
File: rosa-hcp-creating-cluster-with-aws-kms-key
228228
- Name: Creating a private cluster on ROSA with HCP
229229
File: rosa-hcp-aws-private-creating-cluster
230+
- Name: Creating ROSA with HCP clusters with external authentication
231+
File: rosa-hcp-sts-creating-a-cluster-ext-auth
230232
- Name: Using the Node Tuning Operator on ROSA with HCP
231233
File: rosa-tuning-config
232234
- Name: Deleting a ROSA with HCP cluster

modules/rosa-create-objects.adoc

+78
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,84 @@ Create a cluster with autoscaling enabled on the default worker machine pool.
273273
$ rosa create cluster --cluster-name=mycluster -region=us-east-1 --enable-autoscaling --min-replicas=2 --max-replicas=5
274274
----
275275

276+
[id="rosa-create-external-auth-provider_{context}"]
277+
== create external-auth-provider
278+
279+
Add an external identity provider instead of the {OCP-short} OAuth2 server.
280+
281+
[IMPORTANT]
282+
====
283+
You can only use external authentication providers on {hcp-title} clusters.
284+
====
285+
286+
.Syntax
287+
[source,terminal]
288+
----
289+
$ rosa create external-auth-provider --cluster=<cluster_name> | <cluster_id> [arguments]
290+
----
291+
292+
.Arguments
293+
[cols="30,70"]
294+
|===
295+
|Option |Definition
296+
297+
|--claim-mapping-groups-claim <string>
298+
|Required. Describes rules on how to transform information from an ID token into a cluster identity.
299+
300+
|--claim-validation-rule <strings>
301+
|Rules that are applied to validate token claims to authenticate users. The input will be in a `<claim>:<required_value>` format. To have multiple claim validation rules, you can separate the values by `,`. For example, `<claim>:<required_value>,<claim>:<required_value> format`.
302+
303+
|--claim-mapping-username-claim <string>
304+
|The name of the claim that should be used to construct user names for the cluster identity.
305+
306+
a|--cluster <cluster_name>\|<cluster_id>
307+
|Required. The name or ID of the cluster to which the IDP will be added.
308+
309+
|--console-client-id <string>
310+
|The identifier of the OIDC client from the OIDC provider for the {cluster-manager-url} web console.
311+
312+
|--console-client-secret <string>
313+
|The secret that is associated with the console application registration.
314+
315+
|--issuer-audiences <strings>
316+
|An array of audiences to check the incoming tokens against. Valid tokens must include at least one of these values in their audience claim.
317+
318+
|--issuer-ca-file <string>
319+
|The path to the PEM-encoded certificate file to use when making requests to the server.
320+
321+
|--issuer-url <string>
322+
|The serving URL of the token issuer.
323+
324+
|--name <string>
325+
|A name that is used to refer to the external authentication provider.
326+
|===
327+
328+
.Optional arguments inherited from parent commands
329+
[cols="30,70"]
330+
|===
331+
|Option |Definition
332+
333+
|--help
334+
|Shows help for this command.
335+
336+
|--debug
337+
|Enables debug mode.
338+
339+
|--interactive
340+
|Enables interactive mode.
341+
342+
|--profile
343+
|Specifies an AWS profile string from your credentials file.
344+
|===
345+
346+
.Examples
347+
Add a Microsoft Entra ID identity provider to a cluster named `mycluster`.
348+
349+
[source,terminal]
350+
----
351+
$ rosa create external-auth-provider --cluster=mycluster --name <provider_name> --issuer-audiences <audience_id> --issuer-url <issuing id> --claim-mapping-username-claim email --claim-mapping-groups-claim groups
352+
----
353+
276354
[id="rosa-create-idp_{context}"]
277355
== create idp
278356

modules/rosa-delete-objects.adoc

+49
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,55 @@ Delete a cluster named `mycluster`.
109109
$ rosa delete cluster --cluster=mycluster
110110
----
111111

112+
[id="rosa-delete-external-auth-provider_{context}"]
113+
== delete external-auth-provider
114+
115+
Deletes an external authentication provider from a cluster.
116+
117+
.Syntax
118+
[source,terminal]
119+
----
120+
$ rosa delete external-auth-provider <name_of_external_auth_provider> --cluster=<cluster_name> | <cluster_id> [arguments]
121+
----
122+
123+
.Arguments
124+
[cols="30,70"]
125+
|===
126+
|Option |Definition
127+
128+
|--cluster
129+
|Required. The name or ID string of the cluster the external auth provider will be deleted from.
130+
|===
131+
132+
.Optional arguments inherited from parent commands
133+
[cols="30,70"]
134+
|===
135+
|Option |Definition
136+
137+
|--help
138+
|Shows help for this command.
139+
140+
|--debug
141+
|Enables debug mode.
142+
143+
|--interactive
144+
|Enables interactive mode.
145+
146+
|--profile
147+
|Specifies an AWS profile string from your credentials file.
148+
149+
|--yes
150+
|Automatically answers `yes` to confirm the operation.
151+
|===
152+
153+
.Example
154+
Delete an identity provider named `exauth-1` from a cluster named `mycluster`.
155+
156+
[source,terminal]
157+
----
158+
$ rosa delete external-auth-provider exauth-1 --cluster=mycluster
159+
----
160+
112161
[id="rosa-delete-idp_{context}"]
113162
== delete idp
114163

modules/rosa-hcp-sts-creating-a-cluster-cli.adoc

+6-4
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,18 @@ If you specified custom ARN paths when you created the associated account-wide r
5858
+
5959
[source,terminal]
6060
----
61-
$ rosa create cluster --private --cluster-name=<cluster_name> \
62-
--mode=auto --hosted-cp --operator-roles-prefix=$OPERATOR_ROLES_PREFIX \
63-
--oidc-config-id=$OIDC_ID --subnet-ids=$SUBNET_IDS
61+
$ rosa create cluster --private --cluster-name=<cluster_name> \
62+
--mode=auto --hosted-cp --operator-roles-prefix=$OPERATOR_ROLES_PREFIX \
63+
--oidc-config-id=$OIDC_ID --subnet-ids=$SUBNET_IDS
6464
----
6565
+
6666
* If you set the environmental variables, create a cluster with a single, initial machine pool, a publicly available API, and a publicly available Ingress by running the following command:
6767
+
6868
[source,terminal]
6969
----
70-
$ rosa create cluster --cluster-name=<cluster_name> --mode=auto --hosted-cp --operator-roles-prefix=$OPERATOR_ROLES_PREFIX --oidc-config-id=$OIDC_CONFIG --subnet-ids=$SUBNET_IDS
70+
$ rosa create cluster --cluster-name=<cluster_name> --mode=auto \
71+
--hosted-cp --operator-roles-prefix=$OPERATOR_ROLES_PREFIX \
72+
--oidc-config-id=$OIDC_CONFIG --subnet-ids=$SUBNET_IDS
7173
----
7274
+
7375
. Check the status of your cluster by running the following command:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="rosa-hcp-sts-creating-a-cluster-external-auth-cluster-cli_{context}"]
7+
= Creating a {hcp-title} cluster that uses external authentication providers
8+
:source-highlighter: pygments
9+
:pygments-style: emacs
10+
:icons: font
11+
12+
Use the `--external-auth-providers-enabled` flag in the ROSA CLI to create a cluster that uses an external authentication service.
13+
14+
[NOTE]
15+
====
16+
When creating a {hcp-title} cluster, the default machine Classless Inter-Domain Routing (CIDR) is `10.0.0.0/16`. If this does not correspond to the CIDR range for your VPC subnets, add `--machine-cidr <address_block>` to the following commands.
17+
====
18+
19+
.Procedure
20+
21+
* If you used the `OIDC_ID`, `SUBNET_IDS`, and `OPERATOR_ROLES_PREFIX` variables to prepare your environment, you can continue to use those variables when creating your cluster. For example, run the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ rosa create cluster --hosted-cp --subnet-ids=$SUBNET_IDS \
26+
--oidc-config-id=$OIDC_ID --cluster-name=<cluster_name> \
27+
--operator-roles-prefix=$OPERATOR_ROLES_PREFIX \
28+
--external-auth-providers-enabled
29+
----
30+
31+
* If you did not set environmental variables, run the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ rosa create cluster --cluster-name=<cluster_name> --sts --mode=auto \
36+
--hosted-cp --operator-roles-prefix <operator-role-prefix> \
37+
--oidc-config-id <ID-of-OIDC-configuration> \
38+
--external-auth-providers-enabled \
39+
--subnet-ids=<public-subnet-id>,<private-subnet-id>
40+
----
41+
42+
.Verification
43+
. Verify that your external authentication is enabled <.> in the cluster details by running the following command:
44+
+
45+
[source,terminal]
46+
----
47+
$ rosa describe cluster --cluster=<cluster_name>
48+
----
49+
+
50+
.Example output
51+
[source,terminal,highlight='50']
52+
----
53+
Name: rosa-ext-test
54+
Display Name: rosa-ext-test
55+
ID: <cluster_id>
56+
External ID: <cluster_ext_id>
57+
Control Plane: ROSA Service Hosted
58+
OpenShift Version: 4.Y.Z
59+
Channel Group: stable
60+
DNS: <dns>
61+
AWS Account: <AWS_id>
62+
AWS Billing Account: <AWS_id>
63+
API URL: <ocm_api>
64+
Console URL:
65+
Region: us-east-1
66+
Availability:
67+
- Control Plane: MultiAZ
68+
- Data Plane: SingleAZ
69+
70+
Nodes:
71+
- Compute (desired): 2
72+
- Compute (current): 0
73+
Network:
74+
- Type: OVNKubernetes
75+
- Service CIDR: <service_cidr>
76+
- Machine CIDR: <machine_cidr>
77+
- Pod CIDR: <pod_cidr>
78+
- Host Prefix: /23
79+
- Subnets: <subnet_ids>
80+
EC2 Metadata Http Tokens: optional
81+
Role (STS) ARN: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Installer-Role
82+
Support Role ARN: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Support-Role
83+
Instance IAM Roles:
84+
- Worker: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Worker-Role
85+
Operator IAM Roles:
86+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-cloud-network-config-controller-clo
87+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-capa-controller-manager
88+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-control-plane-operator
89+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-kms-provider
90+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-kube-controller-manager
91+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-image-registry-installer-cloud-cred
92+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-ingress-operator-cloud-credentials
93+
- arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-cluster-csi-drivers-ebs-cloud-crede
94+
Managed Policies: Yes
95+
State: ready
96+
Private: No
97+
Created: Jan 01 2030 14:25:52 UTC
98+
User Workload Monitoring: Enabled
99+
Details Page: https://<url>
100+
OIDC Endpoint URL: https://<endpoint> (Managed)
101+
Audit Log Forwarding: Disabled
102+
External Authentication: Enabled <.>
103+
----
104+
105+
. Watch the {hcp-title} installation program logs to track the progress of the cluster creation by running the following command:
106+
+
107+
[source,terminal]
108+
----
109+
$ rosa logs install --cluster=<cluster_name> --watch <1>
110+
----
111+
<1> Optional: To watch for new log messages as the installation progresses, use the `--watch` argument.

0 commit comments

Comments
 (0)