Keycloak module hardcodes KC_DB: postgres despite consuming a generic sql-database contract
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker-compose, python, yaml
- Domain
- infrastructure
Research direction
Start with modules/identity/keycloak/module.yaml and trace how metadataDatabase.contractRef is validated and how the Compose service gets its environment. The issue leaves two approaches open, and the configurable option depends on having another sql-database provider to design against. Done means the Postgres compatibility assumption is explicitly enforced, or KC_DB is correctly derived/configured for the bound provider.
Written by the indexing model from the issue text.
Description
Summary
modules/identity/keycloak/module.yaml declares metadataDatabase.contractRef
as a generic sql-database binding (spec.consumes[0].contract.kind: sql-database), matching the same contract kind any sql-database-providing
module could expose. However, the rendered Compose service hardcodes
KC_DB: postgres unconditionally:
environment:
KC_DB: postgres
KC_DB_URL_HOST: "${bindings.metadata-database.host}"
...
Today modules/warehouse/postgres is the only module providing
sql-database, so this is a silent assumption rather than an active bug --
but if a non-Postgres sql-database provider is ever added (e.g. a
managed/cloud database module), binding it to Keycloak would silently
misconfigure the container (Keycloak would try to speak the Postgres wire
protocol to a different database engine) rather than failing validation.
Proposed fix
Either:
- Document this as an explicit, enforced assumption -- e.g. a validator
check thatmetadataDatabase.contractRefresolves to a provider whose
module declares Postgres compatibility (needs a way to express that in a
contract or module metadata), or - Make
KC_DBitself configurable/derived from the bound contract's
provider, once a secondsql-databaseprovider exists to design against.
Context
Flagged during review of PR #677 (feat: add Keycloak identity module,
closing part of #370) as a named follow-up. Low priority today since
Postgres is the only sql-database provider in the repository, but should
not be forgotten once a second one exists.
- Dominant language
- Python
- Stars
- 8
- Forks
- 12
- Avg merge
- 1d 19m
- Merged PRs (30d)
- 119
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RonaldHensbergen/composable-data-stack
-
roadmap-audit
Difficulty 1/5 Under an hour Newbie friendliness 82/100
RonaldHensbergen/composable-data-stack#984 ·
Maintainers usually reply within 1 day
-
trivyignore-audit
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
RonaldHensbergen/composable-data-stack#983 ·
Maintainers usually reply within 1 day
-
area:docs documentation priority:low size:small
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
RonaldHensbergen/composable-data-stack#944 ·
Maintainers usually reply within 1 day
-
area:cli priority:low refactor size:small
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
RonaldHensbergen/composable-data-stack#915 ·
Maintainers usually reply within 1 day
-
area:cli priority:low refactor size:small
Difficulty 1/5 Under an hour Newbie friendliness 88/100
RonaldHensbergen/composable-data-stack#906 ·
Maintainers usually reply within 1 day
All issues in RonaldHensbergen/composable-data-stack
Similar issues
-
fix(ui): serve bundled fonts from the gatewayPossibly taken @dkritarth claimed this today. Openagent: in-progress agent: ready P3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dkritarth/scopewatch#336 · 1 comment ·
Maintainers usually reply within 1 day
-
bob
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
khuisman/mcp-gee-sweet#1267 ·
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-webui/open-webui#33285 · 1 comment ·
Maintainers usually reply within 1 day
-
tv-list
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Gathin23/cleanyourtv#2337 ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day