Skip to content
New issue

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

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

Already on GitHub? # to your account

auth: Support all JWT algorithms #9883

Merged
merged 2 commits into from
Jun 27, 2018
Merged

auth: Support all JWT algorithms #9883

merged 2 commits into from
Jun 27, 2018

Conversation

joelegasse
Copy link
Contributor

This change adds support to etcd for all of the JWT algorithms included in the underlying JWT library.

Fixes #9696

@joelegasse joelegasse requested a review from mitake June 25, 2018 16:47
@gyuho gyuho added this to the etcd-v3.4 milestone Jun 25, 2018
@codecov-io
Copy link

Codecov Report

Merging #9883 into master will increase coverage by 0.29%.
The diff coverage is 82.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9883      +/-   ##
==========================================
+ Coverage   68.96%   69.25%   +0.29%     
==========================================
  Files         385      386       +1     
  Lines       35703    35731      +28     
==========================================
+ Hits        24621    24744     +123     
+ Misses       9263     9190      -73     
+ Partials     1819     1797      -22
Impacted Files Coverage Δ
auth/store.go 73.53% <ø> (ø) ⬆️
auth/jwt.go 67.7% <64.28%> (-2.57%) ⬇️
auth/options.go 92.5% <92.5%> (ø)
pkg/transport/timeout_conn.go 80% <0%> (-20%) ⬇️
etcdserver/util.go 81.25% <0%> (-13.75%) ⬇️
proxy/grpcproxy/watcher.go 85.71% <0%> (-8.17%) ⬇️
pkg/transport/listener.go 58.67% <0%> (-4.09%) ⬇️
etcdserver/v2_server.go 80.76% <0%> (-3.85%) ⬇️
proxy/httpproxy/director.go 80% <0%> (-2.86%) ⬇️
etcdserver/api/v3election/election.go 66.66% <0%> (-2.78%) ⬇️
... and 23 more

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 8f6348a...ed1490c. Read the comment docs.

ErrInvalidAuthMethod = errors.New("auth: invalid auth signature method")
ErrMissingKey = errors.New("auth: missing key data")
ErrKeyMismatch = errors.New("auth: public and private keys don't match")
ErrVerifyOnly = errors.New("auth: token signing attempted with verify-only key")
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see ErrVerifyOnly being used anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, and added a test case to ensure it's returned.

This change adds support to etcd for all of the JWT algorithms included
in the underlying JWT library.
Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm /cc @mitake

@mitake
Copy link
Contributor

mitake commented Jun 27, 2018

lgtm, thanks! @joelegasse

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging this pull request may close these issues.

4 participants