From 5ba28a6a7bba1b7f012afc085eaa49e8eceee238 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 e3a0e78c54..03452a4561 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) }