Skip to content

Commit 68c0d74

Browse files
authored
Merge pull request #61541 from bergerhoffer/OCPBUGS-13226
OCPBUGS 13226: Updating info on auto generated service account token …
2 parents 3f51f32 + c68f0dd commit 68c0d74

6 files changed

+32
-32
lines changed

authentication/using-service-accounts-in-applications.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ include::modules/service-accounts-overview.adoc[leveloffset=+1]
1010

1111
include::modules/service-accounts-default.adoc[leveloffset=+1]
1212

13-
// remove these links for 4.12+
13+
include::modules/service-account-auto-secret-removed.adoc[leveloffset=+2]
1414

1515
.Additional resources
1616

17-
* For information about requesting bound service account tokens, see xref:../authentication/bound-service-account-tokens.adoc#bound-sa-tokens-configuring_bound-service-account-tokens[Configuring bound service account tokens using volume projection]
17+
* For information about requesting bound service account tokens, see xref:../authentication/bound-service-account-tokens.adoc#bound-sa-tokens-configuring_bound-service-account-tokens[Configuring bound service account tokens using volume projection].
1818
1919
* For information about creating a service account token secret, see xref:../nodes/pods/nodes-pods-secrets.adoc#nodes-pods-secrets-creating-sa_nodes-pods-secrets[Creating a service account token secret].
2020

modules/nodes-pods-secrets-about.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,3 @@ For examples of different secret types, see the code samples in _Using Secrets_.
8484
== Secret data keys
8585

8686
Secret keys must be in a DNS subdomain.
87-
88-
// remove this snippet for 4.12+
89-
90-
include::snippets/service-account-auto-secret-removed.adoc[]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * authentication/using-service-accounts-in-applications.adoc
4+
// * pods/nodes-pods-secrets.adoc
5+
6+
:_content-type: CONCEPT
7+
[id="auto-generated-sa-token-secrets_{context}"]
8+
= About automatically generated service account token secrets
9+
10+
When a service account is created, a service account token secret is automatically generated for it. This service account token secret, along with an automatically generated docker configuration secret, is used to authenticate to the internal {product-title} registry. Do not rely on these automatically generated secrets for your own use; they might be removed in a future {product-title} release.
11+
12+
[NOTE]
13+
====
14+
Prior to {product-title} 4.11, a second service account token secret was generated when a service account was created. This service account token secret was used to access the Kubernetes API.
15+
16+
Starting with {product-title} 4.11, this second service account token secret is no longer created. This is because the `LegacyServiceAccountTokenNoAutoGeneration` upstream Kubernetes feature gate was enabled, which stops the automatic generation of secret-based service account tokens to access the Kubernetes API.
17+
18+
After upgrading to {product-version}, any existing service account token secrets are not deleted and continue to function.
19+
====
20+
21+
Workloads are automatically injected with a projected volume to obtain a bound service account token. If your workload needs an additional service account token, add an additional projected volume in your workload manifest. Bound service account tokens are more secure than service account token secrets for the following reasons:
22+
23+
* Bound service account tokens have a bounded lifetime.
24+
* Bound service account tokens contain audiences.
25+
* Bound service account tokens can be bound to pods or secrets and the bound tokens are invalidated when the bound object is removed.
26+
27+
For more information, see _Configuring bound service account tokens using volume projection_.
28+
29+
You can also manually create a service account token secret to obtain a token, if the security exposure of a non-expiring token in a readable API object is acceptable to you. For more information, see _Creating a service account token secret_.

modules/service-accounts-default.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,3 @@ viewing and modifying replication controllers and pods in the project.
7171
All service accounts in a project are given the `system:image-puller` role,
7272
which allows pulling images from any imagestream in the project using the
7373
internal container image registry.
74-
75-
// remove this snippet for 4.12+
76-
77-
include::snippets/service-account-auto-secret-removed.adoc[]

nodes/pods/nodes-pods-secrets.adoc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@ Some applications need sensitive information, such as passwords and user names,
1010

1111
As an administrator, you can use `Secret` objects to provide this information without exposing that information in clear text.
1212

13-
// The following include statements pull in the module files that comprise
14-
// the assembly. Include any combination of concept, procedure, or reference
15-
// modules required to cover the user story. You can also include other
16-
// assemblies.
17-
1813
include::modules/nodes-pods-secrets-about.adoc[leveloffset=+1]
1914

20-
// remove these links for 4.12+
15+
include::modules/service-account-auto-secret-removed.adoc[leveloffset=+2]
2116

2217
.Additional resources
2318

snippets/service-account-auto-secret-removed.adoc

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)