|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Basic HTTP Authentication |
« View previous topic :: View next topic » |
Author |
Message
|
mqjeff |
Posted: Fri Apr 11, 2014 5:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm confused.
Is the intent to validate an incoming Basic-Auth credential against userids stored by mqsisetdbparms?
This is not, to the best of my knowledge, possible. The closest you can get, I believe, is to validate incoming credentials against the system user registry for the OS hosting the broker. Or against an external user repository, like LDAP.
Or one could stand up a real webserver at the front, and either use the JEE HTTP proxy, or otherwise do something to front-end the broker http listener with a more standard webserver, like an apache or IIS.
Is the intent to attach a predefined Basic-Auth credential, that was stored by mqsisetdbparms, to an outgoing request?
Then Vitor has it correct. This is only documented as possible as of v8 and later.
And you should be running v8 or later, anyway. Migrate now. |
|
Back to top |
|
 |
Ramya.IN |
Posted: Fri Apr 11, 2014 8:26 am Post subject: |
|
|
Novice
Joined: 07 Apr 2014 Posts: 13 Location: Los Angeles, USA
|
mqjeff wrote: |
I'm confused.
Is the intent to validate an incoming Basic-Auth credential against userids stored by mqsisetdbparms?
This is not, to the best of my knowledge, possible. The closest you can get, I believe, is to validate incoming credentials against the system user registry for the OS hosting the broker. Or against an external user repository, like LDAP.
Or one could stand up a real webserver at the front, and either use the JEE HTTP proxy, or otherwise do something to front-end the broker http listener with a more standard webserver, like an apache or IIS.
Is the intent to attach a predefined Basic-Auth credential, that was stored by mqsisetdbparms, to an outgoing request?
Then Vitor has it correct. This is only documented as possible as of v8 and later.
And you should be running v8 or later, anyway. Migrate now. |
Yes.,The intent you have specified is correct. Thanks for the input. We are doing the migration process.Thanks  _________________ Thanks,
Ramya. |
|
Back to top |
|
 |
Ramya.IN |
Posted: Fri Apr 11, 2014 8:28 am Post subject: Re: This should help |
|
|
Novice
Joined: 07 Apr 2014 Posts: 13 Location: Los Angeles, USA
|
anurag.munjal wrote: |
Use this esql code- it works!
Code: |
CREATE COMPUTE MODULE SomeCompute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||base64Encode(CAST('admin:admin123' as BLOB CCSID InputRoot.Properties.CodedCharSetId));
RETURN TRUE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
CREATE PROCEDURE base64Encode(IN source BLOB)
RETURNS CHARACTER
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.encode";
END MODULE; |
|
Hi Anurag, Thanks for the code. But like Vitor said, I cannot use it. _________________ Thanks,
Ramya. |
|
Back to top |
|
 |
alerajeshh |
Posted: Tue Apr 15, 2014 11:00 am Post subject: |
|
|
Acolyte
Joined: 19 Aug 2013 Posts: 55
|
I did HTTP Basic Auth..
For Basic Auth you should not do any coding thing... Just some configuration setting..
1)your flow should start with Http Input Node
2)In Websphere MQ Explorer -->Broker-->Properties-->Security-->SecurityProfiles-->select authentication give the ldap details of particular user cn ..(something)
3) Create a BAR file for that flow. in the Bar file manage select the flow(http input node) in properties u will be able to see security profile..
4)give the security profile name that you have created in MQ Explorer.. and Deploy the BAR file..
5) When you try to call the webservice using URL you have mentioned in HTTP input node.. it will automatically ask for the windows Security ...
a pop-up window will appear..
The whole thing is mentioned in Developerworks..LDAP BASIC HTTP Authentication.. i think you are looking for that.. Sorry if am wrong somewhere. bcoz it worked for me.. |
|
Back to top |
|
 |
Ramya.IN |
Posted: Tue Apr 15, 2014 2:35 pm Post subject: |
|
|
Novice
Joined: 07 Apr 2014 Posts: 13 Location: Los Angeles, USA
|
alerajeshh wrote: |
I did HTTP Basic Auth..
For Basic Auth you should not do any coding thing... Just some configuration setting..
1)your flow should start with Http Input Node
2)In Websphere MQ Explorer -->Broker-->Properties-->Security-->SecurityProfiles-->select authentication give the ldap details of particular user cn ..(something)
3) Create a BAR file for that flow. in the Bar file manage select the flow(http input node) in properties u will be able to see security profile..
4)give the security profile name that you have created in MQ Explorer.. and Deploy the BAR file..
5) When you try to call the webservice using URL you have mentioned in HTTP input node.. it will automatically ask for the windows Security ...
a pop-up window will appear..
The whole thing is mentioned in Developerworks..LDAP BASIC HTTP Authentication.. i think you are looking for that.. Sorry if am wrong somewhere. bcoz it worked for me.. |
Hi thanks for the input. I have seen the documentation you are refering to . I do not want to use LDAP server which I have mentioned in my previous post.That is the reason I cannot use this procedure. _________________ Thanks,
Ramya. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|