[Qpid JMS Client] Password with '+' character

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Qpid JMS Client] Password with '+' character

Vavricka
Hi,

  I am facing an issue when connecting to Qpid C++ broker with Qpid JMS
client (AMQP 1.0) when jms.password property in connection string contains
'+' character.

  Qpid JMS Client - 0.24.0
  Qpid C++ broker - 0.34

 Connection strings I tried:

  amqp://host:port?jms.username=admin&jms.password=passwith+char

  amqp://host:port?jms.username=admin&jms.password='passwith+char'

  amqp://host:port?jms.username=admin&jms.password="passwith+char"

  amqp://host:port?jms.username=admin&jms.password=passwith%2Bchar

  amqp://host:port?jms.username=admin&jms.password='passwith%2Bchar'

  Client always failed to connect. Is it possible to have '+' character in
jms.password property?

  Vavricka



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Qpid JMS Client] Password with '+' character

Robbie Gemmell
Administrator
We actually have a client test checking that + works, as there was a
bug in older client versions where the option values got
double-decoded, which could specifically mess with encoded + signs as
they double-decoded into a space character instead. The password would
need URI encoded with the + becoming %2B as in your 4th example.

The test is shown at:
https://github.com/apache/qpid-jms/blob/0.24.0/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SaslIntegrationTest.java#L129
I've just run it under a protocol tracer to additionally verify the
expected credential content actually went over the wire between the
client and its test peer, which it did.

The test uses PLAIN for SASL, so one potential difference from your
environment could be if another SASL mechanism was being used instead
and there was some issue with it. Alternatively, there could be an
issue with the broker side, or it could be both of those. If you make
an attempt and capture it under wireshark perhaps you can see whats
happening.

Robbie

On 13 September 2017 at 07:44, Vavricka <[hidden email]> wrote:

> Hi,
>
>   I am facing an issue when connecting to Qpid C++ broker with Qpid JMS
> client (AMQP 1.0) when jms.password property in connection string contains
> '+' character.
>
>   Qpid JMS Client - 0.24.0
>   Qpid C++ broker - 0.34
>
>  Connection strings I tried:
>
>   amqp://host:port?jms.username=admin&jms.password=passwith+char
>
>   amqp://host:port?jms.username=admin&jms.password='passwith+char'
>
>   amqp://host:port?jms.username=admin&jms.password="passwith+char"
>
>   amqp://host:port?jms.username=admin&jms.password=passwith%2Bchar
>
>   amqp://host:port?jms.username=admin&jms.password='passwith%2Bchar'
>
>   Client always failed to connect. Is it possible to have '+' character in
> jms.password property?
>
>   Vavricka
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Qpid JMS Client] Password with '+' character

Vavricka
Hi,

  when I used URLEncoder.encode(pass, "UTF-8") as used in mentioned test,
client successfully connected.

  Thanks for reply.

  Tomas



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]