Project

General

Profile

Actions

Idea #20688

closed

Redirects to workbench send users to workbench 2

Added by Peter Amstutz 10 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench
Target version:
Start date:
07/21/2023
Due date:
Story points:
-
Release relationship:
Auto

Description

No more "Workbench 1" and "Workbench 2" distinction, now there is only "Workbench"
  • Assumes Workbench 1 is fully retired and no longer available
  • Workbench2 domain should continue to work since things may now link to it
Nginx rewrites paths destined for Workbench 1 and automatically redirects user to equivalent location in Workbench 2
  • Identify "potentially bookmarked URLs" (not every single possible route but things the user might have copied and pasted or otherwise saved).
  • Need to go through the routes.rb in Workbench1 and make a list
  • Look at all the things the "/actions?uuid=..." Workbench 1 endpoint does and make sure those redirects work?
  • Redirects to keep that include Workbench in the link, e.g. /collections/PDH/file-in-collection.txt
  • Where possible, redirects to content (e.g. file content) should go directly to the content and not force a load of Workbench 2, because non-browser apps like e.g. curl will not be able to render/execute Workbench 2 in order to follow a redirect.

Remove the "Go to Workbench 1" link on Workbench 2


Files

routes (35.6 KB) routes Peter Amstutz, 07/18/2023 02:38 PM

Subtasks 2 (0 open2 closed)

Task #20760: Review 20688-wb1-to-wb2-redirectsResolvedPeter Amstutz08/03/2023Actions
Task #20799: Review 20688-redirect-urldecodeResolvedPeter Amstutz07/21/2023Actions

Related issues

Related to Arvados Epics - Idea #17001: Arvados uses WB2 by defaultResolvedActions
Actions #1

Updated by Peter Amstutz 10 months ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz 10 months ago

  • Description updated (diff)
Actions #3

Updated by Peter Amstutz 10 months ago

  • Related to Idea #17001: Arvados uses WB2 by default added
Actions #4

Updated by Peter Amstutz 10 months ago

  • Target version changed from To be scheduled to Development 2023-08-02 sprint
Actions #5

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2023-08-02 sprint to Development 2023-07-19 sprint
Actions #6

Updated by Peter Amstutz 9 months ago

  • Assigned To set to Peter Amstutz
  • Category set to Workbench
Actions #7

Updated by Peter Amstutz 9 months ago

All the routes that workbench 1 has

Actions #8

Updated by Peter Amstutz 9 months ago

  • Status changed from New to In Progress
Actions #9

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2023-07-19 sprint to Development 2023-08-02 sprint
Actions #10

Updated by Peter Amstutz 9 months ago

20688-redirect-urldecode @ arvados-workbench2|84161e969c13b42451752bd5f134b968d15c1001

Workbench 2 URL-decoding fix that came up in trying to rewrite URLs.

developer-tests-workbench2: #1244

Actions #11

Updated by Lucas Di Pentima 9 months ago

I think it would be nice to have tests for this fix.

Actions #12

Updated by Peter Amstutz 9 months ago

20688-redirect-urldecode @ arvados-workbench2|756e585f2c1c50ed550d88c7becfe757dd9d8401

Adjusted the redirectTo unit test to include URI quoting

developer-tests-workbench2: #1247

Actions #13

Updated by Lucas Di Pentima 9 months ago

This LGTM, thanks!

Actions #14

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2023-08-02 sprint to Development 2023-08-16
Actions #15

Updated by Peter Amstutz 9 months ago

20688-wb1-to-wb2-redirects @ 929825efa55429c7a7c9c9bf76d3a71f94e9d0ce

  • arvbox uses wb2 by default
  • used arvbox to prototype the rewrite patterns from wb1 to wb2 paths
  • added redirects to salt but need to test it
Actions #16

Updated by Peter Amstutz 9 months ago

20688-wb1-to-wb2-redirects @ b48f7d783d1d865a259282f3177cbd7e17731254

  • Reworked so that "workbench.domain" serves wb2 and "workbench2.domain" is a redirect
  • arvados-formula probably needs some maintenance
Actions #17

Updated by Peter Amstutz 9 months ago

20688-wb1-to-wb2-redirects @ ef2644287f25a95b510c4532822f92b3ecd7e33a

Rebased on 20680-default-config-updates and 20610-installer-load-balancer to address any merge conflicts.

Actions #18

Updated by Lucas Di Pentima 9 months ago

Haven't manually tested, but LGTM.
One question, though: If we're setting up the redirects on the installer code, could we also remove wb1 installation altogether?

Actions #19

Updated by Peter Amstutz 9 months ago

Lucas Di Pentima wrote in #note-18:

Haven't manually tested, but LGTM.
One question, though: If we're setting up the redirects on the installer code, could we also remove wb1 installation altogether?

I could be wrong about this (I probably am), but my assumption was that the "workbench" role in arvados-formula is responsible for both installing the package and fetching the "workbench.domain" certificate and so without updating the formula, if we don't install the workbench role somewhere we don't have the certificate.

But now I am looking at it closer, and I see there's "letsencrypt_workbench_configuration.sls" and "letsencrypt_workbench2_configuration.sls", so maybe it ought to just be doing something like this?

### LETSENCRYPT
letsencrypt:
  domainsets:
    workbench.__DOMAIN__:
      - workbench.__DOMAIN__
    workbench2.__DOMAIN__:
      - workbench2.__DOMAIN__

Or maybe there's is an even better way to do this so there's just one certificate for both workbench.domain and workbench2.domain? (One issue I ran into was that the workbench.domain can't use the workbench2.domain certificate). Can we do this?

### LETSENCRYPT
letsencrypt:
  domainsets:
    workbench.__DOMAIN__:
      - workbench.__DOMAIN__
      - workbench2.__DOMAIN__
Actions #20

Updated by Lucas Di Pentima 9 months ago

Peter Amstutz wrote in #note-19:

I could be wrong about this (I probably am), but my assumption was that the "workbench" role in arvados-formula is responsible for both installing the package and fetching the "workbench.domain" certificate and so without updating the formula, if we don't install the workbench role somewhere we don't have the certificate.

AFAICT, arvados-formula has modules for wb1 and wb2 separately (see: https://github.com/arvados/arvados-formula/tree/main/arvados) and in provision.sh line 901 you can see that we're adding the corresponding states for the different workbench and workbench2 roles, so I would say it's possible to do. Nginx & LE configs are treated separately from the formula (with installer's custom pillars) so those could be kept while avoiding installing wb1.

But now I am looking at it closer, and I see there's "letsencrypt_workbench_configuration.sls" and "letsencrypt_workbench2_configuration.sls", so maybe it ought to just be doing something like this?
[...]
Or maybe there's is an even better way to do this so there's just one certificate for both workbench.domain and workbench2.domain? (One issue I ran into was that the workbench.domain can't use the workbench2.domain certificate). Can we do this?

I would have to do some testing, but I think it should be doable. OTOH, this might not be so trivial, so maybe we can write a new story for it?

Actions #21

Updated by Peter Amstutz 9 months ago

  • Status changed from In Progress to Resolved
Actions #22

Updated by Peter Amstutz 8 months ago

  • Release set to 66
Actions

Also available in: Atom PDF