You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/08/11 07:22:00 UTC

[jira] [Commented] (CAMEL-18370) Bidning properties to route template local beans do not honor RAW()

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

Claus Ibsen commented on CAMEL-18370:
-------------------------------------

I have reproduced this with help from jbang



> Bidning properties to route template local beans do not honor RAW()
> -------------------------------------------------------------------
>
>                 Key: CAMEL-18370
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18370
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-kamelet
>    Affects Versions: 3.18.0
>            Reporter: Luca Burgazzoli
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.18.2, 3.19.0
>
>         Attachments: Screenshot 2022-08-11 at 09.21.09.png
>
>
> Assuming we have a kamelet where the route template is defined as:
> {code:yaml}
>   template:
>     beans:
>       - name: local-salesforce
>         type: "#class:org.apache.camel.component.salesforce.SalesforceComponent"
>         properties:
>           clientId: "{{clientId}}"
>           clientSecret: "{{clientSecret}}"
>           userName: "{{userName}}"
>           password: "{{password}}"
>           loginUrl: "{{loginUrl}}"
>     from:
>       uri: kamelet:source
>       steps:
>         - to:
>             uri: "{{local-salesforce}}:createSObject"
>             parameters:
>               sObjectName: "{{sObjectName}}"
>               rawPayload: "true"
>               format: "JSON"
> {code}
> Where we define the _userName_ as something like _foo+bar@acme.com_.
> With such parameter, the login would fail as the parameter would become  _foo bar@acme.com_ in the component (as the parameter is taken from the kamelet uri hence, it gets decoded).
> An attempt to fix that is to use RAW, as example _userName: "RAW{{userName}}"_ but this also would fail the login as the parameter would become _RAW(foo bar@acme.com)_ in the component.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)