Skip to content

fix: 56-enable-spiffe.sh hardcodes HTTPS causing Kind E2E Wave 56 failure #1554

Closed

Description

@pdettori

Summary

The 56-enable-spiffe.sh script hardcodes https:// when fetching the Keycloak OIDC configuration, but on Kind clusters Keycloak is only accessible via HTTP. This causes the Kind E2E CI to fail at Wave 56 ("Enable SPIFFE identity for token exchange") on the main branch.

Impact

Main branch Kind E2E is red. Every Kind E2E run fails at this step before reaching the actual E2E tests.

Recent failures on main:

  • 25705738505 (2026-05-12)
  • 25694144300 (2026-05-11)
  • 25691486049 (2026-05-11)
  • 25668572822 (2026-05-11)
  • 25645863446 (2026-05-11)

Root Cause

In .github/scripts/token-exchange/56-enable-spiffe.sh, line 68:

KC_ISSUER=$(curl -sk "https://${KC_HOST}/realms/${TX_REALM}/.well-known/openid-configuration" 2>/dev/null | jq -r '.issuer // empty')

This constructs the URL using https:// and KC_HOST (which resolves to keycloak.localtest.me:443). On Kind, Keycloak is accessible only via HTTP through the internal service URL returned by get_keycloak_url() (line 52 of lib.sh):

echo "${KEYCLOAK_URL:-http://keycloak-service.${KC_NAMESPACE}.svc:8080}"

The rest of the script correctly uses $KC_URL (set via get_keycloak_url() on line 12), but line 68 bypasses it and constructs its own URL with the wrong protocol.

Error in CI:

dial tcp [::1]:443: connection refused

Fix

Line 68 should use $KC_URL (already available) instead of constructing a separate URL:

# Before (broken)
KC_ISSUER=$(curl -sk "https://${KC_HOST}/realms/${TX_REALM}/.well-known/openid-configuration" 2>/dev/null | jq -r '.issuer // empty')

# After (uses the correct protocol/host from get_keycloak_url)
KC_ISSUER=$(curl -sk "${KC_URL}/realms/${TX_REALM}/.well-known/openid-configuration" 2>/dev/null | jq -r '.issuer // empty')

Note: the intent of line 68 may have been to use the external Keycloak URL (for the issuer claim), in which case the fix should use $KEYCLOAK_PUBLIC_URL or the chart's keycloak.publicUrl value instead of hardcoding HTTPS.

Related

Assisted-By: Claude Code

Activity

  1. pdettori commented on Jul 16, 2026

    @pdettori
    MemberAuthor

    Resolved by #1596 (commit `14a3f989`, merged 2026-05-27).

    Line 68 of `.github/scripts/token-exchange/56-enable-spiffe.sh` now uses `${KC_URL}` (from `get_keycloak_url()`) instead of the hardcoded `https://${KC_HOST}`, matching the fix proposed here. Verified present on current `main`.

    Closing as resolved.

    Assisted-By: Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions