[
https://issues.apache.org/jira/browse/CAMEL-24194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-24194 started by Andrea Cosentino.
------------------------------------------------
> camel-aws-config: removeConformancePack reads the wrong header (RULE_NAME
> instead of the conformance pack name)
> ---------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24194
> URL: https://issues.apache.org/jira/browse/CAMEL-24194
> Project: Camel
> Issue Type: Bug
> Components: camel-aws
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.14.9, 4.18.4, 4.22.0
>
>
> AWSConfigProducer.removeConformancePack guards on the
> CamelAwsConformancePackName header but reads the value from
> CamelAwsConfigRuleName (RULE_NAME):
> {code:java}
> if
> (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(AWSConfigConstants.CONFORMACE_PACK_NAME)))
> {
> String conformancePackName =
> exchange.getIn().getHeader(AWSConfigConstants.RULE_NAME, String.class);
> {code}
> So the documented CamelAwsConformancePackName header is ignored: the delete
> is built with whatever is in CamelAwsConfigRuleName (typically null -> the
> request has no conformance pack name, or the wrong value). The constants are
> distinct (RULE_NAME="CamelAwsConfigRuleName",
> CONFORMACE_PACK_NAME="CamelAwsConformancePackName"). The sibling
> putConformancePack operation reads CONFORMACE_PACK_NAME correctly.
> Fix: read the value from AWSConfigConstants.CONFORMACE_PACK_NAME. Code
> reference (main): AWSConfigProducer.java ~line 283.
> Present on camel-4.18.x and camel-4.14.x; backport to both.
> Found during an agent-assisted audit of the AWS components; verified against
> the cited code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)