sso
sso copied to clipboard
*: add useful --help output
We should add a --help CLI flag to both sso-auth and sso-proxy that outputs documentation about configuration, for anyone exploring or debugging the apps at the command line.
At the moment, the --help flag is ignored and instead the user is greeted with a big error message about a bunch of invalid settings (see also #33):
$ docker run --rm buzzfeed/sso:latest sso-proxy --help
{"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-24 23:49:58.82411"}
Isn't --help a builtin feature of Go's CLI flag library? Are we not using that under-the-hood?