Page 1 of 1

Enforce Security - Nextcloud and Onlyoffice

PostPosted: Wed Oct 31, 2018 8:57 am
by lorenzoform
I'm using onlyoffice with nextcloud. In nextcloud I simply typed the url of onlyoffice and saved the configuration and after that I started using them togheter.

How can I sure that onlyoffice is secure and nobody can use it in an unwanted way? In fact I don't think it's an exclusive relationship between nextcloud and onlyoffice, is it there a way to limit the usage of onlyoffice only with our nextcloud, or any way to improve security?


Regards.

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Wed Oct 31, 2018 12:56 pm
by Carl
Hello,

You can enable JSON Web Token in Document Server config for more security:
https://api.onlyoffice.com/editors/security
https://api.onlyoffice.com/editors/signature/

Note: starting from Document Server version 5.2, JWT is enabled in local.json config.
You also need to indicate the exact secret value in ONLYOFFICE integration app settings in Nextcloud for connection to work.

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Thu Nov 01, 2018 4:33 pm
by lorenzoform
Hi,

in default.json I defined and enabled secret as in the documentation and restarted the onlyoffice server:


"secret": {
"browser": {"string": "secret", "file": "", "tenants": {}},
"inbox": {"string": "Secret_TEST", "file": "", "tenants": {}},
"outbox": {"string": "Secret_TEST", "file": ""},
"session": {"string": "secret", "file": ""}
},
"token": {
"enable": {
"browser": true,
"request": {
"inbox": true,
"outbox": true
}
},

but the nextcloud continue to work with onlyoffice without problem, as no secret defined. Is it normal?
Where do I need to define the secret in nextcloud?

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Fri Nov 02, 2018 1:08 pm
by Carl
Please specify the version of document server you are using.

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Mon Nov 05, 2018 8:45 am
by lorenzoform
Onlyoffice 5.2.2-2 and if you need Nextcloud 14.0.3.

Regards.

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Tue Nov 06, 2018 6:36 am
by Carl
Hello,
Carl wrote:Note: starting from Document Server version 5.2, JWT is enabled in local.json config.


Please open /etc/onlyoffice/documentserver/local.json and enable JWT and secret there. Don't forget to restart DS services after changing the config: supervisorctl restart all

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Tue Nov 06, 2018 8:26 pm
by lorenzoform
lorenzoform wrote:Hi,

in default.json I defined and enabled secret as in the documentation and restarted the onlyoffice server:


"secret": {
"browser": {"string": "secret", "file": "", "tenants": {}},
"inbox": {"string": "Secret_TEST", "file": "", "tenants": {}},
"outbox": {"string": "Secret_TEST", "file": ""},
"session": {"string": "secret", "file": ""}
},
"token": {
"enable": {
"browser": true,
"request": {
"inbox": true,
"outbox": true
}
},

but the nextcloud continue to work with onlyoffice without problem, as no secret defined. Is it normal?
Where do I need to define the secret in nextcloud?


I confirm that I made these changes to /etc/onlyoffice/documentserver/local.json , after that I restarted the entire server.

Re: Enforce Security - Nextcloud and Onlyoffice

PostPosted: Wed Nov 07, 2018 7:14 am
by Carl
Restarting the container reverts the changed parameters of document server config to default values (set via environment variable). Please open the local.json file and check if JWT is enabled. You need to restart only document server services after changing the config.