|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
add useridentifier into amqsget.c |
« View previous topic :: View next topic » |
Author |
Message
|
steven2008 |
Posted: Sun Apr 04, 2010 5:43 pm Post subject: add useridentifier into amqsget.c |
|
|
Newbie
Joined: 04 Apr 2010 Posts: 2
|
Hi Guys,
I am a newbie here, don't have a lot of experience writing code to operate on WebSphere MQ. Does anyone know how to put Userid into the amqsget.c source code to access a certain queue? authorization has been added to queue so that only users belong to a certain group other than mqm can get the messages.
Thanks a lot. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Apr 04, 2010 7:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you're using amqsget then the user id is that used to run the application is passed for security checking. Hence you should either run the application as an authorised user, or have the user that runs the application authorised.
You can set a user id on opening the queue by using the alternate fields, but that requires the user to be authorised to use those fields! In most circumstances it's better practice to change the authorisations to allow the application to use the queue rather than change the authorisations to allow the application to pick ids in any way it feels (it makes most security auditors nervous).
If you're in fact using amqsgetc then have the additional option of using the MCAUser to pass an alternate user id. This is a common way of forcing applications potentially using many different users to use one single restricted user.
Note also that many Unix platforms authorise groups not users. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
steven2008 |
Posted: Tue Apr 06, 2010 7:22 am Post subject: Thanks Vitor |
|
|
Newbie
Joined: 04 Apr 2010 Posts: 2
|
Looks like I mixed amqsget and amqsgetc. Where do I find C source code of amqsgetc?
Appreciate your help. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 06, 2010 7:33 am Post subject: Re: Thanks Vitor |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
steven2008 wrote: |
Looks like I mixed amqsget and amqsgetc. Where do I find C source code of amqsgetc? |
You've already got it. It's the same source code; amqsget is the code linked for a binding connection, amqsgetc is the code linked with the client libraries. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|