[ 
https://issues.apache.org/jira/browse/QPID-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Moravec updated QPID-3373:
--------------------------------

    Comment: was deleted

(was: patch proposal)

> Java client: connectionFactory.createConnection method should not rewrite 
> stored credentials
> --------------------------------------------------------------------------------------------
>
>                 Key: QPID-3373
>                 URL: https://issues.apache.org/jira/browse/QPID-3373
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.10
>            Reporter: Pavel Moravec
>            Priority: Minor
>         Attachments: authNoCredentialsInSecondConnection.java.gz
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Method connectionFactory.createConnection("foo", "bar") causes than Java 
> client caches the credentials and overwrites default ones provided in 
> connection URL. Thus subsequent calling of 
> connectionFactory.createConnection() method (without a parameter) results in 
> using the credentials "foo" / "bar" despite default ones should be used.
> How reproducible:
> 100%
> Steps to Reproduce:
> 1. Setup a broker with PLAIN authentication
> 2. Compile attached JUnit test 
> 3. Run it (java org.junit.runner.JUnitCore 
> authNoCredentialsInSecondConnection)
> Actual results:
> In try .. catch block, connectionFactory2.createConnection(); does not raise 
> an exception that authentication failed. (and thus fail command below raises 
> java.lang.AssertionError exception). In fact, 
> connectionFactory2.createConnection(); uses "guest" / "guest" credentials set 
> for connectionFactory1.
> Expected results:
> Authentication fails for connectionFactory2.createConnection(); as it uses 
> default credentials from URL (what is "dummy" / "dummy").

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to