I want to encrypt rest api path parameter in apache camel(springboot) spring dsl . I have tried different methods using crypto dataformat on camel but it was not working.
I have added camel crypto 2.14.0
I am new in this technology.i know the below code is wrong. I tried Below code
<route streamCache="true" trace="true" errorHandlerRef="globalErrorHandler">
<from uri="direct:getCustomerPortfolio" />
<to uri="direct-vm:routeProcessor" />
<setHeader headerName="CamelHttpMethod"><constant></constant><constant>GET</constant></setHeader>
<log message="ID: ${header.id}"/>
<marshal>
<crypto shouldAppendHMAC="true" initVectorRef="init" inline="true" algorithm="DES/CBC/PKCS5Padding" keyRef="cryptoKey" />
</marshal>
<to uri="{{base.url}}{{customerPortfolio.url}}${header.id}?view=${header.view}" />
<log message="body: ${body}"/>
<unmarshal>
<crypto shouldAppendHMAC="true" initVectorRef="init" inline="true" algorithm="DES/CBC/PKCS5Padding" keyRef="cryptoKey" />
</unmarshal>
<toD uri="{{base.url}}{{customerPortfolio.url}}${header.id}.encrypted?view=${header.view}" />
</route>
My main agenda is I need to encrypt ${header.id} only Id value which is coming in rest api
please help me to resolve this issue. Give me some idea also
Advance thanks for your help