Commit Graph

74 Commits (master)

Author SHA1 Message Date
Rashesh Padia 35bcf56791 wsd: added config option for background manualsave
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I76de35fe9b4135b74a96436f0c9a3245f4e00bd9
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-18 17:45:02 +02:00
Michael Meeks dbe905de8c bgsave: enable by default again.
Seems we have closed a number of the various races and problems
seen, and this can now be used.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ie3b0a1de847b9e77820d1135b4a8facdb7934707
2024-05-14 21:28:18 +01:00
Michael Meeks 9b6ab4c601 Logging: add Area parameter and new LOGA_ macros to annotate areas.
Add logging.disabled_areas setting to coolwsd.xml with some sensible
things to ignore unless they are warnings/errors.

Kit code duplication around logging is grim; but not fixed in this
commit.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I36bebb2b3c8d64a814d7b10c167d582de0baf4e5
2024-05-14 18:37:52 +02:00
Michael Meeks 8b7549b8f7 bgsave: lower priority of background thread.
Free CPU cycles for interactive processes.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I9d8cfe5f3541c9424d51c69380e1c72920154ff4
2024-05-10 16:30:37 +01:00
Rashesh Padia c1f0fcf946 indirection_server: migrate document on shutdown
- when COOLWSD get SIGTERM admin sends a "shutdown_received" message to
indirection server
- indirection server sends back migration messages for each document to
migrate it other available COOL server
- there is timeout associated with migration message if COOLWSD doesn't
get message we move on and close the document
- added a new option in coolwsd.xml to change the migration timeout
default is 180s

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Id7d5eea94d1b03ea5905ca67a9dd8f6ca15952f3
2024-05-07 20:26:46 +05:30
Michael Meeks 8b558a2372 Default to four pre-spawned children.
They should be cheap memory wise, and save quite a bit of latency.

Keep 1 for debug mode - to make attaching to the right process easier.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I230be6ae61874f36b47ffc93d888d455bea3a7d8
2024-05-02 17:28:38 +01:00
Michael Meeks af749c2237 bgsave: rename parameter to background, and add setting.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic49ec5715682b71461b49741d022fc7149aa5a13
2024-04-16 16:43:52 +01:00
Parth Raiyani c9ef8c3015 Removed Group download as option from coolwsd.xml
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: I47c07ed88d68de5fc65b2e5e1e0896bc2a082131
2024-03-29 15:07:07 +01:00
Ashod Nakashian 2e8561195c wsd: move deprecated logic under legacy_server config
We no longer send LOOL-WOPI headers, unless
the configuration specifically flags for
legacy servers. But we always send COOL-WOPI
even to legacy servers, to help them upgrade
seamlessly.

Change-Id: Ifc919ed8f6665cd8f846117ef4e8b7ef09fbd563
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-03-02 04:02:26 -05:00
Aron Budea 8e111f497d wsd: Add config to customize OS version info
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I12abdd0755883acb7bae126ac3c9c999598b4428
2024-01-31 19:33:18 +10:30
Szymon Kłos cad59f4b1c Increase out-of-focus idle timeout to 5 min
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4cd990a6ed9443c9627f9b27bb3d20f4c498b688
2024-01-17 21:54:27 +01:00
Ashod Nakashian 29cfaa7682 wsd: quarantine: absolute-path and better logging
The quarantine path should be an absolute path.

Unfortunately, because we had relative=true in
the path config, we couldn't detect empty configs.
This is because with relative=true the getter
would create a path based on the current directory
and the config value, which would default to
"quarantine" when empty.
This would result in /opt/cool/quarantine or
/usr/bin/quarantine when in fact the path is
really empty.

Now, the config has relative=false and
there is no default. In addition, we
warn if the path is no absolute.

Change-Id: I1b3eb5e76866a12d214b47e6556942715a210e54
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 10:57:20 +01:00
Ashod Nakashian 21513603b4 config: correct the description of always_save_on_exit
Change-Id: I8a15ef06e5a6c8a9f246cb9520f277357d6fc43f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 09:56:46 +01:00
Ashod Nakashian 373c04fe4e wsd: admin: use the cgroup limit as available memory
This applies the cgroup memory limit, if set,
such that if it is lower than the configured
memproportion percentage, we do not exceed it.
Otherwise, we risk running out of our cgroup
limit and by then it is too late to do anything
but die due to OOM.

This also moves the logging of the cgroup memory
stats from COOLWSD into Admin, to avoid duplicate
logging.

Also updated the description of memproportion
config entry to account for the cgroup logic.

Change-Id: I870ae61c1260eb2b3275bd2fa1a4c48ff30957a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-12-30 10:36:44 +00:00
Szymon Kłos c354fa3101 Allow localhost name in lok_allow
This can be useful for debug purpose

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifa0abea77040046e1656e7469b402935ab762dd2
2023-12-20 14:25:35 +01:00
Szymon Kłos a243bc9f49 Add list of allowed data sources
- uses new lok_allow setting to provide such list
- for backward compatibility uses also all post_allow and storage.wopi
  entries
- Used for example in: PostMessage Action_InsertGraphics,
  =WEBSERVICE() function, external reference in the cell

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib930e0119d4ea124b9cd565f6b3683310b1b3ced
2023-12-01 15:25:47 +00:00
Caolán McNamara 48002c5d40 allow testing wasm in non-debug mode
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I583a8104f590e26a76837bef00814684e2015c7a
2023-11-30 12:58:42 +00:00
Ashod Nakashian 8728cd5ea1 wsd: config cleanup and warning fixes
Change-Id: Idb66227d98f8fcca35307c3598a1fcc6b69e38c6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-10-26 20:31:45 -04:00
Gülşah Köse 81c2f16302 coolwsd.xml.in: Add possibility to disable overwrite mode
It seems large groups of people don't have a use for overwrite mode
- Would like to avoid enable it by default

This is just the first step on improving the user experience here.

------

The whole plan would be to:
- 1st Follow up PR
  - Where we disable the overwrite mode when enableExperimental is true
  this we will be able to see if community likes that change or not before making it everywhere
- Other possible improvements
  - Triger a snackbar for the first time the user press the Insert key
    - If the feature is disabled we would show snackbar with timeout
      "Overwrite is disabled. Please contact admin."[Dismiss]
    - If the feature is enabled we would show snackbar with timeout
      "Overwrite mode is now enabled" [Disable] (Disable here means the same action as pressing again the **Insert** does)

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I060b3d2d9d1e7e29a18f5ea1d619c9349eae67c3
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2023-10-20 06:39:18 +02:00
Rash419 11a0e78ed4 admin:log activities irrespective of logging.level
- It logs activities like when admin logged in, authenticated
  metrics endpoint accessed, external monitor getting connected
  and admin actions like kill the document etc

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I059f6b6ee0d8269aec7e3f521622773e348304a3
2023-10-17 14:57:10 +05:30
Skyler Grey e6d9c1f87c Add support for URP messages in COOLWSD
- Allow COOLWSD client sessions to forward messages with the prefix
  'urp' to the child, and return messages with 'urp:' to the client,
  communicating with binary
- Make COOLWSD child sessions use the FunctionBasedURPConnection from
  https://gerrit.libreoffice.org/c/core/+/155100
  (core change ID I2bda3d0b988bef7883f9b6829eeb5b7ae8075f27) to start a
  new URP session
- Make COOLWSD child sessions submit messages to this URP session,
  stripping and adding the 'urp' and 'urp:' prefixes so the Java client
  from https://gerrit.libreoffice.org/c/core/+/154680
  (core change ID I91ee52922a24688a6b94512cb7e7bc760bf25ec9) can
  use the connection (and to avoid interference with any other websocket
  messages)
- Add a COOLWSD option for enabling/disabling URP given the security
  implications around allowing anyone to write URP (e.g. URP lets you
  run shell commands so a mallicious actor can take over the child
  session)

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Idadfe288a78cfd72b01253dfdade150d506e3f05
2023-10-03 10:15:55 +01:00
Skyler Grey d94dbf8c32 Option to stop coolwsd when configuration files change
- This patch only adds an option to enable this feature. It is off by
  default
- This allows you to, say, have a docker container and --restart=always
  to restart when you update the config
- This patch only listens for "/etc/coolwsd/", so if you specify a config
  file that isn't there then you're out of luck... An improvement for a
  followup patch will be make it listen to wherever your config files
  actually are
- The current docker scripts only listen for modifications, so this
  matches that behavior

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I674756b0188893f5d192885bb436256aa827e7b5
2023-09-23 12:42:21 +02:00
Andras Timar 3efc9ba1dd on-disk tile cache was removed in 2019, this config item is unused
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia2a2b72027f7a107e06529d65bfebd94b4860047
2023-08-28 21:31:44 +02:00
Rash419 fcce324cbf admin: added retryInterval option in monitor config
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If0b94bb043a6a4883affac6cf38adcffd3b72b9a
2023-06-29 18:21:33 +02:00
Ashod Nakashian 7a634d0790 wsd: support providing CSP header in the config
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 25fe0b2dfb)

Change-Id: I3e1f3085846ab31326a0a788e7332b5332c10c94
2023-06-19 07:45:02 -04:00
Marco Cecchetti d01bedc09c a11y: add config for enable/disable accessibility in general
A new section about accessibility has been appended to coolwsd.xml
config file

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I086abdf73646639283eb655ae60f200fb64e495a
2023-06-08 00:00:51 +02:00
Andras Timar a71f59c9cc Add possibility to define help root URL from brand package
Previously the help root URL was defined in coolkitconfig.xcu,
but it was inconvenient to change. Now we have this setting in
coolwsd.xml, therefore it can be changed more easily. For
example a brand package can disable the Help buttons on
dialogs by executing the following command in postinstall
script:
  coolconfig set help_url ""

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6d0bdd71ca908df3d2dd20bd321aff9e93896f52
2023-05-17 08:26:38 +02:00
Gökay Şatır 9d6296e4b3 Remove unused document signing code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I30cf381d1fa282cf222ab5abc676374ab7eefb6c
2023-05-08 21:51:47 +03:00
Dave Conroy 264787255f Update coolwsd.xml.in
Fix Zotero description declaration

Signed-off-by: Dave Conroy <dave@tiredofit.ca>
Change-Id: Icd830aae905224de19c651d80d3891730fb40f85
2023-03-30 15:10:12 +02:00
Andras Timar 4ec5c9e8b7 Better documentation of remote grammar checker settings (2)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I68c0d8f59197c8c8d5dc84522ea6363644ed8c97
2023-02-11 00:02:39 +01:00
Andras Timar e4b056bfbf Better documentation of remote grammar checker settings
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0350cc2005325cec378a8942e3294ed18a66538a
2023-02-07 11:26:51 -04:00
Rash419 b9914a3042 js: added routeToken as parameter in wopisrc
fetch route_token from indirectionurl and add them in wopisrc
parameter

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6e724d0c59e12d4f7f6c125ec076e90d20b9b3c8
2023-01-31 15:32:30 +01:00
Michael Meeks 1bac11462f Improve macro option documentation.
Java & beanshell macros are unlikely to work, since they would
require a JVM in the Kit process.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I390fb66d7aa835530dd7d2210fd8e1e89cdba325
2023-01-23 09:33:16 +01:00
Henry Castro 03365b3aeb config: add REST API Protocol to LanguageTool
Change-Id: I0e05ed89d02a9b467e1707db1638fc9ee554586a
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-01-02 11:14:15 +03:00
Pranam Lashkari a93343997d introduced Zotero configuration
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I6c419866da9dd5c7d656be5e4ed64e813ed59e46
2022-11-30 20:37:48 +01:00
Michael Meeks dadfbf0579 allow more verbose log-level during startup to be configured.
Previously this defaulted to 'trace' - now it can be configured, but
still defaults to 'trace'.

Change-Id: I0ecf2f0b991cd8cc29dbde866dd4589be4ca7957
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-21 21:44:05 +01:00
Gökay Şatır cf1074b640 Hide "Translate" menu button if deepL is not configured
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I52a02ab8380468b5dc56cb90a4d8edf2fab56c06
2022-11-02 08:56:25 +03:00
Tor Lillqvist 0a0f309228 Add alternative ways to handle "missing fonts": log, report, or ignore
The default is to log to the coolwsd log file.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I894f8c4b19ee96f7323512e63c8c66372d8516d9
2022-10-13 17:02:08 +03:00
Pedro Pinto Silva 53e6bdd62a Set group_download_as to true as default
There are now too many download options to have each format as
an individual icon on the tabbed view. Plus with improvements
introduced in cbf5f1ad71
we can now safely set group_download_as to true as the default
value. Of course, it can still be switched to false if so
desired.

Notes:
Ideally, and if no one objects to it, we can later on and after
a period of testing remove this option and have only one way of
implementing/showing download options (as dropdown).

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1130684ec2ec54832f5a13648754d29ac71b9d35
2022-09-06 09:36:41 +02:00
Mert Tumer 08f9b72854 DeepL translation integration
this patch relies on a core change:
https://gerrit.libreoffice.org/c/core/+/137199

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ie5f5dada18539586e7c5ea41b0a296b33ae8ee2e
2022-08-25 14:28:35 +02:00
Ashod Nakashian b4ab083d5f wsd: config: merge auto- and idle-save comment and make uint
There is no reason to imply that a negative duration
and/or interval can be negative. 0 is perfectly
sufficient to signal disabling it, without having
to also support negative values. Internally, we
still check for < 0, but the config now doesn't
encourage setting negative values.

Change-Id: Ieaeb5f5ce1efa219a28cc5726a0bd43ef095deb4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-06 20:38:09 -04:00
Ashod Nakashian caacf21710 wsd: add min_time_between_upload_ms config
This introduces a new config entry to
control the minimum time between uploads
after a failed attempt. In the case of
a successful upload, the minimum time
between uploads is bounded by the
min_time_between_save_ms config.

Change-Id: Ic7e37f97a52af2c5ec82897b6e81f57211d16553
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-06 20:38:09 -04:00
Ashod Nakashian 2d695a489e wsd: add min_time_between_save_ms config
This adds a new config entry to help tune
how often to save after the last save
request. This is used regardless of
the auto-save interval.

Change-Id: I58c291e69a63a3b98e72584817b408b54d9f80f1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-06 20:38:09 -04:00
Skyler Grey 9e1f7d96f5 Fix typo in coolwsd.xml.in
- coolwsd.xml.in is the file copied to coolwsd.xml to become the
  configuration file for COOL
- this PR fixes a typo in the languagetool section

Signed-off-by: Skyler Grey <skyler3665@gmail.com>
Change-Id: I945d6d8257df34437092ac9f9c3f395cf5c759b1
2022-08-01 19:37:15 +03:00
Rash419 c91b8b01b4 wsd: new config entry to add unlock_link for feature lock dialog per alias_group
- also added unlock_link option in dynamic configuration

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I075a4aed4f82059714412def965a8ed4d3581b2f
2022-07-20 17:41:19 +05:30
Henry Castro c9178b0223 Add home mode option - enabling more configurability for CODE.
Requested by several users and partners - defaults to off/un-changed.
When set it allows optional disabling of welcome/feedback when used
in a homely environment.

Also bump default max doc/conneciton limits in configure to 10k.

Change-Id: I3c917901e02445d45f6f86b554d47a60aa4e575d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-07-14 18:24:43 +01:00
Mert Tumer e834d65c73 added option to disable ssl verification for LanguageTool
this patch relies on core change
https://gerrit.libreoffice.org/c/core/+/136811

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Id9fa7273631f93914afa870e2c1148a9aa01c2e7
2022-07-05 22:52:55 +02:00
Pranam Lashkari 123f9b5c41 introduce user stats
now logs can provide stats for the users each time they access a document

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I75d1637864b97c553285bc5d1850a8f75cd50d9f
2022-06-16 09:39:14 +01:00
Mert Tumer 58ebdb5041 LanguageTool Grammar checker settings to enable it
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ifc494d5e9f17fc4459556ae809ef3ca12a6b7307
2022-06-14 17:14:26 +03:00
Henry Castro 59ca7a1a28 wsd: infobar: add config value "fetch_update_check"
Every number hours will fetch the latest version data.

Change-Id: I082d9ebb674058c6509dbd33537f24ec7cd9228b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-12 18:25:10 +01:00