From 1acde6e30a9ca9d5b28c2e2822b1c0528538fafe Mon Sep 17 00:00:00 2001 From: tradel Date: Tue, 27 Aug 2019 14:15:53 -0700 Subject: [PATCH] create a common name for autoTLS agent certs --- agent/consul/auto_encrypt.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/consul/auto_encrypt.go b/agent/consul/auto_encrypt.go index e3a0e78c5..03452a456 100644 --- a/agent/consul/auto_encrypt.go +++ b/agent/consul/auto_encrypt.go @@ -65,7 +65,8 @@ func (c *Client) RequestAutoEncryptCerts(servers []string, port int, token strin } // Create a CSR. - csr, err := connect.CreateCSR(id, pk) + commonName := fmt.Sprintf("%s.agent.%s.%s", id.Agent, id.Datacenter, c.config.Domain) + csr, err := connect.CreateCSR(id, commonName, pk) if err != nil { return errFn(err) }