[
https://issues.apache.org/jira/browse/CAMEL-14512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-14512:
--------------------------------
Issue Type: New Feature (was: Wish)
> camel-grpc - Allow reference to custom ClientInterceptor or Producer to
> customize authentication
> ------------------------------------------------------------------------------------------------
>
> Key: CAMEL-14512
> URL: https://issues.apache.org/jira/browse/CAMEL-14512
> Project: Camel
> Issue Type: New Feature
> Components: camel-grpc
> Environment: * Java 11
> * SpringBoot 2.1.5.RELEASE
> * CamelĀ 3.0.0-M2
> * Camel-Grpc-StarterĀ 3.0.0-M2
> Reporter: Philipp
> Assignee: Dmitry Volodin
> Priority: Minor
> Fix For: 3.3.0
>
>
> The [GRPC
> component|https://github.com/apache/camel/blob/master/components/camel-grpc/src/main/docs/grpc-component.adoc]
> does currently not offer the possibility to intercept the connection
> establishment against the gRPC server out of the box.
> This prevents to add custom authentication to the channel/connection setup.
> And since the gRPC component does not offer this custom implementation out of
> the box, the currently only solution is:
> * Implement a custom {{GrpcComponent}}
> * Implement a custom {{GrpcEndpoint}}
> * Implement a custom {{GrpcProducer}} or {{DefaultAsyncProducer}}
> ** Override the {{doStart()}} method
> ** Instantiate the {{Channel}}
> ** Add a custom {{ClientInterceptor}} and override the {{interceptCall()}}
> method
> ** Add headers to the metadata of the prepared call
> Even though there are the properties {{authenticationType=JWT}},
> {{jwtSecret}}, {{jwtIssuer}} and so on, these arguments only allow constant
> strings. Therefore, no retrieval of OAuth tokens (for example) during the
> runtime is possible, but everything would have to be hard-coded.
> The [AHC-WS
> component|https://github.com/apache/camel/blob/master/components/camel-ahc-ws/src/main/docs/ahc-ws-component.adoc]
> in contrast, offers this possibility by implementing a custom
> {{AsyncHttpClient}} and pointing to it via the
> {{camel.component.ahc-ws.client}} property in the {{application.yml}}. Like
> this, the connection setup of the websocket can easily be intercepted by
> overriding {{DefaultAsyncHttpClient.prepareGet()}} where OAuth tokens (for
> example) can be passed and added to the handshake.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)