Skip to content

Commit f9636ac

Browse files
authored
Merge pull request #48981 from jplitza/patch-1
service-accounts-admin.md: Explain invalidating short-lived tokens
2 parents efb504b + c7c11e8 commit f9636ac

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ time. Please refer to [auto-generated legacy ServiceAccount token clean up](#aut
580580

581581
## Delete/invalidate a ServiceAccount token {#delete-token}
582582

583+
### Delete/invalidate a long-lived/legacy ServiceAccount token {#delete-legacy-token}
584+
583585
If you know the name of the Secret that contains the token you want to remove:
584586

585587
```shell
@@ -618,6 +620,17 @@ Then, delete the Secret you now know the name of:
618620
kubectl -n examplens delete secret/example-automated-thing-token-zyxwv
619621
```
620622

623+
### Delete/invalidate a short-lived ServiceAccount token {#delete-short-lived}
624+
625+
Short lived ServiceAccount tokens automatically expire after the time-limit
626+
specified during their creation. There is no central record of tokens issued,
627+
so there is no way to revoke individual tokens.
628+
629+
If you have to revoke a short-lived token before its expiration, you
630+
can delete and re-create the ServiceAccount it is associated to. This will
631+
change its UID and hence invalidate **all** ServiceAccount tokens that were
632+
created for it.
633+
621634
## External ServiceAccount token signing and key management
622635

623636
{{< feature-state feature_gate_name="ExternalServiceAccountTokenSigner" >}}

0 commit comments

Comments
 (0)