Commit Graph
31 Commits
Author SHA1 Message Date
Linus Rath e9b235bab2 Merge branch 'main' into feat/enterprise-pack
# Conflicts:
#	components/admin/admin-shell.tsx
#	lib/admin/outgoing-hosts-registry.ts
#	lib/admin/reachable-hosts.ts
#	scripts/lite/build.mjs
#	stores/policy-store.ts
2026-11-01 13:46:59 +01:00
Linus Rath 904c0a2070 test: list the intranet feed connection pools as per-process state 2026-11-01 09:08:00 +01:00
Linus Rath d49839435b feat: send OpenTelemetry traces when an OTLP endpoint is configured
With `OTEL_EXPORTER_OTLP_ENDPOINT` or
`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` set (and neither
`OTEL_SDK_DISABLED=true` nor `OTEL_TRACES_EXPORTER=none`), Bulwark
loads the OpenTelemetry SDK at startup and exports Next's own spans
plus a client span for every call to Stalwart, WOPI, translation, the
plugin proxy and OAuth over OTLP/HTTP. Calls to Stalwart carry a
`traceparent` header, so Stalwart's spans join the trace. All other
settings come from the standard `OTEL_*` variables.

Every span is scrubbed before export: URLs keep their origin only,
request paths become their route group, query strings, user agents and
client addresses are dropped, and addresses or credentials in other
attributes are removed. Without an endpoint the SDK is never loaded.
The endpoint is listed under the hosts that stay reachable with no
third-party traffic, and System > Monitoring shows whether tracing runs.
2026-11-01 03:25:28 +01:00
Linus Rath cba1109444 feat: report browser and server errors to an error tracker the admin sets
Admins had logs and nothing else: client errors only reached the
browser console. An admin can now set a Sentry-protocol address (DSN)
for Bugsink, GlitchTip or Sentry under System > Monitoring, or with
`ERROR_REPORTING_DSN`, `ERROR_REPORTING_DSN_FILE`,
`ERROR_REPORTING_SAMPLE_RATE` and `ERROR_REPORTING_ENVIRONMENT`.
Bulwark Lite reads the same from `errorReporting` in policy.json.
Everything stays off while no address is set.

- browsers report errors from the error boundaries, window.onerror,
  unhandled rejections and failed JMAP requests (method and error type
  only), with route and JMAP method breadcrumbs and the chunks' debug IDs
- the server reports what Next hands to onRequestError and what routes
  log with logger.error
- every report is scrubbed first: quoted text, addresses, URLs, file
  names, tokens and the rest after the first line are removed, and the
  server scrubs what browsers post to /api/errors again
- reports are deduplicated and rate-limited per session and process
- errors are counted per day for "errors today" on the admin page
- startup messages and audit entries go through the logger, so
  `LOG_FORMAT=json` covers them
2026-11-01 02:50:19 +01:00
Linus Rath acf125a52b test: fail when server state skips the shared store without a listed reason #1066 2026-11-01 01:12:49 +01:00
Linus Rath 3a9aef7c50 feat: move plugins, themes, branding and the signing key with the shared-store import and export #1066 2026-11-01 01:08:34 +01:00
Linus Rath 70a7e1227c fix: drop files of removed plugins on export and read only the approval files on import #1066 2026-11-01 01:07:30 +01:00
Linus Rath 00e28e5f83 Merge branch 'feat/multi-instance' into feat/multi-instance-ext 2026-11-01 00:52:04 +01:00
Linus Rath 77a06a8aa0 fix: stop logging that the shared store is unreachable while its first connection is still being made 2026-11-01 00:39:01 +01:00
Linus Rath 26f0b72b2e feat: write plugins, themes, approvals and branding back to local files on export #1066 2026-11-01 00:30:41 +01:00
Linus Rath 355e57ca6c Merge branch 'feat/multi-instance' into feat/multi-instance-ext 2026-11-01 00:28:15 +01:00
Linus Rath ad7a8d713c feat: bring plugins, themes, approvals and branding along when moving to a shared store #1066 2026-11-01 00:27:17 +01:00
Linus Rath 3ed25e1d95 feat: import an existing install into the shared store on first start and export it back with SHARED_STORE_EXPORT #1066 2026-11-01 00:17:20 +01:00
Linus Rath 2078b0a13f Merge branch 'feat/multi-instance-auth' into feat/multi-instance 2026-11-01 00:13:17 +01:00
Linus Rath 89f337c0ae Merge branch 'feat/multi-instance-admin' into feat/multi-instance 2026-11-01 00:12:24 +01:00
Linus Rath b880e453a5 fix: import the audit log in batches and finish an import that stopped halfway #1066 2026-11-01 00:08:39 +01:00
Linus Rath 5e73fcbcc1 feat: append lines in batches to the shared log and clear it #1066 2026-11-01 00:08:39 +01:00
Linus Rath 80bcfde5f3 Merge branch 'feat/multi-instance-data' into feat/multi-instance 2026-11-01 00:05:03 +01:00
Linus Rath a87a9a5f6a fix: flush account archives to disk before they replace the old file again #1066 2026-10-31 23:59:43 +01:00
Linus Rath 01acacc27b fix: answer 503 instead of 500 when the shared store is full or too busy to take a write #1066 2026-10-31 23:48:40 +01:00
Linus Rath 7748c75a6a Merge branch 'feat/multi-instance' into feat/multi-instance-auth 2026-10-31 23:47:48 +01:00
Linus Rath 7faed7e5f4 fix: send a change notice again when the shared store dropped right after an admin save #1066 2026-10-31 23:46:01 +01:00
Linus Rath d6e98e207a Merge branch 'feat/multi-instance' into feat/multi-instance-admin 2026-10-31 23:45:00 +01:00
Linus Rath 8b9df1b633 Merge branch 'feat/multi-instance' into feat/multi-instance-data 2026-10-31 23:43:48 +01:00
Linus Rath 9e2b59847f refactor: recognise a shared-store outage by name, so every bundle's module copy sees it 2026-10-31 23:31:02 +01:00
Linus Rath 25c44e01f8 feat: carry the session-limit start and office editor revocations into the shared store on import #1066 2026-10-31 23:31:00 +01:00
Linus Rath e8be930984 feat: import settings, plugin credentials, archives and telemetry state into the shared store #1066 2026-10-31 23:26:53 +01:00
Linus Rath 4983325f32 feat: bring the admin config, password, state and audit log along when moving to a shared store #1066 2026-10-31 23:26:52 +01:00
Linus Rath c20ecd4b1a refactor: let each store bring its own step for the shared-store import 2026-10-31 22:42:14 +01:00
Linus Rath 1b2d81be27 feat: hold each instance back until it has loaded from the shared store and add a readiness check #1066 2026-10-31 22:40:51 +01:00
Linus Rath df90492258 feat: add a shared store that keeps today's files by default and can use a redis-protocol server #1066 2026-10-31 22:40:44 +01:00