Skip to content

Commit

Permalink
make sure api server validates client certs if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenriks committed Dec 6, 2018
1 parent c222089 commit 9a00448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/virt-api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func (app *virtAPIApp) startTLS() error {

tlsConfig := &tls.Config{
ClientCAs: pool,
// A RequestClientCert request means we're not guaranteed
// A VerifyClientCertIfGiven request means we're not guaranteed
// a client has been authenticated unless they provide a peer
// cert.
//
Expand All @@ -905,7 +905,7 @@ func (app *virtAPIApp) startTLS() error {
// response is given. That status request won't send a peer cert regardless
// if the TLS handshake requests it. As a result, the TLS handshake fails
// and our aggregated endpoint never becomes available.
ClientAuth: tls.RequestClientCert,
ClientAuth: tls.VerifyClientCertIfGiven,
}
tlsConfig.BuildNameToCertificate()

Expand Down

0 comments on commit 9a00448

Please sign in to comment.