Skip to content

fix(rybbit): grant clickhouse access_management for rybbit_query provisioning - #226

Merged
ineedjet merged 1 commit into
mainfrom
rybbit-clickhouse-access-management
Oct 10, 2026
Merged

ineedjet merged 1 commit into
mainfrom
rybbit-clickhouse-access-management

Conversation

@ineedjet

Copy link
Copy Markdown
Collaborator

Summary

  • apps/rybbit/docker-compose.yml's clickhouse service (via ../clickhouse-26.5.yml) didn't set CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1, which upstream's own compose does
  • rybbit's backend runs provisionQueryUser() on every startup, creating the least-privilege rybbit_query user that powers custom SQL queries/dashboard cards - this requires access_management on the main ClickHouse connection
  • Without it, the failure is non-fatal and silent: core dashboards/sites/session-replay keep working, but custom SQL queries and dashboard cards fail closed, logged but not surfaced anywhere flightdeck would see
  • clickhouse-26.5.yml is a generic multi-app template, so granting this globally there would hand every app's default ClickHouse user elevated rights it doesn't need - overridden on rybbit's own clickhouse service instead, merged in via include:

Not addressed here (per the issue's own lower-priority flags)

  • ClickHouse version pin (26.5 here vs upstream's 26.3.17.4) - not yet confirmed as an actual problem, just worth someone double-checking separately
  • A handful of optional upstream env vars (CLICKHOUSE_QUERY_PASSWORD, DEPLOYMENT, LITE_DASHBOARD, OPENROUTER_API_KEY, OPENROUTER_MODEL, CLUSTER_WORKERS) - all have safe fallbacks upstream, so left out of this fix to keep it focused

Closes #225

Test plan

  • Verified the merge behavior in an isolated scratch copy of apps/ (never touching the real repo's apps/rybbit/.env, which doesn't exist locally anyway): docker compose config confirms the override's environment: key merges into clickhouse-26.5.yml's own environment map (CLICKHOUSE_DB, CLICKHOUSE_PASSWORD, and now CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1" all present together), rather than replacing it - every other field from the template (configs, healthcheck, volumes, networks, image) is preserved unchanged
  • Not yet reproduced against a live deploy - same caveat the issue itself flagged, since this is a self-hosted ClickHouse user-provisioning behavior that only surfaces once the backend container actually starts against a real ClickHouse instance

🤖 Generated with Claude Code

…isioning

Upstream's backend runs provisionQueryUser() on every startup to create
the least-privilege rybbit_query user (powers custom SQL queries and
dashboard cards) via SQL against the main ClickHouse connection. That
requires access_management on that connection, which upstream's own
compose grants via CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 - missing here
since apps/clickhouse-26.5.yml is a generic multi-app template and
shouldn't grant this by default. Override it on rybbit's own clickhouse
service instead, merged in via include: (verified against a scratch copy
of apps/ with docker compose config - the override's environment: key
merges into the template's own environment map rather than replacing it,
same as every other field the template declares).

The failure mode without this is non-fatal and silent: core
dashboards/sites/session-replay keep working, only custom SQL
queries/dashboard cards fail closed, logged but not surfaced anywhere
flightdeck would see.

Fixes #225

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ineedjet
ineedjet merged commit dab6a77 into main Oct 10, 2026
5 checks passed
@ineedjet
ineedjet deleted the rybbit-clickhouse-access-management branch October 10, 2026 21:03
@ineedjet ineedjet mentioned this pull request Oct 10, 2026
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.

apps/rybbit: clickhouse missing CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1, rybbit_query self-provisioning likely fails

1 participant