Skip to content

Conversation

@AumPatel1
Copy link

Description

This pull request adds a new subsection, "Token Revocation," to the Kubernetes authentication documentation under the "Using Authentication Configuration" section. The changes address the absence of full token revocation support in Kubernetes by:

  • Explaining that Kubernetes does not currently support full token revocation for authentication tokens.
  • Recommending the use of short-lived tokens to minimize risks from compromised tokens.
  • Providing an example of a user validation rule using Common Expression Language (CEL) to approximate token revocation. The example uses the jti claim to check a token’s credential ID against a denylist.

These updates aim to guide users on managing token security effectively, based on discussions in issue #51015. The subsection is placed after an existing YAML example and includes a formatted code block for clarity.

Issue

Closes: #51015

Issue

Closes: #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 27, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @AumPatel1!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign reylejano for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label May 27, 2025
@k8s-ci-robot k8s-ci-robot requested review from deads2k and lavalamp May 27, 2025 23:05
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 27, 2025
@netlify
Copy link

netlify bot commented May 27, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 4d40a1f
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/683645290f120d0008874454
😎 Deploy Preview https://deploy-preview-51093--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, we should think about keeping the reference page factual and straightforward.

However, the reference docs can and should link to task pages that explain how to achieve relevant outcomes.

- expression: "user.groups.all(group, !group.startsWith('system:'))"
message: 'groups cannot used reserved system: prefix'
```
### Token Revocation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: headings should be sentence case (lowercase "r" please)

```
### Token Revocation

Kubernetes does not currently support full token revocation for authentication tokens. To mitigate this, use short-lived tokens to reduce the risk of compromised tokens being used for an extended period. As an alternative, you can approximate revocation by writing user validation rules using Common Expression Language (CEL). For example, you can use the `jti` claim (if present) or any unique token identifier to check against a denylist or revocation list. Note that managing revocation this way can be complex and may not scale well for large systems.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd to have a section about Token revocation in a reference page, and then explain it's not a thing. That's not the usual way to write reference documentation.

Maybe this should be a task page: how to implement token revocation for your cluster.

What do you think?

Example of a revocation rule using the `jti` claim:

```yaml
userValidationRules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to explain what component implements userValidationRules

@lmktfy
Copy link
Member

lmktfy commented Aug 3, 2025

/sig auth

@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Aug 3, 2025
@enj enj moved this to Needs Triage in SIG Auth Aug 3, 2025
@enj enj added this to SIG Auth Aug 3, 2025
@aramase aramase moved this from Needs Triage to In Review in SIG Auth Aug 4, 2025
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 18, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Add note about revocation in structured authentication configuration

3 participants