From 12964dd8e5793a50894ad86d3fb76557061b9260 Mon Sep 17 00:00:00 2001 From: Martin Mattel Date: Mon, 2 Sep 2024 10:40:31 +0200 Subject: [PATCH 1/2] [docs-only] Fix office365 texts --- services/collaboration/README.md | 15 +++++++++++---- services/collaboration/pkg/config/app.go | 2 +- services/collaboration/pkg/config/wopi.go | 8 ++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/services/collaboration/README.md b/services/collaboration/README.md index 352d9ef9df..758dd4568a 100644 --- a/services/collaboration/README.md +++ b/services/collaboration/README.md @@ -1,10 +1,16 @@ # Collaboration -The collaboration service connects ocis with document servers such as Collabora and ONLYOFFICE using the WOPI protocol. +The collaboration service connects ocis with document servers such as Collabora, ONLYOFFICE or Microsoft using the WOPI protocol. Since this service requires an external document server, it won't start by default when using `ocis server`. You must start it manually with the `ocis collaboration server` command. -This service needs to be part of the ocis service mesh. It is not intended to be used as a standalone service. You must share the common config variables like OCIS_URL, OCIS_JWT_SECRET and OCIS_REVA_GATEWAY betweed this service and the other ocis services. In addition to that, MICRO_REGISTRY_ADDRESS should point to the main ocis service registry. +Because the collaboration service needs to be started manually, the following prerequisite applies: On collaboration service startup, particular environment variables are required to be popupated. If environment variables have a default like the `MICRO_REGISTRY_ADDRESS`, the default will be used, if not set otherwise. Use for all others the instance values as defined. If these environment variables are not provided or misconfigured, the collaboration service will not start up. + +Required environment variables: +* `OCIS_URL` +* `OCIS_JWT_SECRET` +* `OCIS_REVA_GATEWAY` +* `MICRO_REGISTRY_ADDRESS` ## Requirements @@ -21,7 +27,8 @@ If any of the named services above have not been started or are not reachable, t There are a few variables that you need to set: * `COLLABORATION_APP_NAME`:\ - The name of the connected WebOffice app, either `Collabora`, `OnlyOffice`, `Microsoft365` or `MicrosoftOfficeOnline`. + The name of the connected WebOffice app, which can be one of the following:\ + `Collabora`, `OnlyOffice`, `Microsoft365` or `MicrosoftOfficeOnline`. * `COLLABORATION_APP_ADDR`:\ The URL of the collaborative editing app (onlyoffice, collabora, etc).\ @@ -31,7 +38,7 @@ There are a few variables that you need to set: In case you are using a self signed certificate for the WOPI app you can tell the collaboration service to allow an insecure connection. * `COLLABORATION_APP_WOPISRC`:\ - The external address of the collaboration service. The target app (onlyoffice, collabora, etc) will use this address to read and write files from Infinite Scale. \ + The external address of the collaboration service. The target app (onlyoffice, collabora, etc) will use this address to read and write files from Infinite Scale.\ For example: `https://wopi.example.com`. The application can be customized further by changing the `COLLABORATION_APP_*` options to better describe the application. diff --git a/services/collaboration/pkg/config/app.go b/services/collaboration/pkg/config/app.go index 222f9b38f7..d5b4aa80fa 100644 --- a/services/collaboration/pkg/config/app.go +++ b/services/collaboration/pkg/config/app.go @@ -11,7 +11,7 @@ type App struct { Insecure bool `yaml:"insecure" env:"COLLABORATION_APP_INSECURE" desc:"Skip TLS certificate verification when connecting to the WOPI app" introductionVersion:"6.0.0"` ProofKeys ProofKeys `yaml:"proofkeys"` - LicenseCheckEnable bool `yaml:"licensecheckenable" env:"COLLABORATION_APP_LICENSE_CHECK_ENABLE" desc:"Enable license check for edit. Needs to be enabled when using Microsoft365 with the business flow." introductionVersion:"%%NEXT%%"` + LicenseCheckEnable bool `yaml:"licensecheckenable" env:"COLLABORATION_APP_LICENSE_CHECK_ENABLE" desc:"Enable license checking to edit files. Needs to be enabled when using Microsoft365 with the business flow." introductionVersion:"%%NEXT%%"` } type ProofKeys struct { diff --git a/services/collaboration/pkg/config/wopi.go b/services/collaboration/pkg/config/wopi.go index aa5bc34235..58d95e3bab 100644 --- a/services/collaboration/pkg/config/wopi.go +++ b/services/collaboration/pkg/config/wopi.go @@ -2,9 +2,9 @@ package config // Wopi defines the available configuration for the WOPI endpoint. type Wopi struct { - WopiSrc string `yaml:"wopisrc" env:"COLLABORATION_WOPI_SRC" desc:"The WOPISrc base URL containing schema, host and port. Set this to the schema and domain where the collaboration service is reachable for the wopi app, such as https://office.owncloud.test." introductionVersion:"6.0.0"` + WopiSrc string `yaml:"wopisrc" env:"COLLABORATION_WOPI_SRC" desc:"The WOPI source base URL containing schema, host and port. Set this to the schema and domain where the collaboration service is reachable for the wopi app, such as https://office.owncloud.test." introductionVersion:"6.0.0"` Secret string `yaml:"secret" env:"COLLABORATION_WOPI_SECRET" desc:"Used to mint and verify WOPI JWT tokens and encrypt and decrypt the REVA JWT token embedded in the WOPI JWT token." introductionVersion:"6.0.0"` - DisableChat bool `yaml:"disable_chat" env:"COLLABORATION_WOPI_DISABLE_CHAT;OCIS_WOPI_DISABLE_CHAT" desc:"Disable chat in the frontend. This feature is available in OnlyOffice and Microsoft." introductionVersion:"%%NEXT%%"` - ProxyURL string `yaml:"proxy_url" env:"COLLABORATION_WOPI_PROXY_URL" desc:"The URL to the ownCloud Office365 WOPI proxy. Optional. To use this feature, you need an office365 proxy subscription. If you become part of the Microsoft CSP program (https://learn.microsoft.com/en-us/partner-center/enroll/csp-overview), you can use the WebOffice without a proxy." introductionVersion:"%%NEXT%%"` - ProxySecret string `yaml:"proxy_secret" env:"COLLABORATION_WOPI_PROXY_SECRET" desc:"The secret to authenticate against the ownCloud Office365 WOPI proxy. Optional. This secret can be obtained from ownCloud via the office365 proxy subscription." introductionVersion:"%%NEXT%%"` + DisableChat bool `yaml:"disable_chat" env:"COLLABORATION_WOPI_DISABLE_CHAT;OCIS_WOPI_DISABLE_CHAT" desc:"Disable chat in the office web frontend. This feature applies to OnlyOffice and Microsoft." introductionVersion:"%%NEXT%%"` + ProxyURL string `yaml:"proxy_url" env:"COLLABORATION_WOPI_PROXY_URL" desc:"The URL to the ownCloud Office365 WOPI proxy. Optional. To use this feature, you need an office365 proxy subscription. If you become part of the Microsoft CSP program (https://learn.microsoft.com/en-us/partner-center/enroll/csp-overview), you can use WebOffice without a proxy." introductionVersion:"%%NEXT%%"` + ProxySecret string `yaml:"proxy_secret" env:"COLLABORATION_WOPI_PROXY_SECRET" desc:"Optional, the secret to authenticate against the ownCloud Office365 WOPI proxy. This secret can be obtained from ownCloud via the office365 proxy subscription." introductionVersion:"%%NEXT%%"` } From 238e9cf0b1f5c3e333f7fb58f8ae76491be75bd9 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 2 Sep 2024 11:13:19 +0200 Subject: [PATCH 2/2] Update services/collaboration/README.md Co-authored-by: Phil Davis --- services/collaboration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/collaboration/README.md b/services/collaboration/README.md index 758dd4568a..cb19990834 100644 --- a/services/collaboration/README.md +++ b/services/collaboration/README.md @@ -4,7 +4,7 @@ The collaboration service connects ocis with document servers such as Collabora, Since this service requires an external document server, it won't start by default when using `ocis server`. You must start it manually with the `ocis collaboration server` command. -Because the collaboration service needs to be started manually, the following prerequisite applies: On collaboration service startup, particular environment variables are required to be popupated. If environment variables have a default like the `MICRO_REGISTRY_ADDRESS`, the default will be used, if not set otherwise. Use for all others the instance values as defined. If these environment variables are not provided or misconfigured, the collaboration service will not start up. +Because the collaboration service needs to be started manually, the following prerequisite applies: On collaboration service startup, particular environment variables are required to be populated. If environment variables have a default like the `MICRO_REGISTRY_ADDRESS`, the default will be used, if not set otherwise. Use for all others the instance values as defined. If these environment variables are not provided or misconfigured, the collaboration service will not start up. Required environment variables: * `OCIS_URL`