Skip to content

fix(community): bundle the desktop update signing key - #2923

Merged
openai0229 merged 1 commit into
mainfrom
fix/community-update-key-bundling
Sep 18, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/community-update-key-bundling

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Problem

Community desktop verifies every release manifest with the Ed25519 key configured at packaging time, but that key never reached the packaged application. A packaged desktop therefore reported "no update" forever: TrustedUpdateKeys loaded no key and UpdateManifestVerifier rejected every manifest with Manifest signing key is not trusted (visible only in the update audit log).

Two independent causes, both confirmed on a real build:

  1. chat2db-community-update-keys.properties was not part of the filtered resource set (the BOM filters only application*.properties/yml), so the -Dchat2db.community.update.* values passed by package-community-jcef.sh were never substituted.
  2. Even with filtering enabled, the reactor inherits the Spring Boot @...@ delimiter configuration (resource.delimiter=@, useDefaultDelimiters=false), so the ${...} placeholders were not replaced either.

Nothing has been released with the updater yet, so there is no upgrade path to preserve.

Fix

  • chat2db-community-jcef/pom.xml: filter the bundled key resource and enable the default ${...} delimiters for this module.
  • script/package/package-community-jcef.sh: new verify_bundled_update_key fails packaging when a supplied key pair is absent from the built jcef jar; it stays quiet when no key is configured (local builds).
  • script/package/desktop_layout.sh: drop the unreferenced chat2db_update_java_options helper, whose chat2db.update.* prefix does not match the runtime lookup (chat2db.community.update.*).

Verification

  • mvn -o -pl :chat2db-community-jcef process-resources -Dchat2db.community.update.key-id=PROBE-KEY-ID -Dchat2db.community.update.public-key=PROBE-PUBLIC-KEY substitutes both values; the same command without -D keeps the placeholders (dev builds unchanged); the package output jar carries the substituted values.
  • Real packaging script (SKIP_BACKEND=true SKIP_FRONTEND=true bash script/package/package-community-jcef.sh 5.3.0 prepare): no key -> [check] update signing key not supplied (exit 0); key supplied with an unsubstituted jar -> [error] bundled update signing key is not substituted (exit 1); substituted jar -> [check] bundled update signing key present (exit 0).
  • bash -n on both scripts, script/package/tests/desktop-layout-test.sh passed, git diff --check clean.

Not run here: full reactor mvn clean install, native installers, and the release workflow itself (needs CI secrets and target platforms).

Community desktop verifies every release manifest against the signing key
configured while packaging, but that key never reached the packaged app:
chat2db-community-update-keys.properties was not part of the filtered
resource set, and the reactor inherits the Spring Boot "@...@" delimiter
configuration, so "${...}" placeholders were never substituted. The failure
was silent: TrustedUpdateKeys loaded no key, UpdateManifestVerifier rejected
every manifest as untrusted, and the application reported "no update".

Filter the bundled key resource in chat2db-community-jcef, enable the default
"${...}" delimiters for that module, and fail packaging when a supplied
COMMUNITY_UPDATE_KEY_ID/COMMUNITY_UPDATE_PUBLIC_KEY_B64 pair is not
substituted. Remove the unreferenced chat2db_update_java_options helper,
whose "chat2db.update.*" prefix no longer matches the runtime lookup.
@openai0229
openai0229 requested a review from a team as a code owner September 18, 2026 02:12
@openai0229 openai0229 moved this to In Review in Chat2DB Community Sep 18, 2026
@openai0229
openai0229 merged commit 9b2b944 into main Sep 18, 2026
18 of 21 checks passed
@openai0229
openai0229 deleted the fix/community-update-key-bundling branch September 18, 2026 02:17
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant