Repository navigation
feat(dawarich): run managed Dawarich 1.19.0 on Redis 8 - #681
Merged
Merged
Conversation
Move the managed bundle from Dawarich 1.15.3 to 1.19.0, which includes the 1.16 fixes for stale two-factor challenges and shared-photo authorization, and its dedicated Redis from 7.4 to 8.10, which reads the data 7.4 saved. The separate Sidekiq worker stays: 1.19 embeds jobs in the web process only with SIDEKIQ_EMBEDDED=true, which the managed app does not set. Re-audit the privacy subject projection against the live 1.19.0 schema in both the Rails collector and the backup exporter. Export geofence events, webhooks and their delivery state, legacy area-to-place mappings and the point/track revision counters. Omit webhook signing secrets and delivery response bodies and error messages, and reduce webhook URLs to their origin, since a path or query is often the receiver's credential. Add the 1.19 preference keys to the settings allowlist. Compare the complete table inventory as well as the FK graph before collecting: the revision counters carry user_id without a constraint, so the graph alone would have missed them. The new schema fingerprint comes from the live 1.19.0 database, and the runner reproduces the committed 1.15.3 fingerprint. Backups now record the dawarich-1.19.0 contract. Document the upgrade's background jobs and the self-hosted reach of geofencing webhooks.
The backup exporter's host pattern accepted "@", so a URL with two "@" signs, such as https://user:pa@ss@host/x, exported part of its password as https://ss@host. Exclude "@" and whitespace from the host, accept only hexadecimal IPv6 literals, and assert the malformed URL exports as null in both the exact-image and retained-backup gates, as the Rails collector already does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
The managed Dawarich bundle moves from Dawarich 1.15.3 to 1.19.0, and its dedicated Redis from 7.4 to 8.10.
Dawarich 1.16.0 fixed two security issues:
Later releases add geofencing and webhooks, archived places, and performance and data-quality fixes. App and worker images move together (
freikin/dawarich:1.19.0, digestsha256:d9385242…, upstream commit752641768f).The worker stays separate. Dawarich 1.17 can run background jobs inside the web process, but only when
SIDEKIQ_EMBEDDED=true. The managed app doesn't set it, so jobs never run twice, and the stocksidekiq-entrypoint.shstill ships in 1.19.0. Keepingdawarich-sidekiqavoids removing a service from existing deployments in this PR.Redis 8.10 loads an RDB written by the currently pinned 7.4 image without migration. Values, the job list and the scheduled set survive, and the health command works. Valkey can't be used instead: Valkey 9.1.3 refuses Redis 7.4's RDB format 12 and exits. The licence field gains the AGPL-3.0 option Redis 8 offers, and the Renovate rule now follows the 8.x line.
Privacy subject export
Each version's export is tied to an exact, reviewed database schema, so I re-audited both exporters against a live 1.19.0 database:
Compared with 1.15.3, 1.19.0 adds seven tables, seven foreign keys and five columns, and removes nothing.
New export entries, in both exporters:
geofence-eventswebhookswebhook-deliverieslegacy-area-place-mappingspoint-revisions,track-revisionsOther changes to the export:
visit_radius,geofenceandarchived_at, visits gainlocation_label, and trip sources gainskip_ssl_verification.A gap in the fail-closed check, now closed. The revision counters carry
user_idwithout a foreign-key constraint. The existing check compares only the foreign-key graph and the reviewed models, so it would not have noticed them. Both exporters now also compare the complete table inventory, and the exact-image test proves an added unconstrained table makes the collector refuse withunsupported_schema.Fingerprint. The new schema fingerprint
d7289062…was computed from the live 1.19.0 database. The same runner reproduces the committed 1.15.3 fingerprint4ae830ea…exactly.Backups. They now record the
dawarich-1.19.0contract. As agreed, there is no legacy profile, so the backup exporter refuses a backup taken on 1.15.3.Timeline API compatibility
I seeded identical data into live 1.15.3 and 1.19.0 instances. The data included a visit with a place, one without, a track and points. On both versions,
/api/v1/users/me,/settings,/timelineand/tracksvalidate against OpenMapX's response schemas, including the paging headers, and/healthanswersok. The only difference is an extravisit_radiuson a visit'splace. The API is still authorized only by the user's API key.Geofencing webhooks and network reach
Dawarich 1.18 lets each user send geofence events to a webhook URL. The managed app runs with
SELF_HOSTED=true, so Dawarich accepts private addresses and Docker service names; it blocks only cloud-metadata, multicast and reserved ranges. Dawarich containers share theopenmapxDocker network. A Dawarich user can therefore make the worker send a signed POST with a fixed JSON body to another OpenMapX service, and see its status code and error message. Dawarich stores the response body but does not show it in the UI or API.This is the same class of reach 1.15.3 already allowed for the Immich and PhotoPrism integration URLs. The operator runbook and the release note now describe it. A natural follow-up is to put managed Dawarich on its own Docker network, so it can reach only its database, Redis and the internet; I left that architectural change out of this PR.
The privacy policy describes managed Dawarich generically and is unchanged. Whether it should mention user-configured webhook transfers is a legal-text decision for you.
Docs and release note
SKIP_VISITS_FLEET_REDETECT), the separate worker, Redis compatibility, the refused 1.15.3 backups and the webhook reach.release-notes/managed-dawarich-1-19.mddeclares migration, security and operator-action impact.Verification
OPENMAPX_RUN_DAWARICH_EXPORT_TESTS=1with 1.19.0 passes. It now seeds subject and foreign rows in every new table and checks:test-fixture.mjspasses through the Python exporter on a real restore. Its new rows include a webhook URL with credentials in it and a non-default port, and the fixture checks the projected origin, labels, coordinates and absence of secrets. It also checks the 45 reviewed relations and the fingerprint.@(https://user:pa@ss@hostbecamehttps://ss@host). The host pattern now excludes@and whitespace, and both gates include that URL with a sentinel; it now exports asnull.pnpm test:database api-privacy(24 files, 141 tests) andexport-restore(2 files, 7 tests) pass against a disposable migrated PostGIS.pnpm lint,pnpm check-types(32/32),pnpm check:policy,pnpm check-openapiandpnpm check-service-filespass. The full Vitest suite passes: 1,950 files, 24,055 tests.webhooksqueue and passes the manifest's health command.Release and upgrade impact
Product impact: migration, security, operator-action
No package release: the built
@openmapx/extension-cliand@openmapx/extension-contractsbundles are byte-identical toorigin/main(built withtsupon both); the changed core privacy sources are not part of either package's delivered output.Back up the managed Dawarich state before updating. The first start runs irreversible migrations and long background jobs. Keep the worker running until they finish, or set
SKIP_VISITS_FLEET_REDETECT=1on small servers. Review the geofencing-webhook reach before onboarding users you would not give access to the OpenMapX Docker network.