You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the OpenTelemetry Collector supports TLS settings read from filepaths. This requires that the certificates exist on a file system and does not work with in memory certificates.
Describe the solution you'd like
Update the API for TLSSettings in configtls.go to fully support in memory certificates. This in memory data will be validated so that it doesn't exist in addition to a file path for the same data. For example, CertFile and CertPem cannot both be set but you can do CertFile with KeyPem. In addition, the existing file reload functionality doesn't take action for any in memory certificate.
Proposed API
// TLSSetting exposes the common client and server TLS configurations.// Note: Since there isn't anything specific to a server connection. Components// with server connections should use TLSSetting.typeTLSSettingstruct {
// Path to the CA cert. For a client this verifies the server certificate.// For a server this verifies client certificates. If empty uses system root CA.// (optional)CAFilestring`mapstructure:"ca_file"`// In memory PEM encoded cert. (optional)CAPem []byte`mapstructure:"ca_pem"`// Path to the TLS cert to use for TLS required connections. (optional)CertFilestring`mapstructure:"cert_file"`// In memory PEM encoded TLS cert to use for TLS required connections. (optional)CertPem []byte`mapstructure:"cert_pem"`// Path to the TLS key to use for TLS required connections. (optional)KeyFilestring`mapstructure:"key_file"`// In memory PEM encoded TLS key to use for TLS required connections. (optional)KeyPem []byte`mapstructure:"key_pem"`// MinVersion sets the minimum TLS version that is acceptable.// If not set, TLS 1.2 will be used. (optional)MinVersionstring`mapstructure:"min_version"`// MaxVersion sets the maximum TLS version that is acceptable.// If not set, refer to crypto/tls for defaults. (optional)MaxVersionstring`mapstructure:"max_version"`// ReloadInterval specifies the duration after which the certificate will be reloaded// If not set, it will never be reloaded (optional)ReloadInterval time.Duration`mapstructure:"reload_interval"`
}
Additional context
If this proposal is accepted, I will submit a PR with the proposed changes. If you'd like to review a prototype, this proposal has been implemented on a fork here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, the OpenTelemetry Collector supports TLS settings read from filepaths. This requires that the certificates exist on a file system and does not work with in memory certificates.
Describe the solution you'd like
Update the API for TLSSettings in configtls.go to fully support in memory certificates. This in memory data will be validated so that it doesn't exist in addition to a file path for the same data. For example,
CertFile
andCertPem
cannot both be set but you can doCertFile
withKeyPem
. In addition, the existing file reload functionality doesn't take action for any in memory certificate.Proposed API
Additional context
If this proposal is accepted, I will submit a PR with the proposed changes. If you'd like to review a prototype, this proposal has been implemented on a fork here.
The text was updated successfully, but these errors were encountered: