From 3c369b0d21c5a19f5e6a75ff2d89f5bac0a8e77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 29 May 2024 16:59:46 +0200 Subject: [PATCH] add secureview flag when listing apps via http MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/add-providerinfo-secure-view-flag.md | 5 +++++ services/frontend/pkg/config/config.go | 5 +++-- services/frontend/pkg/revaconfig/config.go | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/add-providerinfo-secure-view-flag.md diff --git a/changelog/unreleased/add-providerinfo-secure-view-flag.md b/changelog/unreleased/add-providerinfo-secure-view-flag.md new file mode 100644 index 0000000000..8d99ceebfe --- /dev/null +++ b/changelog/unreleased/add-providerinfo-secure-view-flag.md @@ -0,0 +1,5 @@ +Enhancement: add secureview flag when listing apps via http + +To allow clients to see which application supports secure view we add a flag to the http response when the app name matches a configured secure view app. The app can be configured by setting `FRONTEND_APP_HANDLER_SECURE_VIEW_APP` to the name of the app registered as a CS3 app provider. + +https://github.com/owncloud/ocis/pull/9277 diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 1408cd7595..5683fe2661 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -107,8 +107,9 @@ type Auth struct { } type AppHandler struct { - Prefix string `yaml:"-"` - Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_APP_HANDLER_INSECURE" desc:"Allow insecure connections to the frontend." introductionVersion:"pre5.0"` + Prefix string `yaml:"-"` + Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_APP_HANDLER_INSECURE" desc:"Allow insecure connections to the frontend." introductionVersion:"pre5.0"` + SecureViewApp string `yaml:"secure_view_app" env:"FRONTEND_APP_HANDLER_SECURE_VIEW_APP" desc:"Name of the app to use for secure view. Should match the Name configured for the CS3 app provider." introductionVersion:"pre5.1"` } type Archiver struct { diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index c1fce126d1..d3ebbbbf57 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -137,6 +137,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "contextRouteName": "files-spaces-personal", // TODO: remove when https://github.com/owncloud/web/pull/7437 arrived in oCIS }, }, + "secure_view_app": cfg.AppHandler.SecureViewApp, }, "archiver": map[string]interface{}{ "prefix": cfg.Archiver.Prefix,