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

Improve error message when using a "K10" prefixed token #4180

Merged
merged 3 commits into from
Oct 11, 2021

Conversation

dereknola
Copy link
Contributor

@dereknola dereknola commented Oct 7, 2021

Signed-off-by: dereknola derek.nola@suse.com

Proposed Changes

Improve the error message a user receives when accidentally providing a "K10" prefixed token on the first (or single node) K3s server.

Types of Changes

Enhancement

Verification

  • Run K3s server with K10 token
$ k3s server --token=K10THISISATEST
  • Observe the error message:
panic: failed to normalize token; must be in format K10<CA-HASH>::<USERNAME>:<PASSWORD> or <PASSWORD>

Linked Issues

#4169

User-Facing Change


Further Comments

Signed-off-by: dereknola <derek.nola@suse.com>
@dereknola dereknola requested a review from a team as a code owner October 7, 2021 18:12
pkg/cluster/storage.go Outdated Show resolved Hide resolved
dereknola and others added 2 commits October 7, 2021 13:49
Co-authored-by: Brad Davidson <brad@oatmail.org>
@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2021

Codecov Report

Merging #4180 (3000c3e) into master (12e675e) will decrease coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4180      +/-   ##
==========================================
- Coverage   11.66%   11.46%   -0.20%     
==========================================
  Files         134      134              
  Lines        9055     9242     +187     
==========================================
+ Hits         1056     1060       +4     
- Misses       7773     7956     +183     
  Partials      226      226              
Flag Coverage Δ
inttests 0.67% <ø> (-0.02%) ⬇️
unittests 11.12% <ø> (-0.19%) ⬇️

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

Impacted Files Coverage Δ
pkg/cluster/storage.go 0.00% <ø> (ø)
pkg/bootstrap/bootstrap.go 20.51% <0.00%> (-3.02%) ⬇️
pkg/cluster/cluster.go 0.00% <0.00%> (ø)
pkg/cli/server/server.go 0.00% <0.00%> (ø)
pkg/cluster/bootstrap.go 0.00% <0.00%> (ø)
pkg/servicelb/controller.go 0.00% <0.00%> (ø)
tests/util/runtime.go 57.14% <0.00%> (+7.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12e675e...3000c3e. Read the comment docs.

@dereknola dereknola merged commit feec445 into k3s-io:master Oct 11, 2021
dereknola added a commit to dereknola/k3s that referenced this pull request Nov 8, 2021
* Add new error message with a K10 prefixed secret token

Signed-off-by: dereknola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Nov 9, 2021
* Add new error message with a K10 prefixed secret token

Signed-off-by: dereknola <derek.nola@suse.com>
@dereknola dereknola deleted the k10_prefix_error branch November 16, 2021 16:55
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.

None yet

4 participants