|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
User id greater than 12 Characters in MQ |
« View previous topic :: View next topic » |
Author |
Message
|
lani |
Posted: Wed Sep 05, 2018 7:51 pm Post subject: User id greater than 12 Characters in MQ |
|
|
Newbie
Joined: 17 Jul 2018 Posts: 5
|
Hi
I have a java application running on Linux platform under a particular user id which is greater than 12 characters so not able to authorize in MQ (I think).Getting the error as below.User group is mentioned in command
setmqaut -m ab4ggd1.MQ -t qmgr -g aabsomexsvcgrp +alladm
AMQ7026: A principal or group name was invalid.
I was told the error is happening because userid/group is more than 12 characters, there is no workaround other than reducing the length of userid/groupname to below 12 characters
Is there a workaround?
L |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 05, 2018 11:59 pm Post subject: Re: User id greater than 12 Characters in MQ |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
lani wrote: |
Hi
I have a java application running on Linux platform under a particular user id which is greater than 12 characters so not able to authorize in MQ (I think).Getting the error as below.User group is mentioned in command
setmqaut -m ab4ggd1.MQ -t qmgr -g aabsomexsvcgrp +alladm
AMQ7026: A principal or group name was invalid.
I was told the error is happening because userid/group is more than 12 characters, there is no workaround other than reducing the length of userid/groupname to below 12 characters
Is there a workaround?
L |
Depending on your version the 12 char limit for the user might no longer apply. But it still does for the group length...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
lani |
Posted: Thu Sep 06, 2018 3:00 pm Post subject: Re: User id greater than 12 Characters in MQ |
|
|
Newbie
Joined: 17 Jul 2018 Posts: 5
|
fjb_saper wrote: |
lani wrote: |
Hi
I have a java application running on Linux platform under a particular user id which is greater than 12 characters so not able to authorize in MQ (I think).Getting the error as below.User group is mentioned in command
setmqaut -m ab4ggd1.MQ -t qmgr -g aabsomexsvcgrp +alladm
AMQ7026: A principal or group name was invalid.
I was told the error is happening because userid/group is more than 12 characters, there is no workaround other than reducing the length of userid/groupname to below 12 characters
Is there a workaround?
L |
Depending on your version the 12 char limit for the user might no longer apply. But it still does for the group length...  |
MQ version is 8.x
Can I use a different user id to write message on the queue while issuing MQPUT1 call? So if the application is running under a user called USERRRRRRRRRR1 when I write message to queue can I specify somehow to use another user called USER2 and make Queue manager authorize USER2?
I'm trying to find out the article on web but not sure whether I'm looking at correct one , https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.dev.doc/q098140_.html ? Does anyone have any example code snippet to provide? |
|
Back to top |
|
 |
hughson |
Posted: Thu Sep 06, 2018 8:45 pm Post subject: Re: User id greater than 12 Characters in MQ |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
lani wrote: |
Can I use a different user id to write message on the queue while issuing MQPUT1 call? So if the application is running under a user called USERRRRRRRRRR1 when I write message to queue can I specify somehow to use another user called USER2 and make Queue manager authorize USER2? |
You can use Alternate User ID (MQOO_ALTERNATE_USER_ID) in order to do this, BUT, you have to be granted authority to claim to be someone else, so your long user ID would still be needed to check whether you're allowed to do the MQPUT under a different user.
Instead, you need to run the program under a different user ID. Now you can achieve that at the O/S or by the use of ADOPTCTX(YES) and supplying a user ID and password on your MQCONNX call.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
lani |
Posted: Mon Sep 10, 2018 7:51 pm Post subject: Re: User id greater than 12 Characters in MQ |
|
|
Newbie
Joined: 17 Jul 2018 Posts: 5
|
hughson wrote: |
lani wrote: |
Can I use a different user id to write message on the queue while issuing MQPUT1 call? So if the application is running under a user called USERRRRRRRRRR1 when I write message to queue can I specify somehow to use another user called USER2 and make Queue manager authorize USER2? |
You can use Alternate User ID (MQOO_ALTERNATE_USER_ID) in order to do this, BUT, you have to be granted authority to claim to be someone else, so your long user ID would still be needed to check whether you're allowed to do the MQPUT under a different user.
Instead, you need to run the program under a different user ID. Now you can achieve that at the O/S or by the use of ADOPTCTX(YES) and supplying a user ID and password on your MQCONNX call.
Cheers,
Morag |
Thanks Morag
I passed on this information to the team and I got reply from our MQ administrator asking - "This is for Channel authorization and How do I provide permissions for the queues ?"
My understanding(from what I read after your post) of using ADOPTCTX(YES) is that ,userid provided by client will be used for channel authorization and object authorization as well(i.e put messages etc),is that not the case? is there anything else needs to be done for writing message to queue ? |
|
Back to top |
|
 |
hughson |
Posted: Mon Sep 10, 2018 8:47 pm Post subject: Re: User id greater than 12 Characters in MQ |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
lani wrote: |
I passed on this information to the team and I got reply from our MQ administrator asking - "This is for Channel authorization and How do I provide permissions for the queues ?"
My understanding(from what I read after your post) of using ADOPTCTX(YES) is that ,userid provided by client will be used for channel authorization and object authorization as well(i.e put messages etc),is that not the case? is there anything else needs to be done for writing message to queue ? |
There are various ways to change the user ID under which an application is considered, by the queue manager, to be running. From the wording of your initial question I assumed (wrongly) that you were a locally bound application.
Here are (some of) the ways:-
- Locally bound applications
- Run the application under a different user ID using O/S facilities
- Pass a user ID and password and use ADOPTCTX(YES)
- Client connected applications
- Set the MCAUSER using CHLAUTH rules
- Set the MCAUSER using a Security Exit
- Set the MCAUSER with a static definition (say if your authentication is already covered with SSL certificates)
- Pass a user ID and password and use ADOPTCTX(YES)
In order to set permissions for the user ID you end up running as (from one of the above mechanisms) you need to use a similar command to that which you provided in your initial question.
lani wrote: |
Getting the error as below.User group is mentioned in command
setmqaut -m ab4ggd1.MQ -t qmgr -g aabsomexsvcgrp +alladm
AMQ7026: A principal or group name was invalid. |
For example
Code: |
setmqaut -m ab4ggd1.MQ -t queue -n MY.Q.NAME -g shortusr +put +get |
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
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
|
|
|
|