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

[new UD] Improve Keycloak token refreshing #18311

Closed
akurinnoy opened this issue Nov 9, 2020 · 3 comments
Closed

[new UD] Improve Keycloak token refreshing #18311

akurinnoy opened this issue Nov 9, 2020 · 3 comments
Assignees
Labels
area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@akurinnoy
Copy link
Contributor

Is your task related to a problem? Please describe.

After introducing the che-workspace-client in order to perform REST API request in new dashboard (PR) it lost the ability to refresh the Keycloak token.

Describe the solution you'd like

The che-workspace-client should be able to expose an Axios instance. So, we can register interceptor that refreshes keycloak token. Additionally, we'll be able to refresh token depending on user activity in UD even if no API requests are done.

Describe alternatives you've considered

As an alternative solution, provide to che-workspace-client ability to add/remove user defined interceptors. That allows us to refresh keycloak token only on API request.

@akurinnoy akurinnoy added kind/task Internal things, technical debt, and to-do tasks to be performed. area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ labels Nov 9, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 9, 2020
@ibuziuk ibuziuk added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 9, 2020
@sleshchenko sleshchenko added this to the 7.23 milestone Nov 11, 2020
@sleshchenko sleshchenko modified the milestones: 7.23, 7.24 Dec 3, 2020
@sleshchenko
Copy link
Member

che-incubator/che-dashboard-next#86 partially or almost fixes issue with refreshing a token on the Dashboard Next.
But there still may be some corner cases that need additional fixes, as I faced with using expired token for establishing WebSocket connection, while I'm starting a workspace in tab that was inactive for some period (~5-10 minutes):
Screenshot_20201210_133105

@sleshchenko sleshchenko changed the title [new UD] It's not possible to refresh Keycloak token. [new UD] Improve Keycloak token refreshing Dec 10, 2020
@sleshchenko
Copy link
Member

sleshchenko commented Dec 10, 2020

Another case, create Custom Workspace when token is expired and I twice clicked Create and Open, first returns error, the second creates workspace without any issue:
Screenshot_20201210_140423

is fixed by che-incubator/che-dashboard-next#110

@sleshchenko
Copy link
Member

sleshchenko commented Jan 14, 2021

Closing the issue since the problems with requests with outdated tokens are fixed.
The websocket issue should be solved in the scope of #18490.

A dedicated issue is created to move interceptors on the workspace-client-lib side #18803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants