#224·lore

Standard OIDC/Keycloak client login (Phase 3 of the OIDC/OAuth2 proposal): status and rough timeline?

Author: deepxCreated Sep 22, 2026Updated Sep 22, 2026
Labelsenhancementneeds-triage

Problem

We are a small self-hosted deployment running loreserver v0.10.0 behind Caddy, with Keycloak as our OIDC provider. [server.auth] is fully configured (jwt_issuer, jwt_audience, [server.auth.jwk].endpoint) and works correctly for verifying incoming bearer tokens.

However, the interactive lore auth login <remote-url> flow cannot be used against Keycloak at all. Root cause (confirmed by reading the client source): authentication::find() in lore-transport/src/auth/mod.rs resolves any https:// auth URL to the built-in UcsAuthentication implementation (registered as a transition fallback for the https scheme). This implementation speaks Epic's proprietary internal UrcAuthApi gRPC protocol (StartAuthSession, GetAuthSession, etc.), not standard OIDC/OAuth2. When auth_url points at Keycloak, the client sends a gRPC request to a plain HTTP(S) OIDC endpoint, Keycloak answers with a normal HTTP 404 (not a gRPC frame), and the client fails with a confusing low-level error: protocol error: received message with invalid compression flag: 123 ... while receiving response with status: 404 Not Found.

We found docs/proposals/2026-08-20-oidc-oauth2-authentication.md, which is status: Approved and describes exactly this gap in its Phase 3 ("client OIDC provider, Tier 1": device grant, discovery, oidc_issuer advertised by the server). As far as we can tell from the repository, Phase 2 (server-side: optional claims, permission_claim/resource_claim, JWKS discovery) landed in v0.10.0, but Phase 3 (the client actually speaking OIDC/device-grant instead of UrcAuthApi) does not appear to have landed yet, and we could not find an open PR actively implementing it (PR #22 is a separate, unmerged LEP for an auth-service adapter, last updated over a month ago).

We also found #161, which appears to be the same underlying problem (a different OIDC provider, Dex, hitting the same UcsAuthentication/auth_url scheme-based dispatch), so this is not an isolated case.

Our current workaround: a PowerShell script that manually obtains an access token from Keycloak via the Resource Owner Password grant and feeds it to lore auth login --token-type lore --token <jwt>, plus a second Keycloak audience mapper to satisfy the client's verify_jwt_usage_for_remote domain check (which reads aud as a list of DNS domains rather than as a standard OAuth audience/resource identifier). This works, but it is a manual, short-lived-token, non-standard workflow that every team member has to run repeatedly (Keycloak's default access-token lifetime is a few minutes), and it does not use the device grant / any refresh mechanism.

Proposed solution

We are not asking for a specific implementation right away — the design already exists in the approved OIDC/OAuth2 proposal (Phase 3: device authorization grant, oidc_issuer/oidc_client_id/oidc_scopes advertised via [environment.endpoint], auth_mode client opt-in, refresh token support). What would help us and other self-hosted operators plan around this:

  1. A rough status update on Phase 3 of the OIDC/OAuth2 proposal (docs/proposals/2026-08-20-oidc-oauth2-authentication.md) — is it actively being worked on, blocked on something, or not yet scheduled?
  2. Whether there is an issue/PR we should watch/subscribe to for this specific piece (client-side OIDC device grant support), separate from PR #22's auth-service-adapter LEP.
  3. If it helps, we're happy to have this issue serve as an additional real-world data point (self-hosted Keycloak) alongside #161's Dex-based report, since both point at the same root cause: scheme-based Authentication implementation selection in lore-transport/src/auth/mod.rs treating every https:// auth_url as the legacy UcsAuthentication protocol.

In the meantime, if there's a recommended interim approach (e.g. a supported way to plug in a lightweight adapter service implementing UrcAuthApi in front of Keycloak, rather than our ad-hoc token script), pointers to that would also be very welcome.

Alternatives considered

  • Manual --token-type lore --token <jwt> login with a token obtained out-of-band from Keycloak via the Resource Owner Password grant (works, but short-lived, no refresh, requires an extra Keycloak audience mapper to satisfy the client's domain-suffix aud check).
  • Considered writing a small UrcAuthApi-compatible adapter service in front of Keycloak (as sketched in PR #22's LEP) but wanted to check on the standards-based Phase 3 timeline first before investing in that.