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

auth: a new auth token provider nop #9369

Merged
merged 1 commit into from
Feb 27, 2018
Merged

Conversation

mitake
Copy link
Contributor

@mitake mitake commented Feb 27, 2018

This commit adds a new auth token provider named nop. The nop provider
refuses every Authenticate() request so CN based authentication can
only be allowed. If the tokenOpts parameter of auth.NewTokenProvider()
is empty, the provider will be used.

Fix #9349

/cc @stts @gyuho

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

auth/nop.go Outdated

func newTokenProviderNop() (*tokenNop, error) {
return &tokenNop{}, nil

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extraneous white lines at 33 and 36?

This commit adds a new auth token provider named nop. The nop provider
refuses every Authenticate() request so CN based authentication can
only be allowed. If the tokenOpts parameter of auth.NewTokenProvider()
is empty, the provider will be used.
@codecov-io
Copy link

codecov-io commented Feb 27, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@23331f7). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #9369   +/-   ##
=========================================
  Coverage          ?   72.63%           
=========================================
  Files             ?      362           
  Lines             ?    30729           
  Branches          ?        0           
=========================================
  Hits              ?    22320           
  Misses            ?     6794           
  Partials          ?     1615
Impacted Files Coverage Δ
auth/store.go 81.81% <0%> (ø)
auth/nop.go 0% <0%> (ø)

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 23331f7...8eb7cfb. Read the comment docs.

@mitake mitake merged commit 1caa6af into etcd-io:master Feb 27, 2018
@mitake mitake deleted the nop-auth-token branch February 27, 2018 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants