Project

General

Profile

Actions

Bug #18936

open

[api] [controller] remove reader_token support

Added by Ward Vandewege over 2 years ago. Updated 5 months ago.

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

Description

Workbench 1 appends the anonymous user token in a "reader token" to each GET request to make sure that content shared with the anonymous user is available to authenticated users, even if not shared with explicitly with them.

Controller just appends any reader tokens received to the token list for the request.

API uses reader_tokens for GET requests in (services/api/app/controllers/application_controller.rb).

But it also does something else; in services/api/app/middlewares/arvados_api_token.rb it seems that if the primary session token is not valid, the first working reader token is used instead.

Workbench 2 does not use reader_tokens (which means authenticated users can not access data only shared with the anonymous user!).

Nothing else in our codebase appears to use reader_tokens.

Our documentation does not mention reader_tokens.

#18937 is about simplifying the anonymous token configuration - basically, doing away with the need for an anonymous token at all. Once that is done, we can remove the controller and API code that handles reader_tokens. Maybe log a warning if a reader token is used (though, as long as WB1 is around, that's going to generate a lot of noise in the logs)?


Related issues

Related to Arvados - Bug #18887: [federation] wb1 fiddlesticks in login federationResolvedWard Vandewege03/25/2022Actions
Related to Arvados Epics - Idea #17001: Arvados uses WB2 by defaultResolvedActions
Blocked by Arvados - Feature #18937: [config] simplify AnonymousUserToken configurationNewActions
Actions

Also available in: Atom PDF