11453: "sso_insecure" config applies to remote Arvados auth, too.
authorTom Clegg <tclegg@veritasgenetics.com>
Thu, 7 Dec 2017 20:33:22 +0000 (15:33 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Thu, 7 Dec 2017 20:33:22 +0000 (15:33 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

services/api/app/models/api_client_authorization.rb
services/api/config/application.default.yml

index 55bd31742e35d651ee581dfdaf4ced977f8de722..5f812191c160ae13fe49ded116ffee35a3ede726 100644 (file)
@@ -133,6 +133,9 @@ class ApiClientAuthorization < ArvadosModel
       # [re]validate it.
       begin
         clnt = HTTPClient.new
+        if Rails.configuration.sso_insecure
+          clnt.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
+        end
         remote_user = SafeJSON.load(
           clnt.get_content('https://' + host + '/arvados/v1/users/current',
                            {'remote' => Rails.configuration.uuid_prefix},
index 1bb45b90f46eed1d9d7af5cf6add84a4f7222561..a1c35f10fcf1f9e1aae9ead9bf1cda00b5f2535a 100644 (file)
@@ -410,9 +410,10 @@ common:
 
   arvados_theme: default
 
-  # Permit insecure (OpenSSL::SSL::VERIFY_NONE) connections to the Single Sign
-  # On (sso) server.  Should only be enabled during development when the SSO
-  # server is using a self-signed cert.
+  # Permit insecure (OpenSSL::SSL::VERIFY_NONE) connections to the
+  # Single Sign On (sso) server and remote Arvados sites.  Should only
+  # be enabled during development when the SSO server is using a
+  # self-signed cert.
   sso_insecure: false
 
   ## Set Time.zone default to the specified zone and make Active