[ARVADOS] created: 2.1.0-1838-g9fe65cb18
Git user
git at public.arvados.org
Fri Jan 21 20:44:33 UTC 2022
at 9fe65cb1856ca4bf58c835ea511373a25c128ebf (commit)
commit 9fe65cb1856ca4bf58c835ea511373a25c128ebf
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Fri Jan 21 17:27:36 2022 -0300
17583: Forwards ApiClientAuthorization list requests to LoginCluster.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/lib/controller/federation/conn.go b/lib/controller/federation/conn.go
index 298c693b4..42221b430 100644
--- a/lib/controller/federation/conn.go
+++ b/lib/controller/federation/conn.go
@@ -749,6 +749,9 @@ func (conn *Conn) APIClientAuthorizationDelete(ctx context.Context, options arva
}
func (conn *Conn) APIClientAuthorizationList(ctx context.Context, options arvados.ListOptions) (arvados.APIClientAuthorizationList, error) {
+ if conn.cluster.Login.LoginCluster != "" {
+ return conn.chooseBackend(conn.cluster.Login.LoginCluster).APIClientAuthorizationList(ctx, options)
+ }
return conn.local.APIClientAuthorizationList(ctx, options)
}
diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go
index ca2a419c7..9f5d12598 100644
--- a/lib/controller/integration_test.go
+++ b/lib/controller/integration_test.go
@@ -690,6 +690,7 @@ func (s *IntegrationSuite) TestFederatedApiClientAuthHandling(c *check.C) {
},
)
c.Assert(err, check.IsNil)
+ c.Assert(resp.APIClientID, check.Not(check.Equals), 0)
newTok := resp.TokenV2()
c.Assert(newTok, check.Not(check.Equals), "")
commit 434244494013a1e9d0cf56a7398fcd49fb75aaf1
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Fri Jan 21 17:15:21 2022 -0300
17583: Expands test to expose one pending bug.
ApiClientAuthorization LIST requests are not being forwarded on LoginCluster
federations.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go
index b7bda3dd1..ca2a419c7 100644
--- a/lib/controller/integration_test.go
+++ b/lib/controller/integration_test.go
@@ -704,6 +704,14 @@ func (s *IntegrationSuite) TestFederatedApiClientAuthHandling(c *check.C) {
)
c.Assert(err, check.IsNil)
c.Assert(curUser.UUID, check.Equals, user.UUID)
+
+ // Request the ApiClientAuthorization list using the new token
+ _, userClient, _ := s.testClusters["z3333"].ClientsWithToken(newTok)
+ var acaLst arvados.APIClientAuthorizationList
+ err = userClient.RequestAndDecode(
+ &acaLst, "GET", "arvados/v1/api_client_authorizations", nil, nil,
+ )
+ c.Assert(err, check.IsNil)
}
// Test for bug #18076
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list