I'm getting an authentication exception when I use LDAP. What's the proble

I use LDAP for admin objects store and use file for use repository. I created a user using jmqusermgr, but a client getting an authentication exception and it seems it's searching the user in LDAP. I looked around example codes, but can not find any with user authentication.

I am sorry, but I cannot provide my client code as I am using our own JMS framework which works with other JMS vendor.

Is there any way to disable authentication on a server?

Can you provide me an example code of user authentication?

[543 byte] By [christenscreen] at [2007-12-30]
# 1

I'm a bit confused - are you using JMQ 2.0 Beta *and* some other

JMS vendor simultaneously ? The JMQ 2.0 Beta admin tools as well as

the administered objects that these tools create/manage can only be

used with JMQ 2.0 Beta. So, for jmqusermgr - this means it can only

be used for managing the authentication of JMS clients running against

the JMQ 2.0 Beta JMS implementation, connecting to a JMQ 2.0 Beta broker.

I'm not certain if/how you are mixing vendors, but just wanted to make

sure you are aware of the issues.

I'm also not sure why your client is searching for the user in LDAP.

The only thing the client should look for in LDAP are the

administered objects. It is the broker that can potentilly perform

an LDAP lookup to authenticate the username/password - and that is

only after you've explicitly configured the broker to use an LDAP

and not file based user repository. Did you do this ? Perhaps you can

send us the error or exception that you are seeing ?

In JMQ 2.0 Beta, setting up file based authentication involves these steps:

1. Use jmqusermgr to setup usernames and passwords

2. Use proper usernames/passwords in JMS client application.

1. Use jmqusermgr to setup usernames and passwords

--

It sounds like you've done this already. To add a new user named "john"

with password "foo", you run:

jmqusermgr add -u john -p foo

2. Use proper usernames/passwords in JMS client application

--

To use the username and password above, you basically supply the username

and password to either of the following methods in your JMS application:

- createQueueConnection(username, passwd) method in QueueConnectionFactory

class e.g.

qcf.createQueueConnection("john", "foo")

- createTopicConnection(username, passwd) method in TopicConnectionFactory

class e.g.

tcf.createTopicConnection("john", "foo")

I've attached a complete test program that uses JNDI to lookup

administered objects and also shows how the username/password above

are used. Look for how the following variables are used:

/*

* Username/password used in createQueueConnection(...) call.

*/

String USERNAME= "guest";

String PASSWD= "guest";

To use the new username/passwd created in step (1) above, I would change

the "guest" values above to be "john" and "foo". You will need to

modify the test program a bit for it to work (e.g. JNDI attributes

for your LDAP object store).

christenscreen at 2007-7-1 > top of java,Application & Integration Servers,Sun Java System Message Queue...