17829: Remove additional references to SSO and omniauth
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 24 Jun 2021 14:46:44 +0000 (10:46 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 24 Jun 2021 14:46:44 +0000 (10:46 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

12 files changed:
doc/_config.yml
doc/api/tokens_sso.html.textile.liquid [deleted file]
lib/config/config.default.yml
lib/config/generated_config.go
lib/controller/rpc/conn_test.go
sdk/python/tests/run_test_server.py
services/api/app/assets/stylesheets/application.css
services/api/app/controllers/user_sessions_controller.rb
services/api/app/views/layouts/application.html.erb
services/api/app/views/static/intro.html.erb
services/api/app/views/static/login_failure.html.erb
services/api/test/test_helper.rb

index 55987c062fad7666e4541477b60584788fc7027f..06d15952131f118d1d7b79c2e80a97032ee5d3d5 100644 (file)
@@ -113,7 +113,6 @@ navbar:
       - api/requests.html.textile.liquid
       - api/methods.html.textile.liquid
       - api/resources.html.textile.liquid
-      - api/tokens_sso.html.textile.liquid
     - Permission and authentication:
       - api/methods/api_client_authorizations.html.textile.liquid
       - api/methods/api_clients.html.textile.liquid
diff --git a/doc/api/tokens_sso.html.textile.liquid b/doc/api/tokens_sso.html.textile.liquid
deleted file mode 100644 (file)
index 5d52465..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
----
-layout: default
-navsection: api
-title: API Authorization with SSO (deprecated)
-...
-{% comment %}
-Copyright (C) The Arvados Authors. All rights reserved.
-
-SPDX-License-Identifier: CC-BY-SA-3.0
-{% endcomment %}
-
-{% include 'notebox_begin_warning' %}
-This page describes the deprecated login flow via the SSO server. SSO server authentication will be removed in a future Arvados release and should not be used for new installations. See "Set up web based login":{{site.baseurl}}/install/setup-login.html for more information.
-{% include 'notebox_end' %}
-
-All requests to the API server must have an API token.  API tokens can be issued by going though the login flow, or created via the API.  At this time, only browser based applications can perform login from email/password.  Command line applications and services must use an API token provided via the @ARVADOS_API_TOKEN@ environment variable or configuration file.
-
-h2. Browser login
-
-Browser based applications can perform log in via the following highlevel flow:
-
-# The web application presents a "login" link to @/login@ on the API server with a @return_to@ parameter provided in the query portion of the URL.  For example @https://{{ site.arvados_api_host }}/login?return_to=XXX@ , where  @return_to=XXX@ is the URL of the login page for the web application.
-# The "login" link takes the browser to the login page (this may involve several redirects)
-# The user logs in.  API server authenticates the user and issues a new API token.
-# The browser is redirected to the login page URL provided in @return_to=XXX@ with the addition of @?api_token=xxxxapitokenxxxx@.
-# The web application gets the login request with the included authorization token.
-
-!{{site.baseurl}}/images/Session_Establishment_with_SSO.svg!
-
-The "browser authentication process is documented in detail on the Arvados wiki.":https://dev.arvados.org/projects/arvados/wiki/Workbench_authentication_process
-
-h2. User activation
-
-"Creation and activation of new users is described here.":{{site.baseurl}}/admin/user-management.html
-
-h2. Creating tokens via the API
-
-The browser login method above issues a new token.  Using that token, it is possible to make API calls to create additional tokens.  To do so, use the @create@ method of the "API client authorizations":{{site.baseurl}}/api/methods/api_client_authorizations.html resource.
-
-h2. Trusted API clients
-
-The "api_clients":{{site.baseurl}}/api/methods/api_clients.html resource determines if web applications that have gone through the browser login flow may create or list API tokens.
-
-After the user has authenticated, but before an authorization token is issued and browser redirect sent (sending the browser back to the @return_to@ login page bearing @api_token@), the server strips the path and query portion from @return_to@ to get @url_prefix@.  The @url_prefix@ is used to find or create an ApiClient object.  The newly issued API client authorization (API token) is associated with this ApiClient object.
-
-API clients may be marked as "trusted" by making an API call to create or update an "api_clients":{{site.baseurl}}/api/methods/api_clients.html resource and set the @is_trusted@ flag to @true@. An authorization token associated with a "trusted" client is permitted to list authorization tokens on "API client authorizations":{{site.baseurl}}/api/methods/api_client_authorizations.html .
-
-A authorization token which is not associated with a trusted client may only use the @current@ method to query its own api_client_authorization object.  The "untrusted" token is forbidden performing any other operations on API client authorizations, such as listing other authorizations or creating new authorizations.
-
-Authorization tokens which are not issued via the browser login flow (created directly via the API) inherit the api client of the token used to create them.  They will always be "trusted" because untrusted API clients cannot create tokens.
-
-h2(#scopes). Scopes
-
-Scopes can restrict a token so it may only access certain resources.  This is in addition to normal permission checks for the user associated with the token.
-
-Each entry in scopes consists of a @request_method@ and @request_path@.  The @request_method@ is a HTTP method (one of @GET@, @POST@, @PATCH@ or @DELETE@) and @request_path@ is the request URI.  A given request is permitted if it matches a scopes exactly, or the scope ends with @/@ and the request string is a prefix of the scope.
-
-As a special case, a scope of @["all"]@ allows all resources.  This is the default if no scope is given.
-
-Using scopes is also described on the "Securing API access with scoped tokens":{{site.baseurl}}/admin/scoped-tokens.html page of the admin documentation.
-
-h3. Scope examples
-
-A scope of @GET /arvados/v1/collections@ permits listing collections.
-
-* Requests with different methods, such as creating a new collection using @POST /arvados/v1/collections@, will be rejected.
-* Requests to access other resources, such as @GET /arvados/v1/groups@, will be rejected.
-* Be aware that requests for specific records, such as @GET /arvados/v1/collections/962eh-4zz18-xi32mpz2621o8km@ will also be rejected.  This is because the scope @GET /arvados/v1/collections@ does not end in @/@
-
-A scope of @GET /arvados/v1/collections/@ (with @/@ suffix) will permit access to individual collections.
-
-* The request @GET /arvados/v1/collections/962eh-4zz18-xi32mpz2621o8km@ will succeed
-* Be aware that requests for listing @GET /arvados/v1/collections@ (no @/@ suffix) will be rejected, because it is not a match with the rule @GET /arvados/v1/collections/@
-* A listing request @GET /arvados/v1/collections/@ will have the trailing @/@ suffix trimmed before the scope check, as a result it will not match the rule @GET /arvados/v1/collections/@.
-
-To allow both listing objects and requesting individual objects, include both in the scope: @["GET /arvados/v1/collections", "GET /arvados/v1/collections/"]@
-
-A narrow scope such as @GET /arvados/v1/collections/962eh-4zz18-xi32mpz2621o8km@ will disallow listing objects as well as disallow requesting any object other than those listed in the scope.
index 1f76f636607eaf07f89dea87c2c3ae843aeae024..645da56718d6ae10bda4fb7dd366541d034a20f8 100644 (file)
@@ -552,7 +552,7 @@ Clusters:
         MaxSessions: 100
 
     Login:
-      # One of the following mechanisms (SSO, Google, PAM, LDAP, or
+      # One of the following mechanisms (Google, PAM, LDAP, or
       # LoginCluster) should be enabled; see
       # https://doc.arvados.org/install/setup-login.html
 
index d5e0f200b84559845450c65c36da1092b84ef5d8..1bdc269c083b00b4e3e6d273c87d5a6c97726412 100644 (file)
@@ -58,9 +58,6 @@ Clusters:
       DispatchCloud:
         InternalURLs: {SAMPLE: {}}
         ExternalURL: "-"
-      SSO:
-        InternalURLs: {SAMPLE: {}}
-        ExternalURL: ""
       Keepproxy:
         InternalURLs: {SAMPLE: {}}
         ExternalURL: ""
@@ -561,7 +558,7 @@ Clusters:
         MaxSessions: 100
 
     Login:
-      # One of the following mechanisms (SSO, Google, PAM, LDAP, or
+      # One of the following mechanisms (Google, PAM, LDAP, or
       # LoginCluster) should be enabled; see
       # https://doc.arvados.org/install/setup-login.html
 
@@ -742,16 +739,6 @@ Clusters:
         # originally supplied by the user will be used.
         UsernameAttribute: uid
 
-      SSO:
-        # Authenticate with a separate SSO server. (Deprecated)
-        Enable: false
-
-        # ProviderAppID and ProviderAppSecret are generated during SSO
-        # setup; see
-        # https://doc.arvados.org/v2.0/install/install-sso.html#update-config
-        ProviderAppID: ""
-        ProviderAppSecret: ""
-
       Test:
         # Authenticate users listed here in the config file. This
         # feature is intended to be used in test environments, and
index cf4dbc47673e7713e8f9d77c2ebbb449077e4447..eee8db9ac830588754956afc62806b757d72b89a 100644 (file)
@@ -50,9 +50,8 @@ func (s *RPCSuite) TestLogin(c *check.C) {
        opts := arvados.LoginOptions{
                ReturnTo: "https://foo.example.com/bar",
        }
-       resp, err := s.conn.Login(s.ctx, opts)
-       c.Check(err, check.IsNil)
-       c.Check(resp.RedirectLocation, check.Equals, "/auth/joshid?return_to="+url.QueryEscape(","+opts.ReturnTo))
+       _, err := s.conn.Login(s.ctx, opts)
+       c.Check(err.(*arvados.TransactionError).StatusCode, check.Equals, 404)
 }
 
 func (s *RPCSuite) TestLogout(c *check.C) {
@@ -62,7 +61,7 @@ func (s *RPCSuite) TestLogout(c *check.C) {
        }
        resp, err := s.conn.Logout(s.ctx, opts)
        c.Check(err, check.IsNil)
-       c.Check(resp.RedirectLocation, check.Equals, "http://localhost:3002/users/sign_out?redirect_uri="+url.QueryEscape(opts.ReturnTo))
+       c.Check(resp.RedirectLocation, check.Equals, opts.ReturnTo)
 }
 
 func (s *RPCSuite) TestCollectionCreate(c *check.C) {
index 917d6100ae211853d379bcc04bbd4a591f3e625f..c022e6c874d23f099406b626374e7cfe5d0951c0 100644 (file)
@@ -755,9 +755,6 @@ def setup_config():
                 "http://%s:%s"%(localhost, keep_web_dl_port): {},
             },
         },
-        "SSO": {
-            "ExternalURL": "http://localhost:3002",
-        },
     }
 
     config = {
@@ -769,10 +766,14 @@ def setup_config():
                     "RequestTimeout": "30s",
                 },
                 "Login": {
-                    "SSO": {
+                    "Test": {
                         "Enable": True,
-                        "ProviderAppID": "arvados-server",
-                        "ProviderAppSecret": "608dbf356a327e2d0d4932b60161e212c2d8d8f5e25690d7b622f850a990cd33",
+                        "Users": {
+                            "alice": {
+                                "Email": "alice@example.com",
+                                "Password": "xyzzy"
+                            }
+                        }
                     },
                 },
                 "SystemLogs": {
index 721ff801c91c5aba35337fbd7a8efab7729d9f14..18895f6efc275cc019a5788ed9bbb6c3d88cf18c 100644 (file)
@@ -62,7 +62,7 @@ div#header span.beta > span {
     border-bottom: 1px solid #fff;
     font-size: 0.8em;
 }
-img.curoverse-logo {
+img.arvados-logo {
     height: 66px;
 }
 #intropage {
index aec586ecd77f37d1aff9d7ba64a4c3895ceca0b0..ae34fa76006aabe6c7866cee09d8249f58254567 100644 (file)
@@ -90,14 +90,14 @@ class UserSessionsController < ApplicationController
     flash[:notice] = params[:message]
   end
 
-  # logout - Clear our rack session BUT essentially redirect to the provider
-  # to clean up the Devise session from there too !
+  # logout - this gets intercepted by controller, so this is probably
+  # mostly dead code at this point.
   def logout
     session[:user_id] = nil
 
     flash[:notice] = 'You have logged off'
     return_to = params[:return_to] || root_url
-    redirect_to "#{Rails.configuration.Services.SSO.ExternalURL}users/sign_out?redirect_uri=#{CGI.escape return_to}"
+    redirect_to return_to
   end
 
   # login.  Redirect to LoginCluster.
index 881d1be13b7547160def8ceb0f38cf927b6877cd..b4f60de3469cab52848badac471a9e8f25b6cb50 100644 (file)
@@ -39,7 +39,6 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
 <% if current_user or session['invite_code'] %>
 <div id="footer">
-  <div style="float:right">Questions &rarr; <a href="mailto:arvados@curoverse.com">arvados@curoverse.com</a></div>
   <div style="clear:both"></div>
 </div>
 <% end %>
index 58943038d1b40ab82770bf7d166966775ced5bf6..8bab0b2ac64d8b217ffa22d0584a8e7b30e48018 100644 (file)
@@ -8,27 +8,20 @@ $(function(){
 });
 <% end %>
 <div id="intropage">
-  <img class="curoverse-logo" src="<%= asset_path('logo.png') %>" style="display:block; margin:2em auto"/>
+  <img class="arvados-logo" src="<%= asset_path('logo.png') %>" style="display:block; margin:2em auto"/>
   <div style="width:30em; margin:2em auto 0 auto">
     <h1>Welcome</h1>
-    <h4>Curoverse ARVADOS</h4>
+    <h4>ARVADOS</h4>
 
     <% if !current_user and session['invite_code'] %>
 
-    <p>Curoverse Arvados lets you manage and process human genomes and exomes.  You can start using the private beta
-    now with your Google account.</p>
+    <p>Arvados lets you manage and process biomedical data.</p>
     <p style="float:right;margin-top:1em">
-      <button class="login" href="/auth/joshid">Log in and get started</button>
+      <button class="login" href="/login">Log in and get started</button>
     </p>
 
     <% else %>
 
-    <p>Curoverse ARVADOS is transforming how researchers and
-    clinical geneticists use whole genome sequences. </p>
-    <p>If you&rsquo;re interested in learning more, we&rsquo;d love to hear
-    from you &mdash;
-    contact <a href="mailto:arvados@curoverse.com">arvados@curoverse.com</a>.</p>
-
     <% if !current_user %>
     <p style="float:right;margin-top:1em">
       <a href="/login">Log in here.</a>
index b3c6e70d907f4e460096ecbb06aaa6ccc7ddcd87..6b81a33e875b135a3fabdb12b458ad23386a78c3 100644 (file)
@@ -10,7 +10,7 @@ $(function(){
 
 
 <div id="intropage">
-  <img class="curoverse-logo" src="<%= asset_path('logo.png') rescue '/logo.png' %>" style="display:block; margin:2em auto"/>
+  <img class="arvados-logo" src="<%= asset_path('logo.png') rescue '/logo.png' %>" style="display:block; margin:2em auto"/>
   <div style="width:30em; margin:2em auto 0 auto">
 
     <h1>Error</h1>
index ee7dac4cd90099bb1d9b9fe17a9a781baaee5f1c..843d4f1b23fccfb8777883c3021ab54187b3cf57 100644 (file)
@@ -25,7 +25,6 @@ unless ENV["NO_COVERAGE_TEST"]
     SimpleCov.start do
       add_filter '/test/'
       add_filter 'initializers/secret_token'
-      add_filter 'initializers/omniauth'
     end
   rescue Exception => e
     $stderr.puts "SimpleCov unavailable (#{e}). Proceeding without."