Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: better startup error reporting #33

Open
mccutchen opened this issue Aug 24, 2018 · 1 comment
Open

*: better startup error reporting #33

mccutchen opened this issue Aug 24, 2018 · 1 comment
Labels
good first issue Good for newcomers papercuts frustrations to fix but not necessarily a bug

Comments

@mccutchen
Copy link
Contributor

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.

@mccutchen mccutchen added good first issue Good for newcomers papercuts frustrations to fix but not necessarily a bug labels Aug 24, 2018
@mreiferson mreiferson changed the title Better startup error reporting sso-{auth,proxy}: Better startup error reporting Nov 26, 2018
@mreiferson mreiferson changed the title sso-{auth,proxy}: Better startup error reporting sso-{auth,proxy}: better startup error reporting Nov 26, 2018
@mreiferson mreiferson changed the title sso-{auth,proxy}: better startup error reporting *: better startup error reporting Nov 26, 2018
@dbgoytia
Copy link

hi @mccutchen , is this issue still open? I'd like to contribute! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers papercuts frustrations to fix but not necessarily a bug
Projects
None yet
Development

No branches or pull requests

2 participants