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

Return meaningful errors when the user has not backend services tokens #571

Open
lorenzo-cavazzi opened this issue May 11, 2022 · 1 comment

Comments

@lorenzo-cavazzi
Copy link
Member

Description

It may happen that users have a valid KeyCloak authentication token but no backend tokens.
This happened recently in a couple of cases:

  • GitLab was restarted and the tokens were not valid anymore
  • A user tried to use the KeyCloak authentication without redirecting the users to /api/login

The Gateway triggers an exception and the APIs invoked respond with a 500 error. Details in Sentry:

Reproduce

The swagger endpoint simplifies reproducing this.
Log out from any dev deplyoment, go to the swagger page (<URL>/swagger) and authorize with pkce. Then try to invoke any API on the core service.

Screenshot_20220511_163216

Other info

Handling that case properly may require changing the UI server as well to add the headers marking the response as "auth-invalid". That will automatically trigger a re-login in the UI client

Screenshot_20220511_143904

@rokroskar
Copy link
Member

relates to / is a duplicate of #553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants