Project

General

Profile

Actions

Bug #17568

closed

Get API token dialog shows incorrect token expiration on federated tokens

Added by Lucas Di Pentima almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Start date:
04/29/2021
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

Federated tokens make WB2 to show their internal refresh token timeout setting instead of the real token expiration.


Subtasks 1 (0 open1 closed)

Arvados - Task #17588: Review 17568-api-token-dialog-expiration-fixResolvedPeter Amstutz04/29/2021

Actions
Actions #1

Updated by Lucas Di Pentima almost 2 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Peter Amstutz almost 2 years ago

  • Release set to 38
Actions #3

Updated by Lucas Di Pentima almost 2 years ago

Updates at arvados-workbench2|7d40a4a - branch 17568-api-token-dialog-expiration-fix
Test run: developer-tests-workbench2: #397

  • Makes wb2 ask for federated token to the correct cluster.
  • Adds unit test -- lots of mocking to simulate a federation, I hope the approach is correct.
Actions #4

Updated by Lucas Di Pentima almost 2 years ago

  • Target version changed from 2021-04-28 bughunt sprint to 2021-05-12 sprint
Actions #5

Updated by Peter Amstutz almost 2 years ago

17568-api-token-dialog-expiration-fix @ 7d40a4a432ce8dfea8e49f3d330220aea6957790

This LGTM, just a couple of comments:

  • Does typescript have finally ?
    -            await dispatch<any>(saveApiToken(token)); // .then(() => {
    -            await dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
    -        } catch (e) {
    -            dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
    -        }
    +            await dispatch<any>(saveApiToken(token));
    +        } catch (e) {}
    +        dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
    
  • It would be nice if the expiration time was also expressed as an approximate duration: "will expire in X days|hours|minutes" in addition to giving the time and date. This is not a blocker, just an observation.
Actions #6

Updated by Lucas Di Pentima almost 2 years ago

Peter Amstutz wrote:

  • Does typescript have finally ?

Whoops, you're right, fixed!

  • It would be nice if the expiration time was also expressed as an approximate duration: "will expire in X days|hours|minutes" in addition to giving the time and date. This is not a blocker, just an observation.

Found a nice library (Moment.js) that does this and other time related tasks really nicely.

Updates at arvados-workbench2|ec121e0
Test run: developer-tests-workbench2: #400

Actions #7

Updated by Anonymous almost 2 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF