This commit is contained in:
cortex
2026-05-24 11:26:17 +01:00
parent ae5154ee51
commit f872b9e8f5
+2
View File
@@ -101,6 +101,7 @@ log_info "Linking Synapse and MAS via OIDC..."
CLIENT_ID="synapse-client" CLIENT_ID="synapse-client"
CLIENT_SECRET=$(openssl rand -hex 32) CLIENT_SECRET=$(openssl rand -hex 32)
ADMIN_SECRET=$(openssl rand -hex 32) ADMIN_SECRET=$(openssl rand -hex 32)
MATRIX_SECRET=$(openssl rand -hex 32)
MATRIX_ENDPOINT="http://synapse:8008" MATRIX_ENDPOINT="http://synapse:8008"
EXISTING_CLIENT=$(yq '.clients[] | select(.client_id == "'"${CLIENT_ID}"'")' "$MAS_CFG" 2>/dev/null || echo "") EXISTING_CLIENT=$(yq '.clients[] | select(.client_id == "'"${CLIENT_ID}"'")' "$MAS_CFG" 2>/dev/null || echo "")
@@ -142,6 +143,7 @@ if ! yq '.oidc_providers' "$SYNAPSE_CFG" 2>/dev/null | grep -q "idp_id"; then
\"issuer\": \"${ISSUER_URL}\", \"issuer\": \"${ISSUER_URL}\",
\"client_id\": \"${CLIENT_ID}\", \"client_id\": \"${CLIENT_ID}\",
\"client_secret\": \"${CLIENT_SECRET}\", \"client_secret\": \"${CLIENT_SECRET}\",
\"shared_secret\": \"${MATRIX_SECRET}\",
\"scopes\": [\"openid\", \"profile\"], \"scopes\": [\"openid\", \"profile\"],
\"skip_verification\": false \"skip_verification\": false
}]" "$SYNAPSE_CFG" || { log_error "Failed to inject OIDC config"; exit 1; } }]" "$SYNAPSE_CFG" || { log_error "Failed to inject OIDC config"; exit 1; }