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

TRE UI does not update when an action on a VM completes #3353

Closed
anastasiakuzn opened this issue Mar 20, 2023 · 1 comment · Fixed by #3724
Closed

TRE UI does not update when an action on a VM completes #3353

anastasiakuzn opened this issue Mar 20, 2023 · 1 comment · Fixed by #3724
Assignees
Labels
bug Something isn't working

Comments

@anastasiakuzn
Copy link
Contributor

For example, trying to stop a machine. The UI did not appear to register the request.

CleanShot 2023-02-14 at 14 00 46

then this only after refresh ....

CleanShot 2023-02-14 at 14 02 44

The same happened when I tried to deploy a new machine. The little blue spinner just told me the process was pending, until I refreshed the browser page.

@anastasiakuzn anastasiakuzn added the bug Something isn't working label Mar 20, 2023
@martinpeck
Copy link
Member

I believe I've worked out what's going on here.

This does not reproduce if you are a TREAdmin. Users who see this do not have admin access.
Users have multiple bearer tokens when using the TRE UI:

  1. a bearer token for general access to the TRE
  2. a bearer token specifically for accessing resources in a given workspace

By looking at the browser dev tools, and inspecting the bearer token for a user seeing this issue, I can see that the token being presented for these updates is the first token (the general access token) and so the user is presenting as a TREUser...

"roles": [
    "TREUser"
  ],

The UI makes calls to the API to get updates for the workspace. The URL it calls is...

https://mrictretest.uksouth.cloudapp.azure.com/api/workspaces/<workspace-id>

This API route is only callable by users in the following roles...

["TREAdmin", "WorkspaceOwner", "WorkspaceResearcher", "AirlockManager"]

and so, the API call returns an HTTP 403 and this is why the UI doesn't update.

@marrobi marrobi moved this to Up Next in Azure TRE - Engineering Sep 22, 2023
@marrobi marrobi self-assigned this Sep 22, 2023
marrobi added a commit to marrobi/AzureTRE that referenced this issue Sep 22, 2023
@marrobi marrobi moved this from Up Next to In Progress in Azure TRE - Engineering Sep 22, 2023
marrobi added a commit that referenced this issue Sep 25, 2023
* TRE UI does not update when an action on a VM completes
Fixes #3353

* update ui version

* Refactor workspace operation retrieval

* update based on review
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure TRE - Engineering Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants