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

Use service account to download file #72

Merged

Conversation

nathanfranklin
Copy link
Collaborator

Overview:

This is a workaround for bug documented in

Sometimes a 403 is returned by tapis sometimes using the prod tenant
instead of the designsafe tenant. The workaround is to use the service
account on the designsafe tenant (which somehow "fixes" the problem in case someone tries to access the file again later)

PR Status:

  • Ready.

Related Jira tickets:

Testing Steps:

  1. Using main branch (or prod or staging)
  2. Try to import Photo 262_ARL.jpg from "/PRJ-2714/Data Sets by Location/Guanica Buildings/Images/Geotagged Images/”
  3. It should fail due to 403
  4. Use this PR's branch to do step 2
  5. It should work and you should see some warnings in the logs saying that we are using the service account
  6. Try again but this time it should just work without using the service account 🤷 as if we download it once on DS tenant then it "fixes" things. So if you need to retest things, we'll need to find another file where this bug occurs.

Notes:

I was thinking originally as doing a file listing by the user to check if they have access. I didn't do that. Instead, I just check if the system was public. So far, we've only seen this on published projects so hopefully it just occurs there. If occurs in private systems, we'll see that in the logs now and improve our work-around.

This is a workaround for bug documented in
* https://jira.tacc.utexas.edu/browse/CS-169
* https://jira.tacc.utexas.edu/browse/DES-2084

Sometimes a 403 is returned by tapis sometimes using the prod tenant
instead of the designsafe tenant. The workaround is to use the service
account on the designsafe tenant (which "fixes" the problem for
future downloads).
Copy link
Contributor

@duckonomy duckonomy left a comment

Choose a reason for hiding this comment

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

LGTM!

@duckonomy duckonomy merged commit 1dc62c2 into master Jan 20, 2022
@nathanfranklin nathanfranklin deleted the task/DES-2084-provide-workaround-for-failing-file-gets branch May 19, 2022 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants