buzzfeed / sso

sso, aka S.S.Octopus, aka octoboi, is a single sign-on solution for securing internal services
MIT License
3.1k stars 186 forks source link

*: add useful --help output #34

Open mccutchen opened 6 years ago

mccutchen commented 6 years ago

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"}
mreiferson commented 6 years ago

Isn't --help a builtin feature of Go's CLI flag library? Are we not using that under-the-hood?