[ARVADOS] updated: 1.2.0-353-g2b30b239c

Git user git at public.curoverse.com
Tue Nov 13 16:19:30 EST 2018


Summary of changes:
 lib/controller/fed_containers.go | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

       via  2b30b239c8c66c3a1a7be35c61a9fb707df1e7ee (commit)
      from  017ea8c747b3bd9cb57c5a7d52ca90e423c5c1fc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2b30b239c8c66c3a1a7be35c61a9fb707df1e7ee
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Nov 13 16:18:09 2018 -0500

    14198: Strip 4th position when setting runtime_token from provided auth
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/lib/controller/fed_containers.go b/lib/controller/fed_containers.go
index 7b8cdabe5..7fd5b25ad 100644
--- a/lib/controller/fed_containers.go
+++ b/lib/controller/fed_containers.go
@@ -99,8 +99,14 @@ func remoteContainerRequestCreate(
 			containerRequest["runtime_token"] = newtok.TokenV2()
 		} else {
 			// Remote user. Container request will use the
-			// current token.
-			containerRequest["runtime_token"] = creds.Tokens[0]
+			// current token, minus the trailing portion
+			// (optional container uuid).
+			sp := strings.Split(creds.Tokens[0], "/")
+			if len(sp) >= 3 {
+				containerRequest["runtime_token"] = strings.Join(sp[0:3], "/")
+			} else {
+				containerRequest["runtime_token"] = creds.Tokens[0]
+			}
 		}
 	}
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list