You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTER AUTHENTICATION v_oauth SET client_id = 'vertica';
333
-
ALTER AUTHENTICATION v_oauth SET client_secret = 'P9f8350QQIUhFfK1GF5sMhq4Dm3P6Sbs';
336
+
ALTER AUTHENTICATION v_oauth SET client_id = '${CLIENT_ID}';
337
+
ALTER AUTHENTICATION v_oauth SET client_secret = '${CLIENT_SECRET}';
334
338
ALTER AUTHENTICATION v_oauth SET discovery_url = 'http://keycloak.keycloak.svc.cluster.local:8080/realms/test/.well-known/openid-configuration';
335
339
ALTER AUTHENTICATION v_oauth SET introspect_url = 'http://keycloak.keycloak.svc.cluster.local:8080/realms/test/protocol/openid-connect/token/introspect';
336
340
CREATE USER oauth_user;
@@ -400,17 +404,22 @@ jobs:
400
404
-d "client_secret=${CLIENT_SECRET}"
401
405
) || true
402
406
403
-
# JSON validity check
404
-
if echo "$RAW" | jq -e . >/dev/null 2>&1; then
405
-
TOKEN=$(echo "$RAW" | jq -r .access_token)
407
+
# Validate RAW is JSON
408
+
if ! printf '%s' "$RAW" | python3 -c 'import sys,json; json.load(sys.stdin)' >/dev/null 2>&1; then
409
+
echo "Token endpoint did not return valid JSON:"
410
+
printf '%s\n' "$RAW"
411
+
exit 1
406
412
fi
407
413
408
-
if [ -n "${TOKEN}" ] && [ "${TOKEN}" != "null" ]; then
0 commit comments