|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ Security, Authority |
« View previous topic :: View next topic » |
Author |
Message
|
mq4you |
Posted: Thu Jan 18, 2007 6:22 am Post subject: MQ Security, Authority |
|
|
Novice
Joined: 27 Nov 2006 Posts: 11
|
hello!
i'm trying to understand how setmqaut works. for that i did the following things:
i have a little java app, which puts a sample msg into a queue. within the app i can specify the field user-id of the mqmd header.
on my windows machine i generated a new user called 'test' (this user is only part of the group Users.)
the command dspmqaut tells me that that user has no rights at all concerning the queue 'sample'.
now, i use my little java app, where i specify user-id=test and queue='sample'.
i thought that i would receive an reason code back like 'not authorized'. but i'm able to put the message into that queue?
it's a basic question, what did i misunderstood? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 18, 2007 6:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Java does not pass a valid user id, by default, when you create a client connection.
This is because Java does not normally have access to things like OS user ids. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mq4you |
Posted: Thu Jan 18, 2007 6:51 am Post subject: |
|
|
Novice
Joined: 27 Nov 2006 Posts: 11
|
no, i mean that my java-app uses the mq-api to set all the context and overwrite the field user-id with the name 'test'.
is that not the parameter to check security? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 18, 2007 7:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
WebSphere MQ API for Java, or WebSphere MQ JMS API? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mq4you |
Posted: Fri Jan 19, 2007 4:57 am Post subject: |
|
|
Novice
Joined: 27 Nov 2006 Posts: 11
|
the java-api. below some sample code.
...
...
MQMessage sampleMessage = new MQMessage();
sampleMessage.format = MQC.MQFMT_STRING;
sampleMessage.messageType = MQC.MQMT_DATAGRAM;
// message context
sampleMessage.userId = "test";
sampleMessage.putApplicationName = "myAppName";
sampleMessage.applicationIdData = "myAppIdData";
sampleMessage.putApplicationType = 0;
sampleMessage.putDateTime = new GregorianCalendar();
String messageId = "myMsgId";
sampleMessage.messageId = messageId.getBytes();
String correlationId = "myCorrelId";
sampleMessage.correlationId = correlationId.getBytes();
sampleMessage.writeUTF("myData");
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_SET_ALL_CONTEXT; |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jan 19, 2007 5:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|