Jason Whaley created CAMEL-5453:
-----------------------------------

             Summary: An AWS key with "+" gets stripped out by 
DefaultCamelContext.normalizeEndointUri  and URISupport.parseQuery for at least 
the SQS Component
                 Key: CAMEL-5453
                 URL: https://issues.apache.org/jira/browse/CAMEL-5453
             Project: Camel
          Issue Type: Bug
          Components: camel-aws, camel-core
    Affects Versions: 2.10.0
            Reporter: Jason Whaley


When defining a camel route that includes an endpoint for the SQS component 
that includes the accessKey and secretKey as parameters, such as the following:

{code}
aws-sqs://queue-name?accessKey=ABCDEFGHIJKLMNOP&secretKey=ABCDEFGHI+JK
{code}

if the secretKey contains a + then that + is stripped out in 
URISupport.parseQuery and the parameters received by 
SqsComponent.createEndpoint has a space where the + used to be in the 
secretKey, thus making calls to SQS by the SqsComponent fail.  

Even if the endpoint URI string is URL encoded such that 
secretKey=ABCDEFGHI%2BJK, then DefaultCamelContext.normalizeEndointUri will 
decode the %2B to a "+" earlier in the call stack before URISupport.parseQuery 
is called (which then removes it).

A "+" is a valid and common character in generated AWS secret keys and thus 
needs to be left alone when it is placed in the parameter Map<String,Object> 
received in SqsComponent.createEndpoint, or replaced with custom parsing in 
SqsComponent.createEndpoint.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to