fix trino realm

This commit is contained in:
2026-10-12 14:43:12 +07:00
parent f56c184110
commit 64c60f99c2
3 changed files with 21 additions and 4 deletions
+14
View File
@@ -423,6 +423,20 @@ else
bad "Nessie host-facing: port bisa salah untuk Nessie eksternal (beh='${_nr_beh}')"
fi
# ─── 0s. Realm Keycloak Trino terparameter (SICABE_REALM, bukan literal `sicabe`) ─
# Regresi: issuer/auth/token/jwks Trino dipatok `/realms/sicabe` → client ber-realm lain
# (SICABE_REALM != sicabe) tetap diarahkan ke realm `sicabe` → OIDC gagal.
_sr_tc="${DEPLOY_DIR}/config/trino/config-coordinator.properties"
_sr=1
grep -q 'realms/sicabe' "${_sr_tc}" && _sr=0
grep -q 'realms/${ENV:SICABE_REALM}' "${_sr_tc}" || _sr=0
grep -q 'SICABE_REALM: ${SICABE_REALM:-sicabe}' "${DEPLOY_DIR}/docker-compose.yml" || _sr=0
if [[ "${_sr}" == "1" ]]; then
ok "Trino OAuth2: realm pakai \${ENV:SICABE_REALM} + SICABE_REALM diteruskan ke container"
else
bad "Trino OAuth2: realm masih literal 'sicabe' atau SICABE_REALM tak diteruskan"
fi
# ─── 1. generate ────────────────────────────────────────────────────────────
if ! python3 "${DEPLOY_DIR}/lib/cluster/generate.py" render \
"${INVENTORY}" "${DEPLOY_DIR}/docker-compose.yml" "${DEPLOY_DIR}/.env" \