Skip to content

Commit df86ac5

Browse files
committed
BZ-2093995Remove Using a service account’s credentials externally
edits per EricPonvelle
1 parent d61525f commit df86ac5

8 files changed

+50
-92
lines changed

authentication/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ You can manage authorization for {product-title} through the following tasks:
5656
====
5757
After creating the cluster admin user, xref:../authentication/remove-kubeadmin.adoc#removing-kubeadmin_removing-kubeadmin[delete the existing kubeadmin user] to improve cluster security.
5858
====
59-
* Creating service accounts: xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-overview_understanding-service-accounts[Service accounts] provide a flexible way to control API access without sharing a regular user’s credentials. A user can xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-managing_understanding-service-accounts[create] and xref:../authentication/using-service-accounts-in-applications.adoc#service-accounts-using-credentials-externally_using-service-accounts[use a service account in applications] and also as xref:../authentication/using-service-accounts-as-oauth-client.adoc#using-service-accounts-as-oauth-client[an OAuth client].
59+
* Creating service accounts: xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-overview_understanding-service-accounts[Service accounts] provide a flexible way to control API access without sharing a regular user’s credentials. A user can xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-managing_understanding-service-accounts[create and use a service account in applications] and also as xref:../authentication/using-service-accounts-as-oauth-client.adoc#using-service-accounts-as-oauth-client[an OAuth client].
6060
* xref:../authentication/tokens-scoping.adoc#tokens-scoping[Scoping tokens]: A scoped token is a token that identifies as a specific user who can perform only specific operations. You can create scoped tokens to delegate some of your permissions to another user or a service account.
6161
* Syncing LDAP groups: You can manage user groups in one place by xref:../authentication/ldap-syncing.adoc#ldap-syncing[syncing the groups stored in an LDAP server] with the {product-title} user groups.

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ 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+
14+
15+
.Additional resources
16+
17+
* For information about requesting bound service account tokens, see xref:../authentication/bound-service-account-tokens.html#bound-sa-tokens-configuring_bound-service-account-tokens[Configuring bound service account tokens using volume projection]
18+
19+
* For information about creating a service account token secret, see see xref:../nodes/pods/nodes-pods-secrets.html#nodes-pods-secrets-creating-sa_nodes-pods-secrets[Creating a service account token secret].
20+
1321
include::modules/service-accounts-creating.adoc[leveloffset=+1]
1422

1523
// include::modules/service-accounts-using-credentials-inside-a-container.adoc[leveloffset=+1]
1624

17-
include::modules/service-accounts-using-credentials-externally.adoc[leveloffset=+1]

modules/nodes-pods-secrets-about.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ 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[]

modules/service-accounts-creating.adoc

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,12 @@ $ oc describe sa robot
6565
.Example output
6666
[source,terminal]
6767
----
68-
Name: robot
69-
Namespace: project1
70-
Labels: <none>
71-
Annotations: <none>
72-
73-
Image pull secrets: robot-dockercfg-qzbhb
74-
75-
Mountable secrets: robot-token-f4khf
76-
robot-dockercfg-qzbhb
77-
78-
Tokens: robot-token-f4khf
79-
robot-token-z8h44
68+
Name: robot
69+
Namespace: project1
70+
Labels: <none>
71+
Annotations: <none>
72+
Image pull secrets: robot-dockercfg-qzbhb
73+
Mountable secrets: robot-dockercfg-qzbhb
74+
Tokens: robot-token-f4khf
75+
Events: <none>
8076
----

modules/service-accounts-default.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ 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[]

modules/service-accounts-using-credentials-externally.adoc

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

nodes/pods/nodes-pods-secrets.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ As an administrator, you can use `Secret` objects to provide this information wi
1717

1818
include::modules/nodes-pods-secrets-about.adoc[leveloffset=+1]
1919

20+
// remove these links for 4.12+
21+
22+
.Additional resources
23+
24+
* For information about requesting bound service account tokens, see xref:../../authentication/bound-service-account-tokens.html#bound-sa-tokens-configuring_bound-service-account-tokens[Using bound service account tokens]
25+
26+
* For information about creating a service account token secret, see xref:../../nodes/pods/nodes-pods-secrets.html#nodes-pods-secrets-creating-sa_nodes-pods-secrets[Creating a service account token secret].
27+
2028
include::modules/nodes-pods-secrets-creating.adoc[leveloffset=+1]
2129

2230
include::modules/nodes-pods-secrets-creating-opaque.adoc[leveloffset=+2]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// When including this file, ensure that {FeatureName} is set immediately before
2+
// the include. Otherwise it will result in an incorrect replacement.
3+
4+
[id="auto-generated-sa-token-secrets_{context}"]
5+
== About automatically-generated service account token secrets
6+
7+
In {product-version}, {product-title} is adopting an link:https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#urgent-upgrade-notes-1[enhancement from upstream Kubernetes], which enables the `LegacyServiceAccountTokenNoAutoGeneration` feature by default. As a result, when creating new serivce accounts (SA), a service account token secret is no longer automatically generated. Previously, {product-title} automatically added a service account token to a secret for each new SA.
8+
9+
However, some features and workloads need service account token secrets to communicate with the Kubernetes API server, for example, the OpenShift Controller Manager. While this requirement will be changed in a future release, it remains in {product-title} {product-version}. As a result, if you need a service account token secret, you must manually use the TokenRequest API to request bound service account tokens or create a service account token secret.
10+
11+
After upgrading to {product-version}, existing service account token secrets are not deleted and continue to function as expected.
12+
13+
[NOTE]
14+
====
15+
In {product-version}, service account token secrets still appear to have been automatically generated. Although, instead creating two secrets per service account, {product-title} now creates one token, which does not work. In a future release, the number will be further reduced to zero. Note that `dockercfg` secrets are still generated and no secrets are deleted during upgrades.
16+
====
17+

0 commit comments

Comments
 (0)