Skip to content

Commit e1f2bd5

Browse files
committed
[OSDOCS-3990] Re-home 'Admin credentials root secret format'
1 parent 883a2ee commit e1f2bd5

File tree

9 files changed

+139
-63
lines changed

9 files changed

+139
-63
lines changed

authentication/managing_cloud_provider_credentials/cco-mode-mint.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ The credential you provide for mint mode in GCP must have the following permissi
4949
* `resourcemanager.projects.getIamPolicy`
5050
* `resourcemanager.projects.setIamPolicy`
5151

52+
//Admin credentials root secret format
53+
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
54+
5255
//Mint Mode with removal or rotation of the admin credential
5356
include::modules/mint-mode-with-removal-of-admin-credential.adoc[leveloffset=+1]
5457

authentication/managing_cloud_provider_credentials/cco-mode-passthrough.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,16 @@ To install an {product-title} cluster on VMware vSphere, the CCO requires a cred
8787

8888
|====
8989

90+
//Admin credentials root secret format
91+
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
92+
9093
[id="passthrough-mode-maintenance"]
9194
== Passthrough mode credential maintenance
9295
If `CredentialsRequest` CRs change over time as the cluster is upgraded, you must manually update the passthrough mode credential to meet the requirements. To avoid credentials issues during an upgrade, check the `CredentialsRequest` CRs in the release image for the new version of {product-title} before upgrading. To locate the `CredentialsRequest` CRs that are required for your cloud provider, see _Manually creating IAM_ for xref:../../installing/installing_aws/manually-creating-iam.adoc#manually-creating-iam-aws[AWS], xref:../../installing/installing_azure/manually-creating-iam-azure.adoc#manually-creating-iam-azure[Azure], or xref:../../installing/installing_gcp/manually-creating-iam-gcp.adoc#manually-creating-iam-gcp[GCP].
9396

97+
//Rotating cloud provider credentials manually
98+
include::modules/manually-rotating-cloud-creds.adoc[leveloffset=+2]
99+
94100
[id="passthrough-mode-reduce-permissions"]
95101
== Reducing permissions after installation
96102
When using passthrough mode, each component has the same permissions used by all other components. If you do not reduce the permissions after installing, all components have the broad permissions that are required to run the installer.

installing/installing_aws/manually-creating-iam.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ include::modules/manually-create-identity-access-management.adoc[leveloffset=+1]
3030
* xref:../../updating/updating-cluster-within-minor.adoc#manually-maintained-credentials-upgrade_updating-cluster-within-minor[Updating a cluster using the web console]
3131
* xref:../../updating/updating-cluster-cli.adoc#manually-maintained-credentials-upgrade_updating-cluster-cli[Updating a cluster using the CLI]
3232
33-
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
34-
3533
include::modules/mint-mode.adoc[leveloffset=+1]
3634

3735
include::modules/mint-mode-with-removal-of-admin-credential.adoc[leveloffset=+1]

installing/installing_azure/manually-creating-iam-azure.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ include::modules/manually-create-identity-access-management.adoc[leveloffset=+1]
2121
* xref:../../updating/updating-cluster-within-minor.adoc#manually-maintained-credentials-upgrade_updating-cluster-within-minor[Updating a cluster using the web console]
2222
* xref:../../updating/updating-cluster-cli.adoc#manually-maintained-credentials-upgrade_updating-cluster-cli[Updating a cluster using the CLI]
2323
24-
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
25-
2624
[id="manually-creating-iam-azure-next-steps"]
2725
== Next steps
2826

installing/installing_azure_stack_hub/manually-creating-iam-azure-stack-hub.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ include::modules/alternatives-to-storing-admin-secrets-in-kube-system.adoc[level
2222
2323
include::modules/manually-create-identity-access-management.adoc[leveloffset=+1]
2424

25-
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
26-
2725
include::modules/manually-maintained-credentials-upgrade.adoc[leveloffset=+1]
2826

2927
[id="next-steps_manually-creating-iam-azure-stack-hub"]

installing/installing_gcp/manually-creating-iam-gcp.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ include::modules/manually-create-identity-access-management.adoc[leveloffset=+1]
2525
* xref:../../updating/updating-cluster-within-minor.adoc#manually-maintained-credentials-upgrade_updating-cluster-within-minor[Updating a cluster using the web console]
2626
* xref:../../updating/updating-cluster-cli.adoc#manually-maintained-credentials-upgrade_updating-cluster-cli[Updating a cluster using the CLI]
2727
28-
include::modules/admin-credentials-root-secret-formats.adoc[leveloffset=+1]
29-
3028
include::modules/mint-mode.adoc[leveloffset=+1]
3129

3230
include::modules/mint-mode-with-removal-of-admin-credential.adoc[leveloffset=+1]
Lines changed: 72 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// Module included in the following assemblies:
22
//
3-
// * installing/installing_aws/manually-creating-iam.adoc
3+
// * authentication/managing_cloud_provider_credentials/cco-mode-mint.adoc
4+
// * authentication/managing_cloud_provider_credentials/cco-mode-passthrough.adoc
45

5-
ifeval::["{context}" == "manually-creating-iam-aws"]
6-
:aws:
6+
ifeval::["{context}" == "cco-mode-mint"]
7+
:mint:
78
endif::[]
8-
ifeval::["{context}" == "manually-creating-iam-azure"]
9-
:azure:
10-
endif::[]
11-
ifeval::["{context}" == "manually-creating-iam-gcp"]
12-
:google-cloud-platform:
9+
ifeval::["{context}" == "cco-mode-passthrough"]
10+
:passthrough:
1311
endif::[]
1412

1513
:_content-type: REFERENCE
@@ -19,18 +17,11 @@ endif::[]
1917
Each cloud provider uses a credentials root secret in the `kube-system`
2018
namespace by convention, which is then used to satisfy all credentials requests
2119
and create their respective secrets.
22-
ifndef::azure[]
2320
This is done either by minting new credentials with _mint mode_, or by copying the credentials root secret with _passthrough mode_.
24-
endif::azure[]
25-
ifdef::azure[]
26-
This is done by copying the credentials root secret with _passthrough mode_.
27-
endif::azure[]
2821

2922
The format for the secret varies by cloud, and is also used for each
3023
`CredentialsRequest` secret.
3124

32-
ifdef::aws[]
33-
3425
.Amazon Web Services (AWS) secret format
3526

3627
[source,yaml]
@@ -41,13 +32,11 @@ metadata:
4132
namespace: kube-system
4233
name: aws-creds
4334
stringData:
44-
aws_access_key_id: <AccessKeyID>
45-
aws_secret_access_key: <SecretAccessKey>
35+
aws_access_key_id: <base64-encoded_access_key_id>
36+
aws_secret_access_key: <base64-encoded_secret_access_key>
4637
----
4738

48-
endif::aws[]
49-
50-
ifdef::azure[]
39+
ifdef::passthrough[]
5140

5241
.Microsoft Azure secret format
5342

@@ -59,13 +48,13 @@ metadata:
5948
namespace: kube-system
6049
name: azure-credentials
6150
stringData:
62-
azure_subscription_id: <SubscriptionID>
63-
azure_client_id: <ClientID>
64-
azure_client_secret: <ClientSecret>
65-
azure_tenant_id: <TenantID>
66-
azure_resource_prefix: <ResourcePrefix>
67-
azure_resourcegroup: <ResourceGroup>
68-
azure_region: <Region>
51+
azure_subscription_id: <base64-encoded_subscription_id>
52+
azure_client_id: <base64-encoded_client_id>
53+
azure_client_secret: <base64-encoded_client_secret>
54+
azure_tenant_id: <base64-encoded_tenant_id>
55+
azure_resource_prefix: <base64-encoded_resource_prefix>
56+
azure_resourcegroup: <base64-encoded_resource_group>
57+
azure_region: <base64-encoded_region>
6958
----
7059

7160
On Microsoft Azure, the credentials secret format includes two properties that must contain the cluster's infrastructure ID, generated randomly for each cluster installation. This value can be found after running create manifests:
@@ -88,9 +77,7 @@ This value would be used in the secret data as follows:
8877
azure_resource_prefix: mycluster-2mpcn
8978
azure_resourcegroup: mycluster-2mpcn-rg
9079
----
91-
endif::azure[]
92-
93-
ifdef::google-cloud-platform[]
80+
endif::passthrough[]
9481

9582
.Google Cloud Platform (GCP) secret format
9683

@@ -102,16 +89,61 @@ metadata:
10289
namespace: kube-system
10390
name: gcp-credentials
10491
stringData:
105-
service_account.json: <ServiceAccount>
92+
service_account.json: <base64-encoded_service_account>
10693
----
107-
endif::google-cloud-platform[]
10894

109-
ifeval::["{context}" == "manually-creating-iam-aws"]
110-
:!aws:
111-
endif::[]
112-
ifeval::["{context}" == "manually-creating-iam-azure"]
113-
:!azure:
114-
endif::[]
115-
ifeval::["{context}" == "manually-creating-iam-gcp"]
116-
:!google-cloud-platform:
95+
ifdef::passthrough[]
96+
97+
.{rh-openstack-first} secret format
98+
99+
[source,yaml]
100+
----
101+
apiVersion: v1
102+
kind: Secret
103+
metadata:
104+
namespace: kube-system
105+
name: openstack-credentials
106+
data:
107+
clouds.yaml: <base64-encoded_cloud_creds>
108+
clouds.conf: <base64-encoded_cloud_creds_init>
109+
----
110+
111+
.{rh-virtualization-first} secret format
112+
113+
[source,yaml]
114+
----
115+
apiVersion: v1
116+
kind: Secret
117+
metadata:
118+
namespace: kube-system
119+
name: ovirt-credentials
120+
data:
121+
ovirt_url: <base64-encoded_url>
122+
ovirt_username: <base64-encoded_username>
123+
ovirt_password: <base64-encoded_password>
124+
ovirt_insecure: <base64-encoded_insecure>
125+
ovirt_ca_bundle: <base64-encoded_ca_bundle>
126+
----
127+
128+
.VMware vSphere secret format
129+
130+
[source,yaml]
131+
----
132+
apiVersion: v1
133+
kind: Secret
134+
metadata:
135+
namespace: kube-system
136+
name: vsphere-creds
137+
data:
138+
vsphere.openshift.example.com.username: <base64-encoded_username>
139+
vsphere.openshift.example.com.password: <base64-encoded_password>
140+
----
141+
142+
endif::passthrough[]
143+
144+
ifeval::["{context}" == "cco-mode-mint"]
145+
:!mint:
117146
endif::[]
147+
ifeval::["{context}" == "cco-mode-passthrough"]
148+
:!passthrough:
149+
endif::[]

modules/manually-rotating-cloud-creds.adoc

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
//
33
// * post_installation_configuration/cluster-tasks.adoc
44
// * authentication/managing_cloud_provider_credentials/cco-mode-mint.adoc
5+
// * authentication/managing_cloud_provider_credentials/cco-mode-passthrough.adoc
6+
7+
ifeval::["{context}" == "cco-mode-mint"]
8+
:mint:
9+
endif::[]
10+
ifeval::["{context}" == "cco-mode-passthrough"]
11+
:passthrough:
12+
endif::[]
513

614
:_content-type: PROCEDURE
715
[id="manually-rotating-cloud-creds_{context}"]
@@ -22,9 +30,13 @@ You can also use the command line interface to complete all parts of this proced
2230

2331
* Your cluster is installed on a platform that supports rotating cloud credentials manually with the CCO mode that you are using:
2432
25-
** For mint mode, AWS and GCP are supported.
33+
ifndef::passthrough[]
34+
** For mint mode, Amazon Web Services (AWS) and Google Cloud Platform (GCP) are supported.
35+
endif::passthrough[]
2636

27-
** For passthrough mode, AWS, Azure, GCP, {rh-openstack-first}, {rh-virtualization-first}, and VMware vSphere are supported.
37+
ifndef::mint[]
38+
** For passthrough mode, Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), {rh-openstack-first}, {rh-virtualization-first}, and VMware vSphere are supported.
39+
endif::mint[]
2840

2941
* You have changed the credentials that are used to interface with your cloud provider.
3042
@@ -44,12 +56,24 @@ You can also use the command line interface to complete all parts of this proced
4456
|AWS
4557
|`aws-creds`
4658

59+
ifndef::mint[]
4760
|Azure
4861
|`azure-credentials`
62+
endif::mint[]
4963

5064
|GCP
5165
|`gcp-credentials`
5266

67+
ifndef::mint[]
68+
|{rh-openstack}
69+
|`openstack-credentials`
70+
71+
|{rh-virtualization}
72+
|`ovirt-credentials`
73+
74+
|vSphere
75+
|`vsphere-creds`
76+
endif::mint[]
5377
|===
5478

5579
. Click the *Options* menu {kebab} in the same row as the secret and select *Edit Secret*.
@@ -66,10 +90,24 @@ You can also use the command line interface to complete all parts of this proced
6690
+
6791
[source,terminal]
6892
----
69-
$ oc -n openshift-cloud-credential-operator get CredentialsRequest -o json | jq -r '.items[] | select (.spec.providerSpec.kind=="<provider_spec>") | .spec.secretRef'
93+
$ oc -n openshift-cloud-credential-operator get CredentialsRequest \
94+
-o json | jq -r '.items[] | select (.spec.providerSpec.kind=="<provider_spec>") | .spec.secretRef'
7095
----
7196
+
72-
Where `<provider_spec>` is the corresponding value for your cloud provider: `AWSProviderSpec` for AWS, `AzureProviderSpec` for Azure, or `GCPProviderSpec` for GCP.
97+
where `<provider_spec>` is the corresponding value for your cloud provider:
98+
+
99+
--
100+
* AWS: `AWSProviderSpec`
101+
ifndef::mint[]
102+
* Azure: `AzureProviderSpec`
103+
endif::mint[]
104+
* GCP: `GCPProviderSpec`
105+
ifndef::mint[]
106+
* {rh-openstack}: `OpenStackProviderSpec`
107+
* {rh-virtualization}: `OvirtProviderSpec`
108+
* vSphere: `VSphereProviderSpec`
109+
endif::mint[]
110+
--
73111
+
74112
.Partial example output for AWS
75113
+
@@ -89,10 +127,12 @@ Where `<provider_spec>` is the corresponding value for your cloud provider: `AWS
89127
+
90128
[source,terminal]
91129
----
92-
$ oc delete secret <secret_name> -n <secret_namespace>
130+
$ oc delete secret <secret_name> \ <1>
131+
-n <secret_namespace> <2>
93132
----
94133
+
95-
Where `<secret_name>` is the name of a secret and `<secret_namespace>` is the namespace that contains the secret.
134+
<1> Specify the name of a secret.
135+
<2> Specify the namespace that contains the secret.
96136
+
97137
.Example deletion of an AWS secret
98138
+
@@ -160,3 +200,10 @@ Where `<example-iam-username>` is the name of an IAM user on the cloud provider.
160200

161201
.. For each IAM username, view the details for the user on the cloud provider. The credentials should show that they were created after being rotated on the cluster.
162202
////
203+
204+
ifeval::["{context}" == "cco-mode-mint"]
205+
:!mint:
206+
endif::[]
207+
ifeval::["{context}" == "cco-mode-passthrough"]
208+
:!passthrough:
209+
endif::[]

post_installation_configuration/cluster-tasks.adoc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ include::modules/manually-rotating-cloud-creds.adoc[leveloffset=+2]
625625

626626
include::modules/manually-removing-cloud-creds.adoc[leveloffset=+2]
627627

628+
[role="_additional-resources"]
629+
.Additional resources
630+
631+
* xref:../authentication/managing_cloud_provider_credentials/about-cloud-credential-operator.adoc#about-cloud-credential-operator[About the Cloud Credential Operator]
632+
628633
[id="post-install-must-gather-disconnected"]
629634
== Configuring image streams for a disconnected cluster
630635

@@ -636,12 +641,3 @@ include::modules/installation-restricted-network-samples.adoc[leveloffset=+2]
636641

637642
include::modules/installation-preparing-restricted-cluster-to-gather-support-data.adoc[leveloffset=+2]
638643

639-
[role="_additional-resources"]
640-
[discrete]
641-
[id="manually-rotating-cloud-creds-addtl-resources"]
642-
== Additional resources
643-
644-
* xref:../authentication/managing_cloud_provider_credentials/about-cloud-credential-operator.adoc#about-cloud-credential-operator[About the Cloud Credential Operator]
645-
* xref:../installing/installing_aws/manually-creating-iam.adoc#admin-credentials-root-secret-formats_manually-creating-iam-aws[Amazon Web Services (AWS) secret format]
646-
* xref:../installing/installing_azure/manually-creating-iam-azure.adoc#admin-credentials-root-secret-formats_manually-creating-iam-azure[Microsoft Azure secret format]
647-
* xref:../installing/installing_gcp/manually-creating-iam-gcp.adoc#admin-credentials-root-secret-formats_manually-creating-iam-gcp[Google Cloud Platform (GCP) secret format]

0 commit comments

Comments
 (0)