-
Notifications
You must be signed in to change notification settings - Fork 187
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: issue with group validation #125
Comments
@weeco thanks for filing this issue. One thing that might be happening is that if the user has ever been a member of the group previously, it's possible with the way that we cache membership they are still a member of that group in the period before we flush the cache. The point about logging is good. We could definitely do a better job with logging as I don't see that we log the groups anywhere and that could be helpful to catch this caching issue. |
I restarted the pod multiple times to see if it would log anything on startup. The example user john.doe has never been part of the groups above. In my oppinion it looks like it hasn't been able to fetch the groups from the organization at all. I don't have any further logging to get any insights into this issue. What could I do to resolve or further debug this issue right now? It's been a kinda disappointing process to migrate from the OAUth proxy to buzzfeed sso proxy until now, due to the lack of log messages |
What do you mean by "accounts configuration" file? |
Sorry for not being clear. I mean, following this step, the generated json file, redacted of course? Also, ensure you've followed these steps correctly. Ensure you the service account on the credentials page too. I'm also ensuring we're handling the nil case here correctly, but cannot see any reason a user not in any groups would have universal access for a given email domain. Will keep looking. |
I downloaded the service account JSON file from google and put it as secret into my kubernetes namespace. I can ensure it's working as the exact same secret is being used by the OAuth2 proxy. I could imagine there is an issue with buzzfeed SSO proxy picking up the allowed groups config, but once again due to lacking logs I can not tell whether it's using the allowed groups configuration or no. Would be helpful to print the configuration settings with all hosts and it's allowed groups on startup (at least in a debug / verbose log level? |
We agree that logging could be more verbose in that, and other, area(s). It's something we hope to address in #126 either through our own work or a community contribution to add the logging. We're definitely going to discuss this in our issue triage at the end of the week. One last question I have is - Is the name of the env var for the google account json file |
I will check that tomorrow, thank you for the support and the quick responses. Looking forward for the more verbose logging for sure :-). |
Just checked what you asked for. This is part of my deployment configuration:
I connected to one of the pods and I also ensured the json file is existent under this path. The structure of the JSON is a common service account (issued JSON file from Google Cloud). Do you still want me to post the redacted service account JSON contents? |
@weeco have you also added in the refer you to #105 (comment) on where to add the config values to flesh this out more, i’m positing that perhaps this is failing back to a non-group based access control since not everything needed for group based access control is present. think you could provide a redacted version of the config vars you are passing to the sso-auth container? |
Yes I did pass the environment variable to the deployment. Sure I can put the redacted version of all kubernetes deployments online here on Monday |
I had the same issue what after configuring group validation using readme it didn't work. |
@vitalis I think the scope is missing the "group" and should be |
It's your config. From the source, 'config' needs to be at the same level as 'to' and 'from'. Try this:
If you don't have it at that level, the deserializer ignores it and it's the same as having specified no groups at all. I had the same issue, and that did it for me. |
I am also hitting the same issue. |
So I'm having the following errors when use
With the configs look correct:
And I already double checked the Oauth scopes mentioned in the docs. Any ideas? |
Any updates on this? We are also seeing the issue above. |
I think I've found the cause. I don't know Go so lots of logging.Info was used :-) Submitted a PR: |
👋 I think this issue has become somewhat mixed up with different problems. Regarding some of the last few messages referring to the below error:
please take a look at #230 and mention there if you're still running into this error. Regarding the initial error brought up, a lot has changed since this was opened or active so I'll close this off for now. However, for anyone that finds this error while searching, make sure you're not being caught out by #125 (comment) (good catch @nikogura!). Otherwise, please feel free to start a new issue if required! Thank you! |
Describe the bug
I configured the buzzfeed SSO proxy to allow only specific groups inside of my google organization, but I can still login with an account which is not part of any group specified in the allowed groups.
I'll attach only some of the (relevant) redacted configurations before I paste all the configurations
Upstream config:
Logs when I am logging in with my not allowed user (which is only part of
[email protected]
but not part of group1 and group2):Expected behavior
Even if it is a missconfiguration on my side I'd expect definetely a more verbose log, which indicates during the login what groups are allowed, and what groups the logged user is attached to. Also I couldn't find any log lines which indicate that the service has successfully read all groups my google organization. I'd expect something like a list of read groups (or the number of successfully read groups using the google admin api credentials).
For instance the log line below should probably show the groups the user
[email protected]
is part of, right? If this is correct, this doesn't work apparently, and I haven't seen any error logs right after starting the service (e. g. "Couldn't read groups from google organization"), nor did I receive a message which says, yes it worked.Question:
How can I see if pulling the group information from my google organization did work or not?
Should the property
in_groups
during a login process show the organization groups which the user is part of?The text was updated successfully, but these errors were encountered: