Skip to content

[🍒]Bump HTTP Plugins version to 1.5.2-SNAPSHOT & Auth fix#207

Open
harishhk107 wants to merge 2 commits intodata-integrations:release/1.5from
cloudsufi:cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b
Open

[🍒]Bump HTTP Plugins version to 1.5.2-SNAPSHOT & Auth fix#207
harishhk107 wants to merge 2 commits intodata-integrations:release/1.5from
cloudsufi:cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b

Conversation

@harishhk107
Copy link
Copy Markdown

@harishhk107 harishhk107 commented Apr 28, 2026

Added a fix for OAuth2 Proxy Routing

Jira : PLUGIN-1956

Description

When the HTTP plugin (source or sink) is configured with OAuth2 authentication and a proxy (proxyUrl, proxyUsername, proxyPassword), the request that fetches the OAuth2 access token ignores the proxy settings. It is sent directly to the token endpoint, which causes an UnknownHostException in restricted environments (like Cloud Data Fusion / Dataproc) where only the proxy has outbound network access.
Root Cause
In OAuthUtil.getAccessToken(BaseHttpConfig config), the code builds its own HTTP client but never applies the proxy settings from the config. Currently, it uses HttpClients.custom() (for the source path) or HttpClients.createDefault() (for the sink path), completely bypassing setProxy(...) and setDefaultCredentialsProvider(...).

The Fix

Refactored the OAUTH2 case in OAuthUtil.java to use a unified HttpClientBuilder. The builder now:
Conditionally applies the SSLConnectionSocketFactory (if it's a BaseHttpSourceConfig).
Extracts the proxy settings from the config object and applies the HttpHost and BasicCredentialsProvider (if configured) before calling .build().

Proof / Verifications

  • Pipeline execution logs showing the UnknownHostException failing to resolve the token URL in a restricted environment prior to this fix.
i1
  • Local mock proxy server logs confirming that the POST /token request is now successfully intercepted and routed through the configured proxy port.
i2 i3 i4

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 28, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@harishhk107 harishhk107 changed the title Added a fix for OAuth2 Proxy Routing [🍒][PLUGIN-1956]Added a fix for OAuth2 Proxy Routing Apr 28, 2026
@harishhk107 harishhk107 force-pushed the cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b branch from 89bc628 to 5e8acdf Compare April 28, 2026 11:24
@harishhk107 harishhk107 force-pushed the cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b branch from 5e8acdf to 2381f07 Compare April 28, 2026 11:28
@harishhk107 harishhk107 force-pushed the cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b branch from 2c09383 to 2549fdb Compare April 28, 2026 11:50
@harishhk107 harishhk107 force-pushed the cherry-pick/af8423dcf63f343ba9a1a9d70b050a32c65a396b branch from 2549fdb to 4786c7a Compare April 28, 2026 11:57
@harishhk107 harishhk107 changed the title [🍒][PLUGIN-1956]Added a fix for OAuth2 Proxy Routing [🍒]Bump HTTP Plugins version to 1.5.2-SNAPSHOT & Auth fix Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants