Skip to content

Commit 5a15829

Browse files
committed
Add token auth via CCO for Operator authors (AWS STS)
1 parent e33c634 commit 5a15829

11 files changed

+549
-7
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,8 @@ Topics:
18501850
File: osdk-working-bundle-images
18511851
- Name: Complying with pod security admission
18521852
File: osdk-complying-with-psa
1853+
- Name: Token authentication for Operators on cloud providers
1854+
File: osdk-token-auth
18531855
- Name: Validating Operators using the scorecard
18541856
File: osdk-scorecard
18551857
- Name: Validating Operator bundles

authentication/managing_cloud_provider_credentials/cco-short-term-creds.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ include::modules/cco-short-term-creds-component-permissions-aws.adoc[leveloffset
5353
//OLM-managed Operator support for authentication with AWS STS
5454
include::modules/cco-short-term-creds-aws-olm.adoc[leveloffset=+2]
5555

56-
////
5756
[role="_additional-resources"]
5857
.Additional resources
59-
* xr\ef:../../operators/operator_sdk/osdk-token-auth.html#osdk-aws-sts_osdk-token-auth[CCO-based workflow for OLM-managed Operators with AWS STS]
60-
////
58+
* xref:../../operators/operator_sdk/osdk-token-auth.adoc#osdk-cco-aws-sts_osdk-token-auth[CCO-based workflow for OLM-managed Operators with AWS STS]
6159

6260
[id="cco-short-term-creds-gcp_{context}"]
6361
== GCP Workload Identity

modules/olm-installing-from-operatorhub-using-cli.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,27 @@ spec:
153153
<6> The `env` parameter defines a list of Environment Variables that must exist in all containers in the pod created by OLM.
154154
<7> The `envFrom` parameter defines a list of sources to populate Environment Variables in the container.
155155
<8> The `volumes` parameter defines a list of Volumes that must exist on the pod created by OLM.
156-
<9> The `volumeMounts` parameter defines a list of VolumeMounts that must exist in all containers in the pod created by OLM. If a `volumeMount` references a `volume` that does not exist, OLM fails to deploy the Operator.
156+
<9> The `volumeMounts` parameter defines a list of volume mounts that must exist in all containers in the pod created by OLM. If a `volumeMount` references a `volume` that does not exist, OLM fails to deploy the Operator.
157157
<10> The `tolerations` parameter defines a list of Tolerations for the pod created by OLM.
158158
<11> The `resources` parameter defines resource constraints for all the containers in the pod created by OLM.
159159
<12> The `nodeSelector` parameter defines a `NodeSelector` for the pod created by OLM.
160160

161+
. If the cluster is in STS mode, include the following fields in the `Subscription` object:
162+
+
163+
[source,yaml]
164+
----
165+
kind: Subscription
166+
# ...
167+
spec:
168+
installPlanApproval: Manual <1>
169+
config:
170+
env:
171+
- name: ROLEARN
172+
value: "<role_arn>" <2>
173+
----
174+
<1> Subscriptions with automatic update approvals are not recommended because there might be permission changes to make prior to updating. Subscriptions with manual update approvals ensure that administrators have the opportunity to verify the permissions of the later version and take any necessary steps prior to update.
175+
<2> Include the role ARN details.
176+
161177
. Create the `Subscription` object:
162178
+
163179
[source,terminal]

modules/olm-installing-from-operatorhub-using-web-console.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,18 @@ ifdef::olm-user[]
7878
.. Choose a specific, single namespace in which to install the Operator. The Operator will only watch and be made available for use in this single namespace.
7979
endif::[]
8080

81-
.. Select an *Update channel* (if more than one is available).
81+
.. If the cluster is in STS mode, add the role ARN in the *role ARN* field.
82+
83+
.. If more than one update channel is available, select an *Update channel*.
8284

8385
.. Select *Automatic* or *Manual* approval strategy, as described earlier.
86+
+
87+
[IMPORTANT]
88+
====
89+
If the web console shows that the cluster is in "STS mode", you must set *Update approval* to *Manual*.
90+
91+
Subscriptions with automatic update approvals are not recommended because there might be permission changes to make prior to updating. Subscriptions with manual update approvals ensure that administrators have the opportunity to verify the permissions of the later version and take any necessary steps prior to update.
92+
====
8493

8594
. Click *Install* to make the Operator available to the selected namespaces on this {product-title} cluster.
8695

modules/osdk-cco-aws-sts-alt.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * operators/operator_sdk/osdk-token-auth.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="osdk-cco-aws-sts-alt_{context}"]
7+
= Alternative method
8+
9+
As an alternative method for Operator authors, you can indicate that the user is responsible for creating the `CredentialsRequest` object for the Cloud Credential Operator (CCO) before installing the Operator.
10+
11+
The Operator instructions must indicate the following to users:
12+
13+
* Provide a YAML version of a `CredentialsRequest` object, either by providing the YAML inline in the instructions or pointing users to a download location
14+
* Instruct the user to create the `CredentialsRequest` object
15+
16+
In {product-title} 4.14 and later, after the `CredentialsRequest` object appears on the cluster with the appropriate STS information added, the Operator can then read the CCO-generated `Secret` or mount it, having defined the mount in the cluster service version (CSV).
17+
18+
For earlier versions of {product-title}, the Operator instructions must also indicate the following to users:
19+
20+
* Use the CCO utility (`ccoctl`) to generate the `Secret` YAML object from the `CredentialsRequest` object
21+
* Apply the `Secret` object to the cluster in the appropriate namespace
22+
23+
The Operator still must be able to consume the resulting secret to communicate with cloud APIs. Because in this case the secret is created by the user before the Operator is installed, the Operator can do either of the following:
24+
25+
* Define an explicit mount in the `Deployment` object within the CSV
26+
* Programmatically read the `Secret` object from the API server, as shown in the recommended "Enabling Operators to support CCO-based workflows with AWS STS" method

0 commit comments

Comments
 (0)