xmidt-org/webpa-common

webpa.go should never generate any certs

ilawjr opened this issue · 1 comments

This logging error:
{"caller":"webpa.go:277","error":"open : no such file or directory","level":"error","msg":"Error in reading ClientCACertFile ","ts":"2020-04-03T08:39:53.077214405Z"}

Should be info or be made clearer as if the server can't find ClientCACertFile it will generate its own - which is expected behavior.

The error message is from here:

logging.Error(logger).Log(logging.MessageKey(), "Error in reading ClientCACertFile ",

webpa-common should not be generating certificates on application startup. If any cert, server or client, is not present the server should exit with a clear, unambiguous error message. If we have a deployment issue with certificates, that should be solved in our deployment pipeline.

Currently, an error is logged when unable to read client certificates, yet the code continues on with a generated certificate.