ScilifelabDataCentre / dds_web

A cloud-based system for the delivery of data from SciLifeLab Facilities to their users (e.g. research group).
Other
7 stars 7 forks source link

Possible to renew token during ongoing request? #921

Closed i-oden closed 2 years ago

i-oden commented 2 years ago

For production purposes

If the download can be made non-blocking, an option could be that the user can interact with the cli during download and refresh the token using the username:password and hotp. The saved token would be refreshed on successful authentication and the download could continue within expiration time. Of course, there should be a check if the token is readable, in case a new download will be initiated while the token is being renewed. The download can wait for token renewal at most X minutes and timeout afterwards.

alneberg commented 2 years ago

I imagined that one would run the upload/download in one terminal tab and run dds auth login in another terminal tab. I believe and hope that there won't be any blocks for that. I think the file system deals with attempts to read a token from a file that is being written to. However I think the CLI only reads the token from file once and keeps it in memory for the other requests so we need to think of a way for it to know when to re-read the token. Perhaps re-read it once every 24 hours or so?

i-oden commented 2 years ago

Duplicate. Also moved to Jira.