[ARVADOS] updated: 1.3.0-2412-g5a1b5b69b

Git user git at public.arvados.org
Tue Apr 7 21:26:56 UTC 2020


Summary of changes:
 lib/controller/localdb/login_pam.go             | 3 ++-
 lib/controller/localdb/login_pam_docker_test.sh | 4 +++-
 lib/controller/localdb/login_pam_test.go        | 4 +++-
 3 files changed, 8 insertions(+), 3 deletions(-)

       via  5a1b5b69bbd4aa6995164eefab7d7cea52ee40ed (commit)
      from  7010ed0b94f9c572f2f7220a2a1eb17b61325fe7 (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 5a1b5b69bbd4aa6995164eefab7d7cea52ee40ed
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Tue Apr 7 17:26:46 2020 -0400

    16212: Populate all api_client_auth fields.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/lib/controller/localdb/login_pam.go b/lib/controller/localdb/login_pam.go
index a9e60ccba..01dfc1379 100644
--- a/lib/controller/localdb/login_pam.go
+++ b/lib/controller/localdb/login_pam.go
@@ -104,5 +104,6 @@ func (ctrl *pamLoginController) UserAuthenticate(ctx context.Context, opts arvad
 	if err != nil {
 		return arvados.APIClientAuthorization{}, err
 	}
-	return arvados.APIClientAuthorization{APIToken: target.Query().Get("api_token")}, err
+	token := target.Query().Get("api_token")
+	return ctrl.RailsProxy.APIClientAuthorizationCurrent(auth.NewContext(ctx, auth.NewCredentials(token)), arvados.GetOptions{})
 }
diff --git a/lib/controller/localdb/login_pam_docker_test.sh b/lib/controller/localdb/login_pam_docker_test.sh
index 3feba58ec..b8f281bc2 100755
--- a/lib/controller/localdb/login_pam_docker_test.sh
+++ b/lib/controller/localdb/login_pam_docker_test.sh
@@ -186,6 +186,8 @@ check_contains "${resp}" '{"errors":["PAM: Authentication failure (with username
 echo >&2 "Testing authentication success"
 resp="$(curl -s --include -d username=foo -d password=secret "http://${ctrlhostport}/arvados/v1/users/authenticate" | tee $debug)"
 check_contains "${resp}" "HTTP/1.1 200"
-check_contains "${resp}" '{"api_token":"v2/zzzzz-gj3su-'
+check_contains "${resp}" '"api_token":"'
+check_contains "${resp}" '"scopes":["all"]'
+check_contains "${resp}" '"uuid":"zzzzz-gj3su-'
 
 cleanup
diff --git a/lib/controller/localdb/login_pam_test.go b/lib/controller/localdb/login_pam_test.go
index d32aa1f24..5b0e4533e 100644
--- a/lib/controller/localdb/login_pam_test.go
+++ b/lib/controller/localdb/login_pam_test.go
@@ -74,7 +74,9 @@ func (s *PamSuite) TestLoginSuccess(c *check.C) {
 		Password: p,
 	})
 	c.Check(err, check.IsNil)
-	c.Check(resp.APIToken, check.Matches, `v2/zzzzz-gj3su-.*/.*`)
+	c.Check(resp.APIToken, check.Not(check.Equals), "")
+	c.Check(resp.UUID, check.Matches, `zzzzz-gj3su-.*`)
+	c.Check(resp.Scopes, check.DeepEquals, []string{"all"})
 
 	authinfo := getCallbackAuthInfo(c, s.railsSpy)
 	c.Check(authinfo.Email, check.Equals, u+"@"+s.cluster.Login.PAMDefaultEmailDomain)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list