Skip to content

Commit 5bc26c7

Browse files
authored
Merge pull request #47404 from aleskandro/patch-1
Clarify expiration time for service accounts and tokens of pods pending deletion despite finalizers
2 parents 411c31a + 1e09b33 commit 5bc26c7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

content/en/docs/reference/access-authn-authz/service-accounts-admin.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ stored as extra 'private claims' in the issued JWT.
7575

7676
When a bound token is presented to the kube-apiserver, the service account authenticator
7777
will extract and verify these claims.
78+
If the referenced object or the ServiceAccount is pending deletion (for example, due to finalizers),
79+
then for any instant that is 60 seconds (or more) after the `.metadata.deletionTimestamp` date,
80+
authentication with that token would fail.
7881
If the referenced object no longer exists (or its `metadata.uid` does not match),
7982
the request will not be authenticated.
8083

content/en/docs/tasks/configure-pod-container/configure-service-account.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ When a Pod authenticates as a ServiceAccount, its level of access depends on the
5858
[authorization plugin and policy](/docs/reference/access-authn-authz/authorization/#authorization-modules)
5959
in use.
6060

61+
The API credentials are automatically revoked when the Pod is deleted, even if
62+
finalizers are in place. In particular, the API credentials are revoked 60 seconds
63+
beyond the `.metadata.deletionTimestamp` set on the Pod (the deletion timestamp
64+
is typically the time that the **delete** request was accepted plus the Pod's
65+
termination grace period).
66+
6167
### Opt out of API credential automounting
6268

6369
If you don't want the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}}

0 commit comments

Comments
 (0)