IQSS / IQSS/dataverse

Globus integration assumes app is running on Dataverse server

Open
#9,831 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: File Upload & Handling Type: Bug User Role: Sysadmin
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Hi there .. I attempted to integrate the dataverse-globus app with Dataverse and had an issue because Dataverse assumes the app is running locally, and I had installed it on a separate server, for various reasons. Per Jim M, "the app call the /api/datasets/{id}/addGlobusFiles call and the URL to call is picked up from the 'origin' header sent in with that call, which means that it's hardcoded right now to assume the app and Dataverse are running on the same machine."

That is happening in this code: https://github.com/IQSS/dataverse/blob/497c578ca11cd328e45c913d06c0ee20547b881f/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java#L3388-L3392

What then happens is the API call to upload the file to dataverse replaces the URL of the app server with the dataverse server URL and the upload fails, even though the Globus upload to the bucket is successful.

The workaround to make it work was to change the domain name of our app server to include the word "localhost", which caused the code to just look for that in the string, and then it replaces the server name with "http://localhost:8080" which makes the API call successful. I am requesting that the code be changed to also allow the app to run on a separate server with a separate domain name, which is reflected in the upload API call.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/main/java/edu/harvard/iq/dataverse/api/Datasets.java around lines 3388-3392 and trace the /api/datasets/{id}/addGlobusFiles request. Verify how the origin header is used to construct the upload callback URL. Done means a dataverse-globus app on a separate server and domain can complete the upload without replacing its URL with the Dataverse server URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.