sso
sso copied to clipboard
*: better startup error reporting
We aim to use structured logging throughout sso, but its use for reporting configuration errors that prevent successful startup actually makes the errors much harder to read and diagnose. Here's an example:
$ docker run --rm buzzfeed/sso:latest sso-proxy
{"error":"Invalid configuration:\n missing setting: cluster\n missing setting: provider-url\n missing setting: upstream-configs\n missing setting: cookie-secret\n missing setting: client-id\n missing setting: client-secret\n missing setting: email-domain\n missing setting: statsd-host\n missing setting: statsd-port","level":"error","msg":"error validing options","service":"sso-proxy","time":"2018-08-23 23:33:55.82311"}
In cases where invalid/incomplete configuration is provided, we should instead exit with a more readable error message.
Additionally, the error message above refers to settings as, e.g., provider-url
, which is a holdover from the days of CLI options. These configuration error messages should be in terms of env vars (i.e. PROVIDER_URL
in this example), given that env vars are the standard/preferred method of configuring sso.
This affects both sso-auth
and sso-proxy
.
hi @mccutchen , is this issue still open? I'd like to contribute! :D