-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
v2http: client certificate auth via common name #5991
Conversation
return false | ||
var rootUser *auth.User | ||
if r.Header.Get("Authorization") == "" { | ||
rootUser = userFromClientCertificate(sec, r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably should only enable this checking when client auth is set: https://github.com/coreos/etcd/blob/master/etcdmain/config.go#L174
Or we trust random client certs.
/cc @gtank @heyitsanthony any opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it should ensure the cert's been signed by the client ca
@xiang90 @heyitsanthony Added PTAL. Thanks. |
@@ -116,6 +116,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) { | |||
QuotaBackendBytes: cfg.QuotaBackendBytes, | |||
StrictReconfigCheck: cfg.StrictReconfigCheck, | |||
EnablePprof: cfg.EnablePprof, | |||
ClientTLSCertEnabled: cfg.ClientTLSInfo.ClientCertAuth, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably we should just name this as ClientCertAuthEnabled
@xiang90 Just addressed. PTAL. Thanks. |
Do not merge yet. Will add e2e tests for this. |
refactor http basic auth code to combine basic auth extraction and validation
introduce client certificate authentication using certificate cn.
@xiang90 Just added e2e tests. Also confirmed manually that it works without username and password when CN is provided:
|
Also confirmed that if different key given, auth feature correctly rejects the request
|
lgtm. |
I see that this has been assigned the kind/backport label. Will this be backported? |
@swsnider Yes this has been backported to https://github.com/coreos/etcd/releases/tag/v3.0.4. You need etcd v3.0.4+ for this feature. Thanks. |
Is this feature documented anywhere? |
@geekofalltrades it doesn't appear to be. I just opened a new issue at #8020. |
Cherry-picked from #3916.