Delete the runtime app registration surface (R7, fork 3)

registerApp minted a client_secret whose hash nothing ever verified (six
routes gate on the shared-secret caller-identity check, not on registration);
registered_apps sits empty on the live host. Deleted: POST /v1/apps,
getRegistrationSecret, config.appRegistrationSecret, registerApp/
hashClientSecret/verifyClientSecret, the client_secret_hash column (dropped
idempotently on startup, same as it is created), and
tests/app-registration-endpoint.test.ts. registered_apps and resolveAppProfile
stay as a profile store; app-registry.test.ts fixtures that used registerApp
purely to seed a profile now write through store.registerApp directly, the
same primitive the built-in-shadow test already used.
This commit is contained in:
Meta Vens 2026-09-08 13:21:18 +02:00
commit 776565effd
9 changed files with 45 additions and 376 deletions

View file

@ -9,10 +9,14 @@ CREATE TABLE IF NOT EXISTS registered_apps (
entitlement_sources JSONB NOT NULL,
managed_connection_providers JSONB NOT NULL,
capabilities_json JSONB NOT NULL,
redirect_uris JSONB NOT NULL,
client_secret_hash TEXT
redirect_uris JSONB NOT NULL
);
-- Runtime app registration (POST /v1/apps) minted a client_secret_hash that
-- nothing ever verified. Deleted with the caller-identity cut; drop the
-- column on any store built before this schema too.
ALTER TABLE registered_apps DROP COLUMN IF EXISTS client_secret_hash;
CREATE TABLE IF NOT EXISTS accounts (
id TEXT PRIMARY KEY,
created_at TIMESTAMPTZ NOT NULL,