getindata / flink-http-connector

Http Connector for Apache Flink. Provides sources and sinks for Datastream , Table and SQL APIs.
Apache License 2.0
136 stars 39 forks source link

Configuration option to enforce the use of the raw value of the Authorization header. #76

Closed AdrianVasiliu closed 3 months ago

AdrianVasiliu commented 3 months ago

As documented, the connector currently processes the value set for the Authorization header as follows: it encodes it to Base64 and it prefixes it with "Basic ". The only case when this is not done is if the value is already prefixed with "Basic ". This is convenient for Basic Authentication, as it allows writing

'gid.connector.http.source.lookup.header.Authorization' = 'username:password'

without taking care of b64 and prefixing.

However, there is currently no way to enforce the use of the raw value of the Authorization header. This is necessary for use-cases where the called API needs the header to be set for other purposes than Basic Authentication, such as API key authentication.

kristoffSC commented 3 months ago

Hi @AdrianVasiliu I have merged your PR, There is one more PR that I would like to take a look before releasing the new version.

There is also a PR where we will drop 1.15 Flink support but this will have its own version.

AdrianVasiliu commented 3 months ago

Thanks a lot @kristoffSC . The other PR is from my colleague, we need both, so releasing both together would be just fine :-)

kristoffSC commented 3 months ago

Released in 0.12.0. Version is already pushed to maven central. It usually takes some time until it will be visible on connector's maven page but it should be available to download from maven already

AdrianVasiliu commented 3 months ago

@kristoffSC Thanks! It's available now.