X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9c8a812148e6b989fd7ab6aac49168276f5d5b9f..25367eb306ce9816762f1dc06ff3ab754d924502:/lib/controller/router/router.go diff --git a/lib/controller/router/router.go b/lib/controller/router/router.go index 2cfcc4fc28..586ea8e676 100644 --- a/lib/controller/router/router.go +++ b/lib/controller/router/router.go @@ -407,7 +407,7 @@ func (rtr *router) addRoutes() { }, { arvados.EndpointAPIClientAuthorizationList, - func() interface{} { return &arvados.ListOptions{} }, + func() interface{} { return &arvados.ListOptions{Limit: -1} }, func(ctx context.Context, opts interface{}) (interface{}, error) { return rtr.backend.APIClientAuthorizationList(ctx, *opts.(*arvados.ListOptions)) }, @@ -588,6 +588,23 @@ func (rtr *router) addRoute(endpoint arvados.APIEndpoint, defaultOpts func() int "apiOptsType": fmt.Sprintf("%T", opts), "apiOpts": opts, }).Debug("exec") + // Extract the token UUIDs (or a placeholder for v1 tokens) + var tokenUUIDs []string + for _, t := range creds.Tokens { + if strings.HasPrefix(t, "v2/") { + tokenParts := strings.Split(t, "/") + if len(tokenParts) >= 3 { + tokenUUIDs = append(tokenUUIDs, tokenParts[1]) + } + } else { + end := t + if len(t) > 5 { + end = t[len(t)-5:] + } + tokenUUIDs = append(tokenUUIDs, "v1 token ending in "+end) + } + } + httpserver.SetResponseLogFields(req.Context(), logrus.Fields{"tokenUUIDs": tokenUUIDs}) resp, err := exec(ctx, opts) if err != nil { logger.WithError(err).Debugf("returning error type %T", err)