feat: make it possible to start the collaboration service in the single process (#1569)

* feat: make it possible to start the collaboration service in the single process

* feat: add proxy policy
This commit is contained in:
Michael Barz
2025-09-26 09:08:20 +02:00
committed by GitHub
parent a2f59ce15b
commit e7b7ceafd5
3 changed files with 12 additions and 4 deletions
+6
View File
@@ -30,6 +30,7 @@ import (
authmachine "github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command"
authservice "github.com/opencloud-eu/opencloud/services/auth-service/pkg/command"
clientlog "github.com/opencloud-eu/opencloud/services/clientlog/pkg/command"
collaboration "github.com/opencloud-eu/opencloud/services/collaboration/pkg/command"
eventhistory "github.com/opencloud-eu/opencloud/services/eventhistory/pkg/command"
frontend "github.com/opencloud-eu/opencloud/services/frontend/pkg/command"
gateway "github.com/opencloud-eu/opencloud/services/gateway/pkg/command"
@@ -328,6 +329,11 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
cfg.Audit.Commons = cfg.Commons
return audit.Execute(cfg.Audit)
})
areg(opts.Config.Collaboration.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
cfg.Collaboration.Context = ctx
cfg.Collaboration.Commons = cfg.Commons
return collaboration.Execute(cfg.Collaboration)
})
areg(opts.Config.Policies.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
cfg.Policies.Context = ctx
cfg.Policies.Commons = cfg.Commons
@@ -92,10 +92,6 @@ func GetAppURLs(cfg *config.Config, logger log.Logger) (map[string]map[string]st
httpResp, err := httpClient.Get(wopiAppUrl)
if err != nil {
logger.Error().
Err(err).
Str("WopiAppUrl", wopiAppUrl).
Msg("WopiDiscovery: failed to access wopi app url")
return nil, err
}
@@ -272,6 +272,12 @@ func DefaultPolicies() []config.Policy {
Endpoint: "/auth-app/tokens",
Service: "eu.opencloud.web.auth-app",
},
{
Endpoint: "/wopi",
Service: "eu.opencloud.web.collaboration.Collabora",
Unprotected: true,
SkipXAccessToken: true,
},
},
},
}