Skip to content

Commit

Permalink
Merge 73fc259 into e8b489e
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjenkins committed Aug 15, 2023
2 parents e8b489e + 73fc259 commit b97c63e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/policy.go
Expand Up @@ -496,14 +496,19 @@ func (p *Policy) Validate() error {
}
}

const clientCADeprecationMsg = "config: %s is deprecated, see https://www.pomerium.com/docs/" +
"reference/routes/tls#tls-downstream-client-certificate-authority for more information"

if p.TLSDownstreamClientCA != "" {
log.Warn(context.Background()).Msgf(clientCADeprecationMsg, "tls_downstream_client_ca")
_, err := base64.StdEncoding.DecodeString(p.TLSDownstreamClientCA)
if err != nil {
return fmt.Errorf("config: couldn't decode downstream client ca: %w", err)
}
}

if p.TLSDownstreamClientCAFile != "" {
log.Warn(context.Background()).Msgf(clientCADeprecationMsg, "tls_downstream_client_ca_file")
bs, err := os.ReadFile(p.TLSDownstreamClientCAFile)
if err != nil {
return fmt.Errorf("config: couldn't load downstream client ca: %w", err)
Expand Down

0 comments on commit b97c63e

Please sign in to comment.