Skip to content

[Feature]: Better handle the Globus token file #398

@forsyth2

Description

@forsyth2

How will this affect the next version number?

New feature (increment MINOR version)

Is your feature request related to a problem?

  1. The token file is only set up to store one token at a time. This causes the following problem: If a user uses zstash to transfer to Globus Endpoint A and then to Globus Endpoint B, they will get a TransferAPIError, as described in case 1 of Update auth tests #397 (comment), unless they first delete the token file to start fresh (as in case 3 of that link)
  2. Since TOKEN_FILE is hard-coded as TOKEN_FILE = os.path.expanduser("~/.zstash_globus_tokens.json") in zstash/zstash/globus_utils.py, it is not currently possible to use different token files for different things (testing, for example, as noted in Update auth tests #397 (comment)).

Describe the solution you'd like

  1. Either allow the token file to store multiple tokens or allow the use of multiple token files. Either way, this will require either a way for zstash to accurately determine which token to use. With inadequate information there, it may have to resort to looping through tokens to check if they work.
  2. Allow the use of multiple token files or for users to specify which token file they want zstash to check.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions