Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Modify the incoming request auth header to use the new bearer token #110

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

JPinkney
Copy link
Collaborator

@JPinkney JPinkney commented Jan 7, 2021

What does this PR do?

Currently, when a request is made and the token is refreshed through the interceptors the incoming request token isn't modified, leading to issues like eclipse-che/che#18311 (comment). This PR makes sure that the incoming request token is updated when the keycloak token is updated

Which issue is this PR related to?

eclipse-che/che#18311

Signed-off-by: Josh Pinkney joshpinkney@gmail.com

@che-bot
Copy link

che-bot commented Jan 7, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

Copy link
Collaborator

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it fixes the issue with using expired access token for http requests.

But it does not solve the issue with websockets. Steps to reproduce:

  1. Open Dashboard.
  2. Wait until token is expired, use https://jwt.io/#debugger-io to check what is the time.
  3. Do any operation on the dashboard, like create a workspace from sample. Token is refreshed and used:tada:
  4. Do
oc patch deployment/che \
        --patch "{\"spec\":{\"replicas\":1}}
oc patch deployment/che \
        --patch "{\"spec\":{\"replicas\":0}}
  1. Check that Dashboard uses the expired token to establish websocket connection

But it must not block the current PR since it's a dedicated piece in the area of Workspace Client https://github.com/che-incubator/che-dashboard-next/blob/master/src/services/cheWorkspaceClient/index.ts#L135

@JPinkney
Copy link
Collaborator Author

I'm going to merge this PR and then introduce the changes for the WebSockets issue in another PR

@JPinkney JPinkney merged commit d365189 into che-incubator:master Jan 11, 2021
@JPinkney JPinkney deleted the request-fix branch January 11, 2021 13:15
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
@che-bot
Copy link

che-bot commented Jan 11, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

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

Successfully merging this pull request may close these issues.

4 participants