Author |
Message
|
SilentWind |
Posted: Thu Jan 04, 2007 1:12 am Post subject: C# Security Exit |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
Hi,
In Java api, there is a MQSecurityExit to implement our customised security exit and build our own functions accordingly.
However in .NET api (XMS), I am unable to find the corresponding class in C# classes. I checked the pdf help that comes with the installation of XMS clients, and found that there is no api call available. Also there is no chapter in security exits for XMS.
Could someone point me in the right direction for security exits in XMS?
Thanks. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jan 04, 2007 9:26 am Post subject: Re: C# Security Exit |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
SilentWind wrote: |
However in .NET api (XMS), I am unable to find the corresponding class in C# classes. I checked the pdf help that comes with the installation of XMS clients, and found that there is no api call available. Also there is no chapter in security exits for XMS. |
You are looking in the wrong manual - XMS is a layer over top of the MQ Client code base.
You need to look up MQSecurityExit in the WMQ Using .Net manual.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
SilentWind |
Posted: Sun Jan 07, 2007 6:51 pm Post subject: Re: C# Security Exit |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
RogerLacroix wrote: |
SilentWind wrote: |
However in .NET api (XMS), I am unable to find the corresponding class in C# classes. I checked the pdf help that comes with the installation of XMS clients, and found that there is no api call available. Also there is no chapter in security exits for XMS. |
You are looking in the wrong manual - XMS is a layer over top of the MQ Client code base.
You need to look up MQSecurityExit in the WMQ Using .Net manual.
Regards,
Roger Lacroix
Capitalware Inc. |
Thanks. I found the manual you mentioned.
However I am unable to use the class MQSecurityExit. It is listed in the manual and api. I import the amqmdnet.dll as said in the prerequisities but I am missing some classes lilke MQChannelDefinition, MQChannelExit. From opening my amqmqnet.dll, I only have the main classes of MQEnvironment, MQMessage etc etc. All the classes belong to the package IBM.WMQ
Where do I get the remaining classes from? I am sure it is another dll file. But I cant find it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 08, 2007 2:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It sounds like maybe you don't have the MQ client installed. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
SilentWind |
Posted: Mon Jan 08, 2007 10:42 pm Post subject: |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
jefflowrey wrote: |
It sounds like maybe you don't have the MQ client installed. |
I have the IBM Message Service Client for .NET installed. I do not know of any other MQ Client that I require to run a .NET application to connect to the MQ server. This was not stated in the requisities either.
What other MQ Client do I require? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 08, 2007 11:52 pm Post subject: Re: C# Security Exit |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
SilentWind wrote: |
What other MQ Client do I require? |
RogerLacroix wrote: |
XMS is a layer over top of the MQ Client code base.
|
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SilentWind |
Posted: Tue Jan 09, 2007 1:09 am Post subject: Re: C# Security Exit |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
Vitor wrote: |
SilentWind wrote: |
What other MQ Client do I require? |
RogerLacroix wrote: |
XMS is a layer over top of the MQ Client code base.
|
:roll: |
Sorry I am not making myself clear here. :oops:
I have both XMS client and base MQ client installed.
In other words, in .NET packages, I have both IBM.WMQ and IBM.XMS packages. And I am missing some classes in IBM.WMQ.
Where can I find them? |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jan 09, 2007 9:39 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
In early releases of .NET support in WMQ, it did not have all of WMQ classes.
What WMQ release and CSD level of WMQ are you using? If you are not at the latest release then you need to apply the latest CSD.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
SilentWind |
Posted: Wed Jan 10, 2007 6:35 pm Post subject: |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
RogerLacroix wrote: |
Hi,
In early releases of .NET support in WMQ, it did not have all of WMQ classes.
What WMQ release and CSD level of WMQ are you using? If you are not at the latest release then you need to apply the latest CSD.
Regards,
Roger Lacroix
Capitalware Inc. |
WMQ release is 6.0.1
XMS release is cat 3 Support Pac v1.2.2.0.
What is CSD? Is my current release sufficient? |
|
Back to top |
|
 |
SilentWind |
Posted: Thu Jan 11, 2007 10:51 pm Post subject: |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
I have installed the refresh pack 6.0.2 and solved my missing library files.
Now I create the security exit with full namespace specs as NameSpaceA.PackageA.MySecurityExit.
I try to do the following as suggested by the
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzav.doc/csq8709.htm manual
IConnectionFactory factory = .....
factory.SetStringProperty(XMSC.WMQ_SECURITY_EXIT, "NameSpaceA.PackageA.MySecurityExit");
It fails to initialise. I tried to set it in the MQEnvironment.SecurityExit = "NameSpaceA.PackageA.MySecurityExit" but this doesnt work either.
What is the property method to set? |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sat Jan 13, 2007 10:10 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
SilentWind wrote: |
IConnectionFactory factory = .....
factory.SetStringProperty(XMSC.WMQ_SECURITY_EXIT, "NameSpaceA.PackageA.MySecurityExit");
|
Shouldn't that be:
Code: |
factory.SetStringProperty(MQC.SECURITY_EXIT_PROPERTY, "NameSpaceA.PackageA.MySecurityExit"); |
Secondly, is "NameSpaceA.PackageA.MySecurityExit" in your path? WMQ probably can't find it. Try copying it to WMQ's exit directory.
i.e. <WMQ_install_path>\exits\
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
SilentWind |
Posted: Sun Jan 14, 2007 6:34 pm Post subject: |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
RogerLacroix wrote: |
Shouldn't that be:
Code: |
factory.SetStringProperty(MQC.SECURITY_EXIT_PROPERTY, "NameSpaceA.PackageA.MySecurityExit"); |
Secondly, is "NameSpaceA.PackageA.MySecurityExit" in your path? WMQ probably can't find it. Try copying it to WMQ's exit directory.
i.e. <WMQ_install_path>\exits\
Regards,
Roger Lacroix
Capitalware Inc. |
Hi Roger,
Thanks for your assistance. I have tried implementing your solution but it still did not work. The error is
Code: |
Exception : IBM.XMS.IllegalStateException: CWSMQ0044E: The user is not authorized to connect to the queue manager. The application has tried to connect to a queue manager without authorization. |
This is because the application can not detect the security exit as it will print out the username+password if the exit is called.
I have 2 questions:
1) MQC.SECURITY_EXIT_PROPERTY is a property for MQQueueManager and XMSC.WMQ_SECURITY_EXIT is a property for IConnectionFactory.
Can IBM.WMQ and IBM.XMS packages mix? I doubt so.
2) In the documentation for XMS, it says exits for WMQ is not supported. Is this true?
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jan 14, 2007 7:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to look at this a little bit differently.
Compare the XMS security exit to the JMS security exit. This is a java class (JMS or in your case c# class =>XMS) that you specify to the QCF that will handle the client side security exit. It needs of course to match the c security exit written on the server side.
Now the standard security exit can be compared to the java base security exit or to any client (c, cobol, c++) client side security exits.
The security exit still needs to match any server side security.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
SilentWind |
Posted: Sun Jan 14, 2007 9:22 pm Post subject: |
|
|
Acolyte
Joined: 11 Jan 2006 Posts: 58
|
fjb_saper wrote: |
You need to look at this a little bit differently.
Compare the XMS security exit to the JMS security exit. This is a java class (JMS or in your case c# class =>XMS) that you specify to the QCF that will handle the client side security exit. It needs of course to match the c security exit written on the server side.
Now the standard security exit can be compared to the java base security exit or to any client (c, cobol, c++) client side security exits.
The security exit still needs to match any server side security. |
Yes, I agree. Actually there is already a server side security c security exit (in a dll format) installed. I have a Java client that successfully passes the username+pwd from the Java client security exit to the server security exit (where I perform my actual authentication). This works and is implemented in the production environment.
Now I have a .NET/C# client which does the same thing as Java, i.e. have a .NET/C# client security exit which passes the parms to the server security exit. I believe they should have the same behaviour as the Java client. That is how I run in to the above mentioned problem.
Am I getting anything wrong here? Hope it is not confusing. :oops: |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 15, 2007 5:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
SilentWind wrote: |
The error is
Code: |
Exception : IBM.XMS.IllegalStateException: CWSMQ0044E: The user is not authorized to connect to the queue manager. The application has tried to connect to a queue manager without authorization. |
This is because the application can not detect the security exit as it will print out the username+password if the exit is called.
I have 2 questions:
1) MQC.SECURITY_EXIT_PROPERTY is a property for MQQueueManager and XMSC.WMQ_SECURITY_EXIT is a property for IConnectionFactory.
Can IBM.WMQ and IBM.XMS packages mix? I doubt so.
2) In the documentation for XMS, it says exits for WMQ is not supported. Is this true?
Thanks. |
1)As far as I know the packages have become different. I am not sure if the latest XMS package is not fully in managed code.... whereas the WMQ might still invoke the underlying C client ??
2) Why would you expect an exit for XMS to support exits for WMQ? The exits for JMS do not support all the exits for Java base...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|