ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Security » ignoring java.naming.security.principal

Post new topic  Reply to topic
 ignoring java.naming.security.principal « View previous topic :: View next topic » 
Author Message
pelife
PostPosted: Tue Jul 24, 2012 10:18 am    Post subject: ignoring java.naming.security.principal Reply with quote

Novice

Joined: 15 Mar 2012
Posts: 10
Location: Rio de Janeiro - BR

I have an application running that must connect to Websphere MQ to wirte messages to and read from it. Following the manual of this application, the right way to configure is as follows:

Code:

<jndi:jndi-lookup id="jmsConnectionfactory"  jndi-name="${dsi.messaging.jndi.name}">
                <jndi:environment>
                        java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory
                        java.naming.provider.url=NRIO239DWMB.develop.net:1414/DEVBTGQMChannel
                        java.naming.security.authentication=none
                        java.naming.security.principal=assetcontrol
                        java.naming.security.credentials=
                </jndi:environment>
        </jndi:jndi-lookup>


I tryed many combinations of java.naming.security.authentication, java.naming.security.principal and java.naming.security.credentials and I keep having the same problem:

Caused by: com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2035'.

The guy who is monitoring the server says that my application is trying to connect with the user I am running it and not with the one I configured. Have someone had the same problem already ?

It seems like it is just ignoring whatever I put in those field and using the user name I am logged with.[/code]
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jul 24, 2012 11:59 am    Post subject: Re: ignoring java.naming.security.principal Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9405
Location: US: west coast, almost. Otherwise, enroute.

pelife wrote:
... Following the manual of this application, ...

What manual? Post the URL here.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 24, 2012 12:03 pm    Post subject: Re: ignoring java.naming.security.principal Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

pelife wrote:
java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory

This means that it is connecting to WMQ to use WMQ as a JNDI provider, in addition to using it to connect and act as a JMS server.

So you may need to configure the initial context user id as well as the qcf user id.
Back to top
View user's profile Send private message
pelife
PostPosted: Tue Jul 24, 2012 12:23 pm    Post subject: Reply with quote

Novice

Joined: 15 Mar 2012
Posts: 10
Location: Rio de Janeiro - BR

The manual does not say much more than what I just did. It gives an example of how they would make it with Weblogic:

Code:

< jndi:jndi-lookup id =" jmsConnectionfactory "  jndi-name =" ${dsi.messaging.jndi.name}">
 < jndi:environment >
  java.naming.fa ctory.initial = WebLogic.jndi.WLInitialContextFactory
  java.naming.provider.url = t3://172.24.43.136:7001
  java.naming.security.principal= WebLogic
  java.naming.security.credentials = <!-- password-->
 </ jndi:environment >   
</ jndi:jndi-lookup >


What is the qcf user id? sorry if it is a dumb question
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 24, 2012 12:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pelife wrote:
The manual does not say much more than what I just did. It gives an example of how they would make it with Weblogic:


This isn't Weblogic.

pelife wrote:
What is the qcf user id? sorry if it is a dumb question


It's the user id associated with the queue connection factory.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pelife
PostPosted: Wed Jul 25, 2012 3:36 am    Post subject: Reply with quote

Novice

Joined: 15 Mar 2012
Posts: 10
Location: Rio de Janeiro - BR

I know that this isn't weblogic, I was just showing what the manual of the software I am trying to configure says.

Code:

<jndi:jndi-lookup id="jmsConnectionfactory"  jndi-name="${dsi.messaging.jndi.name}">
                <jndi:environment>
                        java.naming.factory.initial=com.ibm.mq.jms.context.WMQInitialContextFactory
                        java.naming.provider.url=NRIO239DWMB.develop.net:1414/DEVBTGQMChannel
                        java.naming.security.authentication=none
                        java.naming.security.principal=assetcontrol
                        java.naming.security.credentials=
                </jndi:environment>
        </jndi:jndi-lookup>


Vitor, if the way of doing this is not setting the property java.naming.security.principal, I don't know where else I can configure this.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 25, 2012 4:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pelife wrote:
Vitor, if the way of doing this is not setting the property java.naming.security.principal, I don't know where else I can configure this.


I know a couple of WMQ places you can configure this.

I'll leave more Java qualified people (i.e. everybody) to speak to the wisdom of this method & what's the way to achieve it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jul 25, 2012 4:39 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9405
Location: US: west coast, almost. Otherwise, enroute.

pelife wrote:
The manual does not say much more than what I just did.

What manual?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Security » ignoring java.naming.security.principal
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.