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

sso-{auth,proxy}: more verbose logging for debugging #126

Open
loganmeetsworld opened this issue Nov 28, 2018 · 8 comments
Open

sso-{auth,proxy}: more verbose logging for debugging #126

loganmeetsworld opened this issue Nov 28, 2018 · 8 comments
Assignees
Labels
chore Maintenance, cleanup, and administrative

Comments

@loganmeetsworld
Copy link
Contributor

loganmeetsworld commented Nov 28, 2018

As pointed out in #125, there are many places where it is hard to debug especially around validation of groups. We should make sure we have thorough logging throughout.

An example around validation: https://github.com/buzzfeed/sso/blob/master/internal/auth/authenticator.go#L805

Also, we've noticed the logging around the redeem flow and transaction is sparse. It'd be great to have a log of where it hits the server and what the state is.

https://github.com/buzzfeed/sso/blob/master/internal/proxy/providers/sso.go#L118

@mreiferson mreiferson changed the title more verbose logging for debugging sso-{auth,proxy}: more verbose logging for debugging Nov 29, 2018
@mreiferson mreiferson added the chore Maintenance, cleanup, and administrative label Nov 29, 2018
@loganmeetsworld
Copy link
Contributor Author

Other note: Let's print the configuration settings with all hosts and it's allowed groups on startup. This logic could be cleaned up to error better and log on startup too - https://github.com/buzzfeed/sso/blob/master/internal/auth/options.go#L264

@loganmeetsworld
Copy link
Contributor Author

See #101 as well

@weeco
Copy link

weeco commented Dec 5, 2018

Any update on this, so that I could figure out #125 ?

@loganmeetsworld
Copy link
Contributor Author

@cotarg is looking into places where logging could be more clear this week and we're hoping to tackle debugging related to #125. We also always welcome community contributions if you know what you'd like to add.

@weeco
Copy link

weeco commented Dec 11, 2018

Hey @cotarg any update on this issue? I am still eager to figure out what's causing #125 .

@weeco
Copy link

weeco commented Jan 22, 2019

@loganmeetsworld @cotarg Is this being worked on? Please let others know, I consider adding the additional logging myself. Did you hit any roadblocks which stopped you from adding the additional log messages?

@svenmueller
Copy link

We are currently having issues getting the group validating working (we followed the existing documentation step by step for setting up service account + domain-wide delegation and enabled ADMIN SDK). The current logged information doesn't really help when looking for the root cause:

{"error":"googleapi: Error 403: Not Authorized to access this resource/api, forbidden","level":"error","msg":"error retrieving groups","service":"sso-authenticator","time":"2019-07-19 09:59:35.7199"}
{"action":"profile","http_status":500,"level":"info","msg":"","proxy_host":"","remote_address":"xxx.xxx.xxx.xxx","request_duration":381.978062,"request_method":"GET","request_uri":"/profile?client_id=<ID>email=email%40domain.com\u0026groups=group%40domain.com","service":"sso-authenticator","time":"2019-07-19 09:59:35.7199","user":"","user_agent":"sso_proxy/HEAD"}

@cameronattard
Copy link
Contributor

+1 for better logging of the group validation process - we are occasionally seeing some flaky behaviour with group validation and have no ability to troubleshoot at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance, cleanup, and administrative
Projects
None yet
Development

No branches or pull requests

6 participants