diff --git a/connect/proxy/config.go b/connect/proxy/config.go index 025809a7b6..b0e020ab2f 100644 --- a/connect/proxy/config.go +++ b/connect/proxy/config.go @@ -36,25 +36,11 @@ type Config struct { // Upstreams configures outgoing proxies for remote connect services. Upstreams []UpstreamConfig `json:"upstreams" hcl:"upstreams"` - - // DevCAFile, DevServiceCertFile, and DevServiceKeyFile allow configuring - // the certificate information from a static file. This is only for testing - // purposes. All or none must be specified. - DevCAFile string `json:"dev_ca_file" hcl:"dev_ca_file"` - DevServiceCertFile string `json:"dev_service_cert_file" hcl:"dev_service_cert_file"` - DevServiceKeyFile string `json:"dev_service_key_file" hcl:"dev_service_key_file"` } // Service returns the *connect.Service structure represented by this config. func (c *Config) Service(client *api.Client, logger *log.Logger) (*connect.Service, error) { - // If we aren't in dev mode, then we return the configured service. - if c.DevCAFile == "" { - return connect.NewServiceWithLogger(c.ProxiedServiceName, client, logger) - } - - // Dev mode - return connect.NewDevServiceFromCertFiles(c.ProxiedServiceName, - logger, c.DevCAFile, c.DevServiceCertFile, c.DevServiceKeyFile) + return connect.NewServiceWithLogger(c.ProxiedServiceName, client, logger) } // PublicListenerConfig contains the parameters needed for the incoming mTLS diff --git a/connect/proxy/config_test.go b/connect/proxy/config_test.go index 2e214c6ddf..d395c9767a 100644 --- a/connect/proxy/config_test.go +++ b/connect/proxy/config_test.go @@ -47,9 +47,6 @@ func TestParseConfigFile(t *testing.T) { ConnectTimeoutMs: 10000, }, }, - DevCAFile: "connect/testdata/ca1-ca-consul-internal.cert.pem", - DevServiceCertFile: "connect/testdata/ca1-svc-web.cert.pem", - DevServiceKeyFile: "connect/testdata/ca1-svc-web.key.pem", } require.Equal(t, expect, cfg) diff --git a/connect/proxy/testdata/config-kitchensink.hcl b/connect/proxy/testdata/config-kitchensink.hcl index de3472d0f8..2276190ca7 100644 --- a/connect/proxy/testdata/config-kitchensink.hcl +++ b/connect/proxy/testdata/config-kitchensink.hcl @@ -5,11 +5,6 @@ token = "11111111-2222-3333-4444-555555555555" proxied_service_name = "web" proxied_service_namespace = "default" -# Assumes running consul in dev mode from the repo root... -dev_ca_file = "connect/testdata/ca1-ca-consul-internal.cert.pem" -dev_service_cert_file = "connect/testdata/ca1-svc-web.cert.pem" -dev_service_key_file = "connect/testdata/ca1-svc-web.key.pem" - public_listener { bind_address = "127.0.0.1" bind_port= "9999"