Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.27] Server Token Rotation #8576

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

dereknola
Copy link
Member

Proposed Changes

Backport #8265

  • Consolidate NewCertCommands
  • Add support for user defined new token
  • Add E2E testlets
  • Ensure agent token also changes

Linked Issues

#8299

User-Facing Change

Users can now rotate the server token using `k3s token rotate -t <OLD_TOKEN> --new-token <NEW_TOKEN>`. After command succeeds, all server nodes must be restarted with the new token.

Further Comments

* Consolidate NewCertCommands
* Add support for user defined new token
* Add E2E testlets

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Ensure agent token also changes

Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola requested a review from a team as a code owner October 9, 2023 18:04
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 139 lines in your changes are missing coverage. Please review.

Comparison is base (6c2a7cb) 47.33% compared to head (e590e38) 51.05%.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.27    #8576      +/-   ##
================================================
+ Coverage         47.33%   51.05%   +3.72%     
================================================
  Files               144      145       +1     
  Lines             14611    14775     +164     
================================================
+ Hits               6916     7544     +628     
+ Misses             6611     6048     -563     
- Partials           1084     1183      +99     
Flag Coverage Δ
e2etests 48.76% <32.27%> (?)
inttests 43.03% <27.97%> (-1.61%) ⬇️
unittests 19.73% <0.00%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/server/main.go 98.03% <100.00%> (+3.80%) ⬆️
pkg/cli/cmds/certs.go 100.00% <100.00%> (ø)
pkg/cli/cmds/token.go 100.00% <100.00%> (ø)
pkg/daemons/control/deps/deps.go 57.80% <ø> (-0.64%) ⬇️
pkg/server/router.go 53.10% <100.00%> (+4.09%) ⬆️
pkg/cli/token/token.go 0.00% <0.00%> (ø)
pkg/cluster/storage.go 36.90% <6.97%> (+1.40%) ⬆️
pkg/server/token.go 1.58% <1.58%> (ø)

... and 38 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dereknola dereknola merged commit d451d4f into k3s-io:release-1.27 Oct 10, 2023
15 checks passed
@dereknola dereknola deleted the server_token_127 branch October 17, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants