-
Notifications
You must be signed in to change notification settings - Fork 640
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
OAuth2 User Info Failure #1010
Comments
@To-om Could we add a bit more logs to try figure out what happens there? |
I am having the same issue. I am using a 3.4.0-RC1 Hive veversion, please find my logs below:
|
Please check which property is not a valid URL in your config |
I am not able to figure it out that which URL is not valid. But according to default configuration redirect URL is redirecting to the Login page, I don't know why is this. remaining URLs are my OAuth provider related. My config as follows:
|
I am not able to figure it out that which URL is not valid. But according to default configuration redirect URL is redirecting to the Login page, I don't know why is this. remaining URLs are my OAuth provider related. My config as follows: auth { provider = [local, oauth2] oauth2 { sso { |
The login page is the callback URL your OAuth provided will call after you authentification. Once you come back to login page, TheHive will use the authorization code to get the authenticated user details and log you in. |
The error is clear
|
Thanks for the quick reply. |
Simpler Mapping is working fine but Group mapping is not working and throwing an error called invalid URL. Should I pass url for the group in the config like below: |
@ananth07reddy You need in fact a URL to fetch the user groups as said in your last comment |
Thank you for the quick reply. But I am using Keycloak as the identity provider and don't see any group uri to pass like above. |
Can you please send me an example full configuration because it is really confusing? I don't see that being used group.url in the config. |
Are we talking about 2 different issues here? My original issue was about a missing log message, but i think we're delving in to a different stated error message. Just don't want my original to get lost in the shuffle 😁 |
I agree @drewstinnett The OAuth feature is something that is not exhaustive, so we discover new use cases every time, new configurations etc... |
Hi @drewstinnett, I'm working on a PR that will improve OAuth2 support. After a deep study of the OAuth2 code, I think your error is presented when a field can't be found in user info. Could you check that
Note: I'm currently fixing the message not showing up in the PR |
Apologies for the delayed replay @1earch you were exactly right! The "name" attribute wasn't getting passed back. When I adjusted both name and login to "sub", the authentication succeeded, many thanks! |
Happy to help 🙂 |
Thanks @1earch and @drewstinnett I'm closing the issue. |
OAuth2 User Info Failure
Request Type
Bug
Work Environment
Problem Description
We are attempting to use the OAuth2 Authentication method implemented in #430, however we are getting an authentication error after the sign-on.
Steps to Reproduce
Authentication Failure
pops up, and the log message below appears in the logComplementary information
This is the log we get when the authentication fails
Our configuration is:
Looking at the code here, it appears that the error should be printed in the log after "User info fails: ", however in our logs nothing is showing up there.
Any help or pointers is appreciated, thank you!
The text was updated successfully, but these errors were encountered: