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

Oauth: Display friendly error message when role_attribute_strict=true and no valid role found #57818

Merged
merged 7 commits into from Oct 31, 2022

Conversation

kalleep
Copy link
Contributor

@kalleep kalleep commented Oct 28, 2022

What is this feature?
For oauth integrations we are currently returning a generic error response with a 500 http status if role_attribute_strict is set to true and no valid role was provided for the user:
2022-10-28-12:32:20

In this pr this behavior change to return a 401 http status code and a redirect to login page with a more descriptive message of why the login failed:
2022-10-28-12:34:09

Which issue(s) does this PR fix?:

Fixes #49367
Fixes #36339

@kalleep kalleep added add to changelog no-backport Skip backport of PR labels Oct 28, 2022
@kalleep kalleep added this to the 9.3.0 milestone Oct 28, 2022
@kalleep kalleep requested review from Jguer and a team October 28, 2022 10:34
@kalleep kalleep requested a review from a team as a code owner October 28, 2022 10:34
@kalleep kalleep self-assigned this Oct 28, 2022
@kalleep kalleep requested review from sakjur, papagian and zserge and removed request for a team October 28, 2022 10:34
@grafanabot
Copy link
Contributor

@grafanabot
Copy link
Contributor

@Jguer Jguer merged commit 052d142 into main Oct 31, 2022
@Jguer Jguer deleted the kalleep-jguer/oauth/error-messages branch October 31, 2022 08:11
@leandro-deveikis leandro-deveikis removed this from the 9.3.0 milestone Nov 14, 2022
@leandro-deveikis leandro-deveikis added this to the 9.3.0-beta1 milestone Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants