Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #306 from mmerrill3/feature/server-cert-client-aut…
Browse files Browse the repository at this point in the history
…h-ext

Adding client usage extension for server cert (#305)
  • Loading branch information
justinsb authored Apr 7, 2020
2 parents f624e67 + ade4983 commit 1b7ffc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/etcd/pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ func (p *etcdProcess) createKeypairs(peersCA *pki.Keypair, clientsCA *pki.Keypai
keypairs := pki.Keypairs{Store: store}
keypairs.SetCA(clientsCA)

// The server cert is used by the gRPC library of etcd as a client cert for meta checks, like health
// See https://github.com/etcd-io/etcd/issues/9785
certConfig := certutil.Config{
CommonName: me.Name,
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth},
}

if err := addAltNames(&certConfig, me.ClientUrls); err != nil {
Expand Down

0 comments on commit 1b7ffc9

Please sign in to comment.