[ARVADOS] created: 2.1.0-238-gbb878d566

Git user git at public.arvados.org
Wed Dec 23 21:20:51 UTC 2020


        at  bb878d5668a08845462166a301bce27476b38026 (commit)


commit bb878d5668a08845462166a301bce27476b38026
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Dec 23 16:19:39 2020 -0500

    17224: Provide alternate credentials to use for creating user tokens
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/login-sync/bin/arvados-login-sync b/services/login-sync/bin/arvados-login-sync
index 8162e22a2..492893e60 100755
--- a/services/login-sync/bin/arvados-login-sync
+++ b/services/login-sync/bin/arvados-login-sync
@@ -31,6 +31,9 @@ keys = ''
 
 begin
   arv = Arvados.new({ :suppress_ssl_warnings => false })
+  make_token_arv = Arvados.new({ :api_host => ENV['LOGINCLUSTER_ARVADOS_API_HOST'] || ENV['ARVADOS_API_HOST'],
+                                 :api_token => ENV['LOGINCLUSTER_ARVADOS_API_TOKEN'] || ENV['ARVADOS_API_TOKEN'],
+                                 :suppress_ssl_warnings => false })
 
   vm_uuid = ENV['ARVADOS_VIRTUAL_MACHINE_UUID']
 
@@ -190,7 +193,7 @@ begin
 
     begin
       if !File.exist?(tokenfile)
-        user_token = arv.api_client_authorization.create(api_client_authorization: {owner_uuid: l[:user_uuid], api_client_id: 0})
+        user_token = make_token_arv.api_client_authorization.create(api_client_authorization: {owner_uuid: l[:user_uuid], api_client_id: 0})
         f = File.new(tokenfile, 'w')
         f.write("ARVADOS_API_HOST=#{ENV['ARVADOS_API_HOST']}\n")
         f.write("ARVADOS_API_TOKEN=v2/#{user_token[:uuid]}/#{user_token[:api_token]}\n")

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list