Skip to content

config: check cross-host redirect before OAuth2 token fetch#921

Merged
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/oauth2-cross-host-check
Jun 11, 2026
Merged

config: check cross-host redirect before OAuth2 token fetch#921
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/oauth2-cross-host-check

Conversation

@roidelapluie

Copy link
Copy Markdown
Member

Move isCrossHostRedirect early in oauth2RoundTripper.RoundTrip so that cross-host redirects bypass token-source initialisation entirely and go straight to Base.RoundTrip. Base is read under the RLock to avoid a data race with concurrent reconfigurations.

Move isCrossHostRedirect early in oauth2RoundTripper.RoundTrip so that
cross-host redirects bypass token-source initialisation entirely and go
straight to Base.RoundTrip. Base is read under the RLock to avoid a
data race with concurrent reconfigurations.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
@roidelapluie roidelapluie requested a review from bwplotka June 11, 2026 12:29
@roidelapluie roidelapluie merged commit 56fe395 into prometheus:main Jun 11, 2026
8 checks passed
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