Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900375 (JBPAPP6-747)

Summary: Jms client can't authenticate to messaging subsystem
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Miroslav Novak <mnovak>
Component: HornetQ, SecurityAssignee: Jason Greene <jason.greene>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.0CC: mnovak, wbendrot
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-747
Whiteboard: eap6_need_triage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-19 11:00:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reproducer.zip none

Description Miroslav Novak 2012-05-07 15:12:26 UTC
Affects: Release Notes
project_key: JBPAPP6

Jms client can't authenticate to messaging subsystem. I've prepared reproducer for EAP 6 ER6 but this issue is also in AS7 master.

Exception:
{code}
Exception in thread "main" javax.jms.JMSSecurityException: Unable to validate user: admin
	at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:312)
	at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:781)
	at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:280)
	at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:601)
	at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:684)
	at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119)
	at testjndi.SecurityClient.getConnection(SecurityClient.java:308)
	at testjndi.SecurityClient.initializeClient(SecurityClient.java:83)
	at testjndi.SecurityClient.main(SecurityClient.java:363)
Caused by: HornetQException[errorCode=105 message=Unable to validate user: admin]
	... 9 more

{code}

Steps to reproduce:
1. Download and unzip EAP 6 ER6 - http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-6.0.0-ER6/jboss-eap-6.0.0.ER6.zip
2. Using add-user.sh create user to application realm - for example with username: admin, password:adminadmin, role:guest
3. Unzip attached reproducer.zip and copy standalone-full-ha.xml to $JBOSS_HOME/stanalone/configuration
4. Start server 
5. Start jms client in reproducer - sh start-client.sh 127.0.0.1 jms/queue/testQueue0 admin adminadmin (parameters are hostname queueJndiName username password)

Comment 1 Miroslav Novak 2012-05-07 15:14:07 UTC
Attachment: Added: reproducer.zip


Comment 2 Miroslav Novak 2012-05-07 15:15:03 UTC
Link: Added: This issue Cloned to JBPAPP-8936


Comment 3 Rajesh Rajasekaran 2012-05-07 16:45:08 UTC
Labels: Added: eap6_need_triage


Comment 4 Miroslav Novak 2012-05-24 10:28:46 UTC
Cool. Security is working as expected. Closing.

Verified in EAP 6 ER8.

Comment 5 Misty Stanley-Jones 2012-06-01 04:43:22 UTC
Reopening to set release note fields.

Comment 6 Misty Stanley-Jones 2012-06-01 04:43:49 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Added: Release Notes


Comment 7 Misty Stanley-Jones 2012-06-01 06:53:54 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: JMS clients could not authenticate to the messaging subsystem. A <code>JMSSecurityException</code> was thrown if the <code>ApplicationRealm</code> security realm was removed from the remoting subsystem. This was due to a race condition in the security realm mechanism, and the issue has been resolved by fixing that race condition.


Comment 8 Anne-Louise Tangring 2012-11-05 17:51:04 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue 
Release Notes Text: Removed: JMS clients could not authenticate to the messaging subsystem. A <code>JMSSecurityException</code> was thrown if the <code>ApplicationRealm</code> security realm was removed from the remoting subsystem. This was due to a race condition in the security realm mechanism, and the issue has been resolved by fixing that race condition. 
Docs QE Status: Removed: NEW 


Comment 9 Miroslav Novak 2012-11-19 11:00:05 UTC
Closing. Nothing for QA here.