-
Notifications
You must be signed in to change notification settings - Fork 4
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
Make sure login errors from hydra are actually handled in the authentication/handlers.go #323
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-919.
|
In case the client-id or client-secret is misconfigured for admin-ui, we end up on the Login UI.
|
Same goes for a misconfigured redirect URI.
|
ConclusionLogin UI already handles the first two kinds of errors decently, those fall in the misconfiguration scenario, for which we need to rely on the administrator deploying the Bundle or the Admin UI, making sure the login flow works correctly. There is no way to be alerted of a misconfiguration without running the app, unless we provide some sort of dynamic validation hitting hydra APIs, which is way overkill. For the external IdP scenario, I just tested Github, but although other IdPs tend to behave the same way, some may not. We should opportunistically check for other IdPs behavior as a best effort activity and make sure we handle errors in a graceful way. Although different providers may respond with different payloads / query parameters "schemas" so we'll see what we can do about having a generic approach to that. |
Reopening this issue. The purpose of the issue was to validate that the admin UI handles the errors returned from the OP, not if the platform can handles errors from the external providers. Per the OAuth2 spec:
To see that the admin UI does not handle oauth2 errors correctly, you can just visit https://iam.dev.canonical.com/stg-identity-jaas-dev-admin-ui/api/v0/auth/callback?error=error&error_description=The+error+is+unrecognizable&state=fdsafdsa (this came up after looking into https://warthogs.atlassian.net/browse/IAM-1136) |
Description
We need to make sure that Admin Service correctly handles cases in which the Hydra login flow ended with an error.
Hydra seems to redirect to Admin UI with error query parameters, we need to return a correct API response with the contextual errors.
In order to simulate this error we need to test this with:
Some of this will probably not even redirect to the Admin Service, in that case we won't be able to do much. But still, we need to return a 400 error in case something goes wrong and Hydra still redirects the useragent to the Admin UI.
The text was updated successfully, but these errors were encountered: