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) }