Skip to content

Disable validating transport if INSECURE_DISABLE_URL_VALIDATION is set - #1471

Merged
jhrozek merged 1 commit into
mainfrom
disable_validating_round_tripper
Aug 19, 2025
Merged

jhrozek merged 1 commit into
mainfrom
disable_validating_round_tripper

Conversation

@jhrozek

@jhrozek jhrozek commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

When deploying a dev KC instance, it is sometimes needed to set INSECURE_DISABLE_URL_VALIDATION because the KC instance won't be using TLS. We didn't honor INSECURE_DISABLE_URL_VALIDATION in the round-tripper which was causing http://keycloak and similar URLs to be rejected during connection even if they parsed fine.

When deploying a dev KC instance, it is sometimes needed to set
INSECURE_DISABLE_URL_VALIDATION because the KC instance won't be using
TLS. We didn't honor INSECURE_DISABLE_URL_VALIDATION in the
round-tripper which was causing http://keycloak and similar URLs to be
rejected during connection even if they parsed fine.
jhrozek added a commit that referenced this pull request Aug 18, 2025
…tartup

When working on patches for PRs #1470 and #1471 I've been initially
seeing very long timeouts on toolhive startup. The underlying reason
were the transports not allowing me but the fact that the timeout was so
long and happened on toolhive startup was really irritating. I think we
should fetch the JWKs when we needed, not on startup in order to not
block the startup.
@jhrozek
jhrozek merged commit 7c28fe8 into main Aug 19, 2025
@jhrozek
jhrozek deleted the disable_validating_round_tripper branch August 19, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants