galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

`Export datasets` tool ignores user's credentials

Open davelopez opened this issue 1 year ago • 1 comments

Describe the bug The tool Export datasets to remote files source does not provide the user's context to access the credentials when exporting.

Galaxy Version and/or server at which you observed the bug Galaxy Version: 24.0 Commit: (run git rev-parse HEAD if you run this Galaxy server)

Browser and Operating System Operating System: Windows, Linux, macOS Browser: Firefox, Chrome, Chrome-based, Safari

To Reproduce Steps to reproduce the behavior:

  1. Setup a writeable file source plugging that requires a token or password
  2. Login with a user and make sure you set up the file source credentials in the settings
  3. Try to export a dataset to that file source using http://127.0.0.1:8081/?tool_id=export_remote&version=latest
  4. See the export fail

Expected behavior The user's credentials should be available when trying to export.

davelopez avatar May 28 '24 08:05 davelopez

So the point where we are missing the user_context is here:

https://github.com/galaxyproject/galaxy/blob/c2438b2f06b92bc7169e5974f962de41e10cbc7b/tools/data_export/export_remote.py#L35

However, I'm failing to see how I can access the requesting user in the tool script to build the user_context :thinking:

Any hints?

davelopez avatar May 29 '24 14:05 davelopez

Bumping this issue - I just ran into this myself.

I can export to Zenodo sandbox just fine using "Export history to file" or using the workflow invocation export wizard. But the "Export Datasets" tool doesn't pick up my credentials at runtime (even though it lists the available Zenodo sandbox records just fine when using the UI to set the "Directory URI" setting).

elichad avatar Feb 20 '25 10:02 elichad

This should be possible now using the new way of integrating Zenodo and Invenio-based repositories in combination with this fix https://github.com/galaxyproject/galaxy/pull/19768. There is a new blog post covering this approach here https://galaxyproject.org/news/2025-03-10-inveniordm-integration-update/

davelopez avatar Mar 11 '25 13:03 davelopez