feat(server): publish a stable installation identity for client connections

The iOS app lets an account reach one server through several addresses, such as a home network
IP and a public name. Before it sends credentials to an alternative address it needs to know the
address leads to the same installation, so expose a public, credential-free GET /server-identity
returning a persisted UUID, and add the same optional instanceId to app-info with the
server-connection-identity feature flag.

The UUID lives in a singleton server_identity row shared by every replica, created on first use
and cached per process. An unreadable identity omits instanceId instead of failing app-info,
which clients rely on for feature detection. Existing routes and bodies are unchanged and the
web client does not call the new route; the iOS app does.

The migration uses IF NOT EXISTS because an unreleased build created the same table as 0109.
This commit is contained in:
neon
2026-10-13 19:37:52 -06:00
parent 294bb13987
commit fbaf0b63df
17 changed files with 24098 additions and 27 deletions
+18
View File
@@ -549,6 +549,24 @@ export const E2E_SUITES = Object.freeze({
...SHARED_DB_AND_HELPER_PATHS,
],
},
"server-connection-identity": {
id: "server-connection-identity",
name: "Server Connection Identity",
timeout: 60,
lane: "full",
description: "Public installation identity and concurrent singleton persistence",
vitestTarget: "test/server-connection-identity.e2e-spec.ts",
junitOutput: `${TEST_RESULTS_DIR}/server-connection-identity-e2e-junit.xml`,
prepareDedicatedDatabase: true,
useDedicatedDatabase: true,
changedPaths: [
"server/src/modules/server-identity/**",
"server/src/modules/app-info/**",
"server/test/server-connection-identity.e2e-spec.ts",
...SHARED_TYPES_PATHS,
...SHARED_DB_AND_HELPER_PATHS,
],
},
"app-settings-oidc-contract": {
id: "app-settings-oidc-contract",
name: "App Settings OIDC Contract",