Qpid
  1. Qpid
  2. QPID-3396

Specifying username/password in JMS clients should not be mandatory

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.18
    • Fix Version/s: None
    • Component/s: Java Client
    • Labels:
      None

      Description

      Description of problem:
      Section 3.2.2 of the Programming in Apache Qpid guide says that the
      username/password in the JNDI connection URL is optional:

      amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?<option>='<value>'[&<option>='<value>']]

      However skipping the [<user>:<pass>@] part in an URL leads to exception raised.

      How reproducible:
      100%

      Steps to Reproduce:
      1. Set auth=no in /etc/qpidd.conf
      2. Run connectionURLWithoutUserInfo in attached JUnit test

      Actual results:
      Exception raised:

      User information not found on url between indicies 7 and 1
      amqp://clientid/test?brokerlist='tcp://localhost:5672' ^ at
      org.apache.qpid.url.URLHelper.parseError(URLHelper.java:143) at
      org.apache.qpid.url.URLHelper.parseError(URLHelper.java:138) at
      org.apache.qpid.client.url.URLParser.parseURL(URLParser.java:111) at
      org.apache.qpid.client.url.URLParser.<init>(URLParser.java:42) at
      org.apache.qpid.client.AMQConnectionURL.<init>(AMQConnectionURL.java:63) at
      com.gs.mrg.eval.PLAIN_AuthenticationExample.connectionURLWithoutUserInfo(PLAIN_AuthenticationExample.java:109)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597) at
      org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at
      org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at
      org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at
      org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at
      org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:274) at
      org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at
      org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:242) at
      org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:58) at
      org.junit.runners.ParentRunner.runChildren(ParentRunner.java:240) at
      org.junit.runners.ParentRunner.access$000(ParentRunner.java:48) at
      org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:233) at
      org.junit.runners.ParentRunner.run(ParentRunner.java:303) at
      org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at
      org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at
      org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at
      org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at
      org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at
      org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Expected results:
      No exception raised, the broker should authenticate the connection request.

        Activity

        Pavel Moravec created issue -
        Pavel Moravec made changes -
        Field Original Value New Value
        Attachment CredentialsMandatory.java [ 12489465 ]
        Robbie Gemmell made changes -
        Fix Version/s Future [ 12315490 ]
        Fix Version/s 0.12 [ 12316848 ]
        Pavel Moravec made changes -
        Affects Version/s 0.18 [ 12322451 ]
        Affects Version/s 0.10 [ 12316273 ]
        Fix Version/s Future [ 12315490 ]
        Pavel Moravec made changes -
        Attachment 0001-connectionURL-credentials-optional.patch [ 12540657 ]
        Pavel Moravec made changes -
        Attachment 0001-connectionURL-credentials-optional.patch [ 12540657 ]
        Pavel Moravec made changes -
        Attachment 0001-connectionURL-credentials-optional.patch [ 12540669 ]
        Pavel Moravec made changes -
        Attachment 0001-connectionURL-credentials-optional.patch [ 12540669 ]
        Pavel Moravec made changes -
        Justin Ross made changes -
        Assignee Rajith Attapattu [ rajith ]

          People

          • Assignee:
            Rajith Attapattu
            Reporter:
            Pavel Moravec
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development