Project

General

Profile

Actions

Idea #4919

open

[API] Arvados clients can use standard OAuth2 protocol instead of custom token handling mechanism

Added by Peter Amstutz about 9 years ago. Updated 27 days ago.

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

Description

While the API server uses OAuth2 to authenticate with the SSO server, Workbench does not use OAuth2 to authenticate with SSO directly, but instead follows a custom login flow that authenticates the user on API server with SSO, and then returns an API server token to workbench via a query parameter in a redirect URL.

https://tools.ietf.org/html/rfc6750 section 5.3:

Don't pass bearer tokens in page URLs: Bearer tokens SHOULD NOT be
passed in page URLs (for example, as query string parameters).
Instead, bearer tokens SHOULD be passed in HTTP message headers or
message bodies for which confidentiality measures are taken.
Browsers, web servers, and other software may not adequately
secure URLs in the browser history, web server logs, and other
data structures. If bearer tokens are passed in page URLs,
attackers might be able to steal them from the history data, logs,
or other unsecured locations.

Also, section 2.1:

OAuth2 specifies that the Authorization header using access tokens is "Authorization: Bearer XYZ" ( not "Authorization: OAuth2 XYZ" (which we use now)

Actions #1

Updated by Peter Amstutz about 9 years ago

Proposed flow for workbench:

  1. Workbench login button sends browser directly to SSO for sign in (no redirects via API server)
  2. SSO server performs log in, and redirects the user back to workbench with authorization code
  3. Workbench gets browser request with authorization code
    1. Workbench sends login request with authorization code to API server
  4. API server gets workbench request with authorization code
    1. API server sends authorization code to SSO for validation
  5. SSO gets request with authorization code from API
    1. SSO validates user identity and responds to API
  6. API gets response from SSO
    1. API server finds/creates user for associated SSO
    2. API server creates new API token and responds to workbench
  7. Workbench gets API token and puts it in the browser session
    1. Respond to browser by loading the desired page
Actions #2

Updated by Peter Amstutz about 9 years ago

Proposed flow for browser based apps that talk to API server directly:

  1. Login button sends browser directly to SSO for sign in (no redirects via API server)
  2. SSO server performs log in, and redirects the user back to browser app with authorization code
  3. Browser app sends login request with authorization code to API server
  4. API server gets browser app request with authorization code
    1. API server sends authorization code to SSO for validation
  5. SSO gets request with authorization code from API
    1. SSO validates user identity and responds to API
  6. API gets response from SSO
    1. API server finds/creates user for associated SSO
    2. API server creates new API token and responds to browser app
  7. Browser app gets API token and possibly puts it in local storage
    1. Browser proceeds to use API token to communicate with API server directly
Actions #3

Updated by Peter Amstutz about 9 years ago

  • Subject changed from Workbench uses OAuth2 instead of custom login flow to Arvados web apps use OAuth2 instead of custom login flow
Actions #4

Updated by Peter Amstutz about 9 years ago

  • Description updated (diff)
Actions #5

Updated by Peter Amstutz about 9 years ago

Also, OAuth2 specifies that the Authorization header using access tokens is "Authorization: Bearer XYZ" (https://tools.ietf.org/html/rfc6750) not "Authorization: OAuth2 XYZ" (which we use now)

Actions #6

Updated by Peter Amstutz about 9 years ago

  • Description updated (diff)
Actions #7

Updated by Peter Amstutz about 9 years ago

  • Description updated (diff)
Actions #8

Updated by Peter Amstutz about 9 years ago

  • Description updated (diff)
Actions #9

Updated by Tom Clegg about 9 years ago

  • Subject changed from Arvados web apps use OAuth2 instead of custom login flow to [API] Arvados clients can use standard OAuth2 protocol instead of custom token handling mechanism
  • Story points set to 2.0
Actions #10

Updated by Tom Clegg about 9 years ago

  • Target version set to Arvados Future Sprints
Actions #11

Updated by Ward Vandewege over 2 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #12

Updated by Peter Amstutz about 1 year ago

  • Release set to 60
Actions #13

Updated by Peter Amstutz 27 days ago

  • Target version set to Future
Actions

Also available in: Atom PDF