Skip to content

Conversation

buenzlidominik
Copy link
Contributor

Description

We currently have the issue that we cannot query an API from within our Kubernetes cluster due to some security concerns. This PR adds an optional parameter "proxy" that facilitates the usage of a proxy in the HttpClient for the lookup source.

Resolves 150

PR Checklist

@grzegorz8 grzegorz8 linked an issue May 22, 2025 that may be closed by this pull request
@grzegorz8 grzegorz8 changed the title Add Proxy to HttpClient for Lookup Source HTTP-150 Add Proxy to HttpClient for Lookup Source May 22, 2025
this.authenticator = Optional.of(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(proxyUsername.get(), proxyPassword.get().toCharArray());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can return custom PasswordAuthentication only if the proxy is the requestor:

if (getRequestorType().equals(RequestorType.PROXY) && getRequestingHost().equalsIgnoreCase(host)) {
    return new PasswordAuthentication(proxyUsername.get(),
        proxyPassword.get().toCharArray());
} else {
    return null;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the input, done!

@grzegorz8 grzegorz8 merged commit 674fb17 into getindata:main May 23, 2025
3 checks passed
davidradl pushed a commit to davidradl/flink-http-connector that referenced this pull request Sep 11, 2025
davidradl pushed a commit to davidradl/flink-http-connector that referenced this pull request Sep 11, 2025
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.

Add option to use a proxy in HttpClient for lookup source
2 participants