[
https://issues.apache.org/jira/browse/FLINK-31856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731895#comment-17731895
]
Michael Hempel-Jørgensen commented on FLINK-31856:
--------------------------------------------------
[~reta] we have tested the PR and it solves our use case so that is great (y)
The main improvement we could suggest is that we had to copy the whole call to
builder.setHttpClientConfigCallback(), i.e. lines 45-75 in
DefaultRestClientFactory in order to add a call to
httpClientBuilder.addInterceptorFirst();
I'm not sure if anything can be done to alleviate that so we can somehow
inherit the default behaviour, but in general the PR is still a great
improvement.
> Add support for Opensearch Connector REST client customization
> --------------------------------------------------------------
>
> Key: FLINK-31856
> URL: https://issues.apache.org/jira/browse/FLINK-31856
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Opensearch
> Affects Versions: opensearch-1.0.0
> Reporter: Michael Hempel-Jørgensen
> Assignee: Andriy Redko
> Priority: Minor
> Labels: pull-request-available
>
> It is not currently possible to customise the Opensearch REST client in all
> of the connectors.
> We are currently using the using the OpensearchSink in
> [connector/opensearch/sink/OpensearchSink.java|https://github.com/apache/flink-connector-opensearch/blob/main/flink-connector-opensearch/src/main/java/org/apache/flink/connector/opensearch/sink/OpensearchSink.java]
> and need to be able to authenticate/authorise with Opensearch using OAuth2
> and therefore need to be able to pass a bearer token to the bulk index calls.
> The access token will expire and change during the jobs lifetime it must be
> possible to handle this, i.e. giving a token at when building the sink is not
> enough.
> For reference see the mailing list discussion:
> https://lists.apache.org/thread/9rvwhzjwzm6yq9mg481sdxqx9nqr1x5g
--
This message was sent by Atlassian Jira
(v8.20.10#820010)