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

File Access API not working for unpublished file -- even with key #2719

Closed
raprasad opened this issue Nov 3, 2015 · 12 comments
Closed

File Access API not working for unpublished file -- even with key #2719

raprasad opened this issue Nov 3, 2015 · 12 comments
Assignees
Milestone

Comments

@raprasad
Copy link
Contributor

raprasad commented Nov 3, 2015

Problem/Symptom

For the genTB project, this TwoRavens page is no longer working:

https://rserve.dataverse.harvard.edu/dataexplore/gui.html?dfId=2693726&key=--TOKEN HERE--

Bug

The failure point is the Dataverse API, particularly this call which returns a 403-Forbidden:

https://dataverse.harvard.edu/api/access/datafile/2693726?key=--TOKEN HERE--&format=prep

This is for a file in an unpublished Dataverse ( Tuberculosis Dataverse > Strain and host phenotype). The TwoRavens page has functioned for months until the last patch for 4.2.1.

  • Dataverse: Tuberculosis Dataverse
  • Dataset: Strain and host phenotype
  • File: Strain_Host_Phenotype.tab
@landreev
Copy link
Contributor

landreev commented Nov 3, 2015

OK, the symptoms are pointing to this being a problem with an API key-based access.
But it hasn't been verified yet for sure.
As we were testing the ticket related to access to unpublished files @kcondon told me he was testing BOTH the gui (session-based) and the token-based authentication.

@landreev
Copy link
Contributor

landreev commented Nov 3, 2015

Yes... It is a problem with the API key auth... Introduced in one of the last commits in 4.2.1.
I would like to patch the production with this quickly. This will be a single class file fix.

@bencomp
Copy link
Contributor

bencomp commented Nov 4, 2015

I would like to see a new patch release (4.2.2) instead of single class file fixes.

@landreev
Copy link
Contributor

landreev commented Nov 4, 2015

Sure, of course.
I was talking about patching on our own production server; which needs to be done asap. And I may have to fix it today by dropping in a replacement class; and patch a release later.

@landreev
Copy link
Contributor

landreev commented Nov 4, 2015

I committed a fix. Kevin and I will be testing it some more tomorrow.

@landreev landreev assigned kcondon and unassigned landreev Nov 4, 2015
@bencomp
Copy link
Contributor

bencomp commented Nov 5, 2015

I understand, @landreev, but it seems like a really bad idea to replace classes in production, because it may cause other bugs, just like not testing caused this actual bug. If you really think you can fix bugs quickly, I prefer that they are part of releases, however small they may be. Then go the way of Continuous Deployment. In any case: test properly before deploying fixes/single-class patches/releases. Of course I'm repeating myself here :)

@kcondon
Copy link
Contributor

kcondon commented Nov 5, 2015

Tested prior use cases both with session and with key and it is working. Will have Raman verify before closing.

@landreev landreev added this to the 4.2.2 milestone Nov 6, 2015
@landreev
Copy link
Contributor

landreev commented Nov 6, 2015

You are @bencomp, you really are. :)

@raprasad
Copy link
Contributor Author

raprasad commented Nov 6, 2015

@kcondon, I verified this as working on https://dataverse-internal.iq.harvard.edu/

@landreev
Copy link
Contributor

landreev commented Nov 6, 2015

OK, so the production servers have been patched with this fix, as of last night. Which has solved the urgent problem this was causing, for these users and their presentation.
We will release a "clean" 4.2.2 patch next week; but we now time to do it properly.

@landreev
Copy link
Contributor

landreev commented Nov 6, 2015

I meant "we now have time to do it properly"; as opposed to having to do it in a hurry and introduce even more bugs on account of that...

@kcondon
Copy link
Contributor

kcondon commented Nov 18, 2015

OK, verified both session and key work for downloading an unpublished and published file. Closing.

@kcondon kcondon closed this as completed Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants