sso icon indicating copy to clipboard operation
sso copied to clipboard

sso-proxy: logs alternate between JSON and plain text

Open sporkmonger opened this issue 7 years ago • 1 comments

Describe the bug

This popped up while writing the tests for TLS verification.

{"error":"x509: certificate signed by unknown authority","level":"error","msg":"error in upstreamTransport RoundTrip","service":"sso","time":"2018-09-18 16:13:01.9184"}
2018/09/18 16:13:01 server.go:2979: http: TLS handshake error from 127.0.0.1:55948: remote error: tls: bad certificate
2018/09/18 16:13:01 reverseproxy.go:395: http: proxy error: x509: certificate signed by unknown authority
{"error":"unsupported protocol scheme \"\"","level":"error","msg":"error in upstreamTransport RoundTrip","service":"sso","time":"2018-09-18 16:13:01.9184"}

To Reproduce Steps to reproduce the behavior:

  1. TLS verification failures will trigger the bug

Expected behavior If logging in JSON format, all logs should be in JSON format.

Caveats I've run into this issue countless times in Go and it's honestly a pain to fix.

sporkmonger avatar Sep 18 '18 23:09 sporkmonger

Caveats I've run into this issue countless times in Go and it's honestly a pain to fix.

lol, yes

mreiferson avatar Nov 26 '18 02:11 mreiferson