-
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
OpenID Connect and OAuth2 sign-on improvement #1112
Conversation
User groups are parsed directly from user infos. The config parameter `auth.sso.groups.url` is useless in that case. Note: an AuthenticationError is raised when no groups are available for the user.
Default now respects OpenID Connect conventions.
Something is drastrically changing, and may cause issues:Before this PR, the OAuth2 authentication code was extracted from an URL following the pattern
Now, it is extracted from an URL following the pattern
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. I have some comments on backend side. I let @nadouani review frontend code.
@1earch I was struggling with the same issues using OAuth (OpenID). Getting generic "Authentication Failed" issues but can't seem to find any logs indicating what could be wrong. Hopefully this change will fix this ^^ Great addition regarding the auto update btw! Any update about the merge/review? |
Last comment on this was Oct 22, 2019. Is there any update on this? |
…ctionality This commit fixes issue TheHive-Project#344 by backporting fix from TheHive repository. Original pull request from which the backport was taken can be found at TheHive-Project/TheHive#1112.
…ctionality This commit fixes issue #344 by backporting fix from TheHive repository. Original pull request from which the backport was taken can be found at TheHive-Project/TheHive#1112.
This patch fixes #1110.
Bug fixes
Invalid URL
on groups parsing (mentionned in OAuth2 User Info Failure #1010)Authentication failure
(OAuth2 not working : Authentication failure #946)Authentication failure
on disconnectionImprovements
Invalid URL
error)Authentication failure
on disconnection)In addition, I improved the login form when SSO signing in. Before this commit, nothing was displayed indicating that we were signing in using SSO. Now, when we are redirected to TheHive after signing on our federated identity provider, TheHive disables the login form and change button message to indicate that a SSO signing in is currently performed. The following image shows this feature:
Finally, a user with no matched roles (using the
group
mapper) can't SSO sign in. AnAuthenticationError
will be raised. This is needed in case of an internal user wants to access TheHive but should not: this user will match no profiles (read, write, admin).PS: I will submit another PR on TheHiveDocs to explain how to configure SSO login.