Skip to content

feat(installer): add the opt-in libredb-mobile Keycloak client - #22

Open
cevheri wants to merge 1 commit into
mainfrom
feat/installer-mobile-client
Open

cevheri wants to merge 1 commit into
mainfrom
feat/installer-mobile-client

Conversation

@cevheri

@cevheri cevheri commented Oct 22, 2026

Copy link
Copy Markdown
Member

Lets an install serve the LibreDB mobile app (libredb/libredb-mobile#1), which calls Studio with a Keycloak access token through Studio's bearer channel (libredb/libredb-studio#1914).

With mobile.enabled: true in libredb.yaml the installer converges a public client libredb-mobile (standard flow, PKCE S256, scopes basic, profile, email, libredb-roles, an audience mapper adding libredb-studio-api to the access token) and gives Studio OIDC_BEARER_AUDIENCE and OIDC_BEARER_CLIENT_IDS. The export, the manual realm check and the docs cover it. Absent or disabled, the config, plan, export and studio.env are unchanged.

Verified: bun run typecheck, bun run test (846 pass), coverage check, build, and the Keycloak 26.8.1 integration tests, including a real PKCE login as libredb-mobile that checks aud, azp, libredb_roles and the refused password grant.

Not verified: a full install against Studio, since no Studio release has #1914 yet; the pinned Studio 1.0.0 lacks it, so the version bump waits for that release.

A new optional mobile section (enabled, redirectUri, postLogoutRedirectUri, both URIs defaulting to org.libredb.mobile:/oauth2redirect) lets an operator turn on the LibreDB mobile app.
When enabled, keycloak-configure converges the public client libredb-mobile: standard flow with PKCE S256 only, the default scopes basic, profile, email and libredb-roles, and a client audience mapper that adds libredb-studio-api to the access token.
The planner gains client-level mapper actions, and a new client no longer gets PUTs for scopes the realm already gives it.
studio.env gets OIDC_BEARER_AUDIENCE and OIDC_BEARER_CLIENT_IDS under the new inventory condition mobileClient.
The export, the manual realm check and the docs cover the client, and the docs note that the bearer channel needs a Studio release with libredb-studio#1914.
With the section absent or disabled, the normalized config, the Keycloak plan, the export, studio.env and the step input hash stay unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant