Skip to content

Commit

Permalink
mTLS Kong Admin API authentication support Kong (Kong#1958)
Browse files Browse the repository at this point in the history
Missing spaces in error logs.
  • Loading branch information
ludovic-pourrat committed Feb 6, 2022
1 parent d0882d1 commit dd311c5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/adminapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func MakeHTTPClient(opts *HTTPClientOpts) (*http.Client, error) {
}

if opts.CACertPath != "" && opts.CACert != "" {
return nil, fmt.Errorf("both --kong-admin-ca-cert-file and --kong-admin-ca-cert" +
"are set; please remove one or the other")
return nil, fmt.Errorf("both --kong-admin-ca-cert-file and --kong-admin-ca-cert are set; " +
"please remove one or the other")
}
if opts.CACert != "" {
certPool := x509.NewCertPool()
Expand Down Expand Up @@ -84,12 +84,12 @@ func MakeHTTPClient(opts *HTTPClientOpts) (*http.Client, error) {
// don't allow the caller to specify both the literal and path versions to supply the
// certificate and key, they must choose one or the other for each.
if opts.TLSClientCertPath != "" && opts.TLSClientCert != "" {
return nil, fmt.Errorf("both --kong-admin-tls-client-cert-file and --kong-admin-tls-client-cert" +
"are set; please remove one or the other")
return nil, fmt.Errorf("both --kong-admin-tls-client-cert-file and --kong-admin-tls-client-certare set; " +
"please remove one or the other")
}
if opts.TLSClientKeyPath != "" && opts.TLSClientKey != "" {
return nil, fmt.Errorf("both --kong-admin-tls-client-key-file and --kong-admin-tls-client-key" +
"are set; please remove one or the other")
return nil, fmt.Errorf("both --kong-admin-tls-client-key-file and --kong-admin-tls-client-key re set; " +
"please remove one or the other")
}

// if a path to the certificate or key has been provided, retrieve the file contents
Expand Down

0 comments on commit dd311c5

Please sign in to comment.