Commit graph

123 commits

Author SHA1 Message Date
Henry Castro
afd1ab0f41 browser: update loolwsd.xml.in file
rename loleaflet -> browser

Change-Id: I60a6b30a36ffabe2324edb60535e227ddf905f65
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro
e0fe47be5f rename loleaflet.html -> cool.html
Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Andras Timar
5a34ed7cd1 Introduce security.enable_metrics_unauthenticated config item
When enabled, the /lool/getMetrics endpoint will not require authentication.
By default authentication is required and this setting is set to "false".

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I801130cf552eb14c231fcc0a0bdd39d9ebb6db7f
2021-11-05 16:47:11 +01:00
Michael Meeks
1444ac7251 Add a version suffix configuration option.
This allows people to perturb the etags for now, and in future the
URL sub-path to make it easier to develop with binaries where the
git hash doens't change.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I6082a71cde5d3a34cca29fa5858feaf6fdb7f4d6
2021-11-04 14:02:03 +00:00
Pranam Lashkari
15f5ce6e52 Quarantine: minor correction for path resolution
some code cleaning for code repeatation

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4ea7972ed711eba41c7bbcfa36b8db607ad3d738
2021-11-03 16:51:52 +05:30
Pranam Lashkari
e7c2f5cd07 quarantine: keep quarantine off by default
allow path specification for the quarantine directory

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I407288db60fe5fbf0f6a9346175c3d4acfd35add
2021-11-03 09:57:00 +02:00
Ashod Nakashian
4d897435a5 kill reuse_cookies
This remove reuse_cookies as a setting and feature
altogether. It was originally a workaround to aid
with authentication, prior to having access_token.
However, it proved to be less useful than originally
anticipated, primarily because cookies nowadays have
security restrictions in browsers. In addition to
the fact that access_token simply deprecated it.

While the documentation has also been updated,
tests still have reuse_cookies in input data.
This is intentional to ensure the code is
backwards compatible with any deployment that might
still pass URLs with reuse_cookies around.

Change-Id: If214b299b34a910face8cabc7c1335621990c85e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-11-02 08:45:00 -04:00
Pranam Lashkari
f84df1161c quarantine: create hard links for quarantining when file is saved
number of versions to maintain per file can be specified in loolwsd.xml
on exceeding specified quarantine size oldest file(s) is deleted

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I3ca55b9ab29a82988f19fe0acd43e0fae2c2a423
2021-11-01 17:21:51 +02:00
Pranam Lashkari
88601440d0 introduce way to hide/restrict uno commands
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I1225190a67f726832e5b38a7c3f690b51c1385f3
2021-10-21 12:28:13 +03:00
Ashod Nakashian
a7a204f16e wsd: configuration setting to control embedded-url hexifying
Change-Id: I7ed65af7341aa7dec3c9ad8d5cd503c34c355571
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 8f4316b45b1aad7a041e8b02d92e5ef10d63b2b3)
2021-09-13 09:40:09 -04:00
Michael Meeks
af4dc35041 Configuration - clarify various key settings.
Also add link to SDK documentation.

Change-Id: Ib58a295fb96c4198906653bfe3a1c29d2ae6346b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-10 20:40:21 +01:00
Michael Meeks
8ad5e962d7 Discourage accidental proxy_prefix fiddling.
Change-Id: I12e2ba227113eddf5bad1db192a87e22baa325d1
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-10 20:40:21 +01:00
Pranam Lashkari
e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Tor Lillqvist
5998980c8d Add some comments for developers
Many of the settings in loolwsd.xml that you might want to tweak this
or that way during development are set on the loolwsd command-line for
a "make run". Don't waste time on trying to set them in loolwsd.xml
and wondering why it has no effect. I just did that. Hopefully these
comments will avoid such in the future.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I896e9cb2830bf36c165842bff53f0e4e471599ae
2021-07-08 12:07:52 +03:00
Jerzy Drozdz
65db910846 Added missing class A ip addresses regex to config file.
Signed-off-by: Jerzy Drozdz <jerzy.drozdz@gmail.com>
Change-Id: If4ccaf7bf0b668979064357ab606b473bd497f11
Signed-off-by: Jerzy Drozdz <jerzy.drozdz@gmail.com>
2021-06-09 16:16:12 +03:00
Tor Lillqvist
eee8fe99d5 Avoid maximum/minimum logging level terminology for newly introduced settings
(Also in variable names.)

Better to just use terms that say what we mean, i.e. most verbose and
least verbose.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I80d74fda8b80bd34d194c3df97d246a41368189b
2021-05-31 15:06:57 +03:00
Tor Lillqvist
b7ca93a41a Add the possibilty to set a thread-local logging level
Add a way to set it from the client.

For now, in the Help > About dialog, the L key toggges the logging
level between the default (whatever is set in loolwsd.xml or on the
loolwsd command line) and the maximum a client is allowed to set
(which also can be set in loolwsd.xml or on the loolwsd command line).

Also while at it, uncouple the toggling of the Trace Event generation
from the triple-click tha toggles tile debugging. It is now on the T
key.

Also swap the meaning of "min" and "max" for the logging levels. Even
if the Poco::Message::Priority values are such that the less urgent
priorities have a numerbcally higher value, conceptually it is more
clear to say the more urgent priorities (levels) are "higher".

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5383b16ead7d2d378901525eb0d16513d88f045e
2021-05-31 10:56:19 +03:00
Tor Lillqvist
636069430e Also add logging.min_level_settable_from_client
We don't want a client to be able to turn logging off completely
either.

Note, just to avoid potential confusion: This is about the LOG_INF(),
LOG_WRN(), LOG_TRC() etc logging here in Online. Not related to my
recent work on Trace Event format logging.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I3de527cb9f69d9a5269b1db2e1d4602e7117f22e
2021-05-31 10:56:19 +03:00
Tor Lillqvist
4136e024f9 Add logging.max_level_settable_from_client setting
(Not used yet.)

The intent is that the JS code will be able send the server a message
that adjusts the logging level for the WSD thread(s) and Kit processes
handling that client.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I88ac301f002b1f3a55a5d8c9e3650babdedc1e0d
2021-05-31 10:56:19 +03:00
Tor Lillqvist
541d9f3be5 Add Emacs mode line and indent the trace_event.path element correctly
Change-Id: Idcd1ec3ef111aa255446b8504bb1a70c30ff7f7a
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-31 10:56:19 +03:00
Tor Lillqvist
9c6b74ad08 Use a loolwsd.xml setting instead of --enable-trace-event-logging
That is our convention, and this also avoids a global variable in the
kit process.

Change-Id: I37d2d53aa7eb24f9848fa8ef98bc57d75db90d13
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-19 13:33:26 +03:00
Andras Timar
24aaa0dcd4 3 new build-time configurable settings
Now it is possible:
- to disable Help buttons and jumping to external website of Online Help (--without-help-url)
- set the icon theme of tunneled dialogs and sidebar (--with-core-icon-theme=<theme>)
- set the list of allowed dictionaries (--with-dictionaries=<language list>)

This patch obsoletes the packaging hacks that we had to use for certain customers.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I450f66ac133f6fcefae2bda9f29e04405ef3a6b7
2021-05-18 09:14:00 +02:00
Tor Lillqvist
c98e9962db It's trace_event, not event_trace
Change-Id: I54db3bd41b54fcb869f048f3581a6545e24cfd4b
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-13 12:35:55 +03:00
Tor Lillqvist
fd1910c727 The Chrome format is called Trace Events, not Event Trace
Change-Id: I2515182d9369c3a25727dce0d3790e79de891bff
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-04 15:12:14 +03:00
Tor Lillqvist
be476d23b3 Produce a Chrome Event Trace file
It is (for now) produced (by the ProfileZone things in core) whenever
logging level is "trace". The Event Trace file pathname can be given
in the loolesd.xml file or on the loolwsd command line.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6d5829121e71460a4600ee94d2ebf51043c8893f
2021-05-03 16:09:35 +03:00
Andras Timar
1d3c553e51 cosmetics: tab to space
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib0d019a79f3739080bb5fdd78bfbcb39b6ee2c0a
2021-04-15 11:31:43 +02:00
Gabriel Masei
21d514ecff admin: add support for lost kits cleanup
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: I31969196aa138b6da964c867679ec23f34c89fd0
2021-04-01 22:09:44 +01:00
Ashod Nakashian
5cffde8734 wsd: limit the maximum PDF rendering resolution
Rendering PDF documents to images can consume
large amount of memory. Here we limit the
maximum allowed resolution to 384. This is
about 400% zoom resolution, given that the
100% resolution is 96 dpi.

If this proves limiting, it can be increased
to 480 dpi, which is about 500% zoom scale.

Change-Id: I719118d517bbaf8b204411223f1e26a31b97ca99
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-01 15:54:30 -04:00
Ashod Nakashian
c323da92d1 wsd: support configurable PDF rendering resolution
The defined envar is used by Core to override its
default resolution (of 96 dpi), when specified.

Change-Id: Ie7164e78f98990ac88b02dbfe2becbae8c134e9c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-01 15:54:30 -04:00
Henry Castro
1df271b363 config: add "macro_security_level" item
"Level of Macro security".

Change-Id: I491648f2a89289c7f4455dfad76d73ac8449b965
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-12 08:23:56 -04:00
Henry Castro
50c0fc4492 config: add "enable_macros_execution" item
"Specifies whether the macro execution is enabled in
general. This will disable Basic, Beanshell, Javascript
and Python scripts. If it is set to false, the
macro_security_level is ignored. If it is set to true,
the mentioned entry specified the level of macro security".

Change-Id: I4bc5b690268a93994d17e2b02b7b60b6398646b7
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-12 08:23:56 -04:00
Michael Meeks
6307f1ee3d Allow jwt token expiry to be configurable.
Change-Id: Ifd2b078adfa3106765f5b54c0397e04ab66fc804
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-05 18:33:09 +00:00
Miklos Vajna
78f192399d Revert "wsd: disable ssl by default, enable ssl termination by default"
This reverts commit f6bf6f49ed. I did not
consider that this makes it harder to do a local developer setup with
reverse proxy + make run; also that if you don't read the doc to set up
a reverse proxy, then the default now serves http content and advertises
https, which is not helping sysadmins.

This needs more thinking how to improve one scenario without hurting
others.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic789faa2dc5bb19a79d651dc81d4eaaf0b48607a
2021-01-14 13:59:44 +01:00
Miklos Vajna
f6bf6f49ed wsd: disable ssl by default, enable ssl termination by default
The intention is to have defaults which are close to how people
typically use Online in production.

However, keep using ssl for 'make run', so that the https environment in
the browser is unchanged.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7fd725a83b0e9ca1012f2c0e0c3bf038e5fa0059
2021-01-13 13:33:44 +01:00
Andras Timar
3f81bfd987 Add /var/log (default log path) to ReadWritePaths of loolwsd.service (fixes GH #739)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I47e8a0983fd74656739498bf02bad117e821cfbf
2020-11-20 20:19:43 +01:00
Andras Timar
f4e52a81d8 The non-implemented WebDAV host was cleaned up, so let's kill these references, too.
Change-Id: Ib677fd35c9a2a1d72f2d8b4de0d37f92c691dded
2020-10-07 18:41:43 +02:00
Yunus Bulut
35ad7d4265 Destroy WebDAVStorage and <webdav> section #169
Change-Id: I7ce095f722599a37b82e8789baeb6145028dd10d
2020-10-07 14:55:26 +03:00
Andrea Gelmini
9d01540680 Fix typos
Change-Id: I7d487f32ca43e19023760ef3c6bb1683607f93d1
2020-10-07 12:51:08 +02:00
Ashod Nakashian
c5f9d605e4 wsd: make outgoing connection timeout configurable
The default Poco connection timeout is 60 seconds,
which is probably excessive. The current configurable
default is a more reasonable 30 seconds.

Currently we set this timeout on Storage connections
going out (i.e. WOPI connections).

Change-Id: Ie80a9141ca9bf721addc74baf94e62e0ad72fdd2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98913
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-11 20:11:14 +02:00
Ashod Nakashian
5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Szymon Kłos
3141bf7775 notebookbar: Introduce switch in loolwsd.xml
Change-Id: I94546a899fde1cecc2c35dc527e41e8a36061750
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93050
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:16:25 +02:00
Andras Timar
faf9ccbd0a Add LOKit logging option to configuration file
Environment variable in sysconfig.loolwsd was not good, because:
1) it was a systemd antipattern
2) this systemd environment file was not present on all distros
3) we had to take care about this separately, when we did not start
   loolwsd from systemd

Change-Id: I5c47668ca388c2f4b0afd6da8c575a3fb3cfab3b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96291
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-15 16:06:37 +02:00
Gabriel Masei
ac17984226 admin: cleanup resource consuming kits
Change-Id: Ifafbadc61b788adc90c03fb92e0231f9e599c360
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95794
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-06-09 11:25:44 +02:00
Michael Meeks
2cbf6d12a0 Proxy: only accept request from localhost.
Also - add net.proxy_prefix setting to enable this.

Change-Id: I87f5aab2316c053ea1bc8cc177e4a54ba0455697
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93682
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-08 18:05:14 +02:00
Michael Meeks
92eff552a5 Lower convert-to process priorities by default.
Interactive / editing processes should take precedence over batch
thumbnailing processes to keep responsiveness good.

Change-Id: Ib100409e312cb2ca545586a734711a31a92f110c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93323
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-02 22:03:36 +02:00
Michael Meeks
f9f392ab5c Storage: add as_scheme to allow auto-determination of whether to use SSL.
This is the new default - do as we're told by the client.
The old setting is left to allow users to force SSL if they are
concerned that they may receive unhelpful URLs.

Change-Id: Idea83aacea6826a8f37264e34d49c7550efe6d27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93179
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-30 14:53:25 +02:00
Andras Timar
6ad6028b91 add more info to description of storage.ssl.ca_file_path setting
Change-Id: I35ad72be99635fcc11d552072b52ffbd45ba3044
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93036
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-28 15:39:15 +02:00
Muhammet Kara
f507302993 Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-04-20 20:35:08 +02:00
Jan Holesovsky
f004090201 Revert "Welcome: fix the default path of welcome message"
This reverts commit df4a241d0f.

Reason for revert: As we agreed, we have to improve the default,
but this patch actually just doubles something that is working
out of the box.

Change-Id: Idc22dabc3621d537f1bba3bc3b13a7d943c80c36
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92299
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-16 13:25:23 +02:00
Andras Timar
df4a241d0f Welcome: fix the default path of welcome message
Change-Id: I4661c005e8c284a16c708ee26d7922f5789c3e04
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92344
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-16 12:44:03 +02:00