From 2751cfee2cc4d83da26e3c7f123d25ef58e77cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 19 Aug 2025 14:58:30 +0200 Subject: [PATCH] directly connect to frontend The STORAGE_USERS_DATA_GATEWAY_URL env var is used in the `tokens` `datagateway_endpoint` reva configuration. That `DataGatewayEndpoint` is used by the decomposedfs driver to create urls: ```go // URL returns a url to download an upload func (session *DecomposedFsSession) URL(_ context.Context) (string, error) { // [ ... ] return joinurl(session.store.tknopts.DataGatewayEndpoint, tkn), nil } ``` As the comment points out this URL is internally used when emitting events. Either in: ```go func (session *DecomposedFsSession) FinishUploadDecomposed(ctx context.Context) error { // [ ... ] s, err := session.URL(ctx) if err != nil { return err } var iu *userpb.User if utils.ExistsInOpaque(u.Opaque, "impersonating-user") { iu = &userpb.User{} if err := utils.ReadJSONFromOpaque(u.Opaque, "impersonating-user", iu); err != nil { return err } } if err := events.Publish(ctx, session.store.pub, events.BytesReceived{ UploadID: session.ID(), URL: s, ``` or in ```go // Postprocessing starts the postprocessing result collector func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) { // [ ... ] s, err := session.URL(ctx) if err != nil { sublog.Error().Err(err).Msg("could not create url") continue } metrics.UploadSessionsRestarted.Inc() // restart postprocessing if err := events.Publish(ctx, fs.stream, events.BytesReceived{ UploadID: session.ID(), URL: s, ``` So, we do not need to go throught the proxy here. --- services/storage-users/pkg/config/defaults/defaultconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go index 6da4f4eb73..40149b5c0c 100644 --- a/services/storage-users/pkg/config/defaults/defaultconfig.go +++ b/services/storage-users/pkg/config/defaults/defaultconfig.go @@ -86,7 +86,7 @@ func DefaultConfig() *config.Config { }, Reva: shared.DefaultRevaConfig(), DataServerURL: "http://localhost:9158/data", - DataGatewayURL: "https://localhost:9200/data", + DataGatewayURL: "http://localhost:9140/data", RevaGatewayGRPCAddr: "127.0.0.1:9142", TransferExpires: 86400, UploadExpiration: 24 * 60 * 60,