[ 
https://issues.apache.org/jira/browse/CAMEL-27035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146135#comment-18146135
 ] 

Claus Ibsen commented on CAMEL-27035:
-------------------------------------

Merged to main in https://github.com/apache/camel/pull/30258 (fix version 
4.24.0).

> camel-alibaba-kms: a Map or POJO in the plaintext header is encrypted as its 
> toString(), and an invalid numberOfBytes header fails every operation
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27035
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27035
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 4.23.0
>            Reporter: Saravanakumar Selvaraj
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Follow-up to the review of https://github.com/apache/camel/pull/30139.
> 1. A Map or a POJO in the CamelAlibabaKmsPlaintext header or exchange 
> property is encrypted as its toString(), because 
> OpenApiClientSupport.resolveString reads the value as a String. The same 
> value as the message body fails with an InvalidPayloadException since 
> CAMEL-26258, and the 4.24 upgrade guide says that a toString() is no longer 
> encrypted.
> 2. An empty or non-numeric String in the CamelAlibabaKmsNumberOfBytes header 
> or exchange property fails every exchange with a TypeConversionException, 
> also for encrypt and decrypt, which do not use the value. 
> OpenApiClientSupport.resolveInteger lets only null through, and 
> KMSUtils.createClientConfigurations resolves all six names for each exchange.
> 3. region has @Metadata(required = true), but the code needs region or 
> endpoint, and neither when kmsClient is set or autowired.
> 4. KMSHeaders has no constant for CamelAlibabaKmsOperation, which the 
> producer reads like the other input headers. Only KMSProperties declares it, 
> so the header is missing from the header list of the component JSON, the 
> endpoint DSL and the doc page. https://github.com/apache/camel/pull/30048 
> closed the same gap for camel-alibaba-mns.
> 5. KMSProperties has @Metadata with texts of its own on its seven header 
> names, but the build reads only the headers class KMSHeaders. So these texts 
> are not used.
> _Claude Code on behalf of saravanakumar1987_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to