Project

General

Profile

Actions

Bug #16812

closed

Token appears in the download URL, being shared by accident

Added by Peter Amstutz over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-
Release relationship:
Auto

Description

Users are sharing download URLs with embedded user tokens. Workbench2 should hand off to keep-web in a way that does not expose the token to the user.

I believe the way Workbench 1 does it is by linking to a special workbench path, which returns a redirect which includes ?api_token in the query, when keep-web gets the request it returns a cookie and another redirect to the final URL with the ?api_token stripped, this is the one the user sees, with the token safely stashed in a cookie.

The different methods of doing token hand-off are described here:

https://dev.arvados.org/projects/arvados/repository/revisions/master/entry/services/keep-web/doc.go

// If a token is provided in a query string or in a POST request, the
// response is an HTTP 303 redirect to an equivalent GET request, with
// the token stripped from the query string and added to a cookie
// instead.

Workbench 2 collection should do something like:

  1. Provide "copy link to clipboard" in the context menu. The copied link must not have the token.
    1. This should probably be a special workbench2 link which will verify the user is logged in (or go through the login dance) and then redirect to keep-web as described next
  2. The "open file" and "open in new tab" behaviors should navigate to the download location with ?api_token in the query (it must not include the token in the path with "/t=.../")
  3. Keep-web will respond with a redirect which strips ?api_token from the URL and puts the token in a cookie.

Files

Captura de Pantalla 2020-11-11 a la(s) 18.38.49.png (148 KB) Captura de Pantalla 2020-11-11 a la(s) 18.38.49.png Missing image preview Lucas Di Pentima, 11/11/2020 09:41 PM
img preview failed on ce8i5.png (93.3 KB) img preview failed on ce8i5.png Lucas Di Pentima, 12/08/2020 02:38 PM

Subtasks 2 (0 open2 closed)

Task #16882: Review 16812-token-appears-in-the-download-URLResolvedPeter Amstutz10/07/2020Actions
Task #17200: Review: 16812-images-issue-fixClosedDaniel Kutyła12/07/2020Actions

Related issues

Related to Arvados - Bug #17202: [keep-web] Don't use 303-with-cookie when serving inline preview content as a third-party siteResolvedTom Clegg12/09/2020Actions
Actions

Also available in: Atom PDF