Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add secureview flag when listing apps via http #9277

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/add-providerinfo-secure-view-flag.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions services/collaboration/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func DefaultConfig() *config.Config {
Name: "collaboration",
},
App: config.App{
Name: "WOPI app",
Description: "Open office documents with a WOPI app",
Name: "Collabora Online",
Description: "Open office documents with Collabora Online",
Icon: "image-edit",
LockName: "com.github.owncloud.collaboration",
},
Expand Down
5 changes: 3 additions & 2 deletions services/frontend/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 COLLABORATION_APP_NAME, the name configured for the CS3 app provider." introductionVersion:"5.1"`
}

type Archiver struct {
Expand Down
3 changes: 2 additions & 1 deletion services/frontend/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func DefaultConfig() *config.Config {
PreferredUploadType: "sha1",
},
AppHandler: config.AppHandler{
Prefix: "app",
Prefix: "app",
SecureViewApp: "Collabora Online",
},
Archiver: config.Archiver{
Insecure: false,
Expand Down
1 change: 1 addition & 0 deletions services/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down