Commit graph

87 commits

Author SHA1 Message Date
Caolán McNamara
f361fb1375 default to using mount namespaces if experimental enabled
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5ce91a2aaefd8c84eecb6aa5d66f492cb8a3becd
2024-07-16 07:09:42 +02:00
Caolán McNamara
98ad726425 mount_namespaces option doesn't depend on experimental flag anymore
though it is still off by default

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id332a65523932183bfd0468fa3e3fd8f081a2713
2024-07-12 14:13:52 +01:00
Caolán McNamara
4e28a22dd9 allow logRotateOnOpen but sync archiving to proceed without additional thread
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I34d3cdc6e1753c8d8410db2b760035c75df020b0
2024-07-12 14:13:52 +01:00
Caolán McNamara
f9a6560391 wip: disable log rotation to suppress that thread to make things simple for now
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id7ed7ad97628558864fee9da43cdc8997d146ae9
2024-07-12 09:14:33 +01:00
Caolán McNamara
85eaec2311 add 'mount_namespaces' option to use linux mount namespaces
if experimental_features and mount_namespaces is enabled and it is
possible to "unshare" then instead of coolforkit exec coolforkitns which
doesn't have any capabilities set and inprocess mount inside a namespace
instead of calling coolmount

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I48bef12b9156f41c78221e750a30aacee8a737a9
2024-07-02 13:31:38 +01:00
Szymon Kłos
ba82b1c4fb versionbar: add option to hide popup
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5b6b0695789048a208db970f45e42e0f59d855de
2024-07-02 09:19:19 +02:00
Caolán McNamara
8e5b9e018f There is only one client context so just use a single setting
of ssl.ssl_verification instead of retaining a separate
storage.ssl.ssl_verification

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic132467497135ebdc17c9334274ff8950e2001a0
2024-06-24 18:53:34 +02:00
Caolán McNamara
4346c2fdd3 hook default verification level from debug/experimental
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I138aeca51247cb173b1639cc4f5033ad9ce3265b
2024-06-24 18:53:34 +02:00
Caolán McNamara
ba68a9d0a4 document how storage settings inherit their defaults
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I44d6859954667176c34cbb355fabbc87dcbc4001
2024-06-24 18:53:34 +02:00
Michael Meeks
837da9293c delta: Disable pixel tracing in trace logging by default.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I26ac16aa6d5cc811633b9ef5da71df030c97b97e
2024-06-20 15:55:01 +01:00
Ashod Nakashian
094dedad07 wsd: quarantine: better config defaults
Change-Id: I3def89c099fa4944f100e721e1bd9421801b8af6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-06-18 09:47:29 +02:00
Szymon Kłos
f1b79c2f41 Server audit: add config option to disable
Setting logging.disable_server_audit to true will
disable server audit dialog, button in the menus and notification.

In that case we will receive "serveraudit: diabled" message in the
client. This doesn't disable any logging to the file.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I47632b2b66e417166ce31d01a7b82d6190c66d04
2024-06-17 13:52:00 +02:00
Caolán McNamara
cf903242a2 fix resquest -> request in coolwsd.xml comment
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie804baec41b59fe7418bb7057f8110cd04b64b9a
2024-05-23 14:24:37 +01:00
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 25fe0b2dfb56494d59c3502f690265d46dbbc4ff)

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