mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #69002 from HotelsDotCom/do-not-verify-x509-with-no-wrapped-auth
Remove excessive warnings with x509 certificate auth
This commit is contained in:
commit
38a9fc6aa2
@ -36,7 +36,6 @@ go_library(
|
|||||||
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library",
|
||||||
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
|
"//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library",
|
||||||
"//vendor/github.com/golang/glog:go_default_library",
|
|
||||||
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
|
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -23,7 +23,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
|
||||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||||
@ -168,8 +167,7 @@ func (a *Verifier) verifySubject(subject pkix.Name) error {
|
|||||||
if a.allowedCommonNames.Has(subject.CommonName) {
|
if a.allowedCommonNames.Has(subject.CommonName) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
glog.Warningf("x509: subject with cn=%s is not in the allowed list: %v", subject.CommonName, a.allowedCommonNames.List())
|
return fmt.Errorf("x509: subject with cn=%s is not in the allowed list", subject.CommonName)
|
||||||
return fmt.Errorf("x509: subject with cn=%s is not allowed", subject.CommonName)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultVerifyOptions returns VerifyOptions that use the system root certificates, current time,
|
// DefaultVerifyOptions returns VerifyOptions that use the system root certificates, current time,
|
||||||
|
Loading…
Reference in New Issue
Block a user