ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Basic HTTP Authentication

Post new topic  Reply to topic Goto page 1, 2  Next
 Basic HTTP Authentication « View previous topic :: View next topic » 
Author Message
Ramya.IN
PostPosted: Mon Apr 07, 2014 8:42 am    Post subject: Basic HTTP Authentication Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

Hi,
How to configure Broker to use basic HTTP authentication?
Can the command 'mqsisetdbparms' be used for basic http auth? When I check the WMB help content it says the command is used to associate the user id and password but does not mention if it can be used for basic authentication.Can some one suggest any other command basic http auth.

Basically, I want to configure the user-id/pwd in the broker for basic http authentication first then change the message flow to use the security profile.
Please help.

Thanks,
Ramya.


Last edited by Ramya.IN on Mon Apr 07, 2014 9:01 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Apr 07, 2014 8:56 am    Post subject: Re: Basic HTTP Authentication Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Ramya.IN wrote:
How to configure Broker to use basic HTTP authentication?


Using the method detailed in the product documentation

Ramya.IN wrote:
Can the command 'mqsisetdbparms' be used for basic http auth?


Possibly, depending on product version (which you've not seen fit to mention) and your exact use case (which you've not seen fit to mention either).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Ramya.IN
PostPosted: Mon Apr 07, 2014 9:06 am    Post subject: Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

Thanks for the reply.I am using the Version: 7.0.0.3 on Windows7 platform.

I have gone through:
1. http://www.ibm.com/developerworks/websphere/library/techarticles/1008_fan/1008_fan.html

2. "Configuring authentication with HTTP basic authentication"
and
"mqsisetdbparms command" from product documentation.

Thanks.


Last edited by Ramya.IN on Mon Apr 07, 2014 10:12 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Ramya.IN
PostPosted: Mon Apr 07, 2014 10:11 am    Post subject: Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

Use case:


I got to set up Basic HTTP Authentication where in if the given username and password doesnot match the set credentials it should throw an error. In such a case can i use 'mqsisetdbparams ' command to set up basic auth. Please let me know.

Thanks,
Ramya.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Apr 07, 2014 10:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Ramya.IN wrote:
Thanks for the reply.I am using the Version: 7.0.0.3 on Windows7 platform.

I have gone through:
1. http://www.ibm.com/developerworks/websphere/library/techarticles/1008_fan/1008_fan.html

2. "Configuring authentication with HTTP basic authentication"
and
"mqsisetdbparms command" from product documentation.

Thanks.


And what arfe you still unclear on?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 07, 2014 10:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Ramya.IN wrote:
I got to set up Basic HTTP Authentication where in if the given username and password doesnot match the set credentials it should throw an error.


So your use case is that the flow should examine (authenticate) the credentials supplied by reference to a user id / password pair stored in the broker's own registry via the mqsisetdbparms commands?

No, you can't use mqsisetdbparms for that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Ramya.IN
PostPosted: Mon Apr 07, 2014 4:06 pm    Post subject: Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

Thank you for the reply. May i know what command or other options that can be used in such a use case if mqsisetdbparams cannot be used.

Last edited by Ramya.IN on Mon Apr 07, 2014 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Ramya.IN
PostPosted: Mon Apr 07, 2014 4:22 pm    Post subject: And what arfe you still unclear on?[/quote] Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

And what arfe you still unclear on?[/quote]


I do not want any external provider to be used. But the link specifies the usage of an external provider.
Back to top
View user's profile Send private message Send e-mail
SandiSan
PostPosted: Mon Apr 07, 2014 11:20 pm    Post subject: Reply with quote

Acolyte

Joined: 01 Apr 2006
Posts: 57
Location: Pune/India

Check these steps

1. Register the u/p
mqsisetdbparms brokerName -n securityIdName -u username -p password

2. Create a Security Profile configurable service by using the mqsicreateconfigurableservice command:
mqsicreateconfigurableservice brokerName -c SecurityProfiles -o securityProfileName -n "propagation,idToPropagateToTransport,transportPropagationConfig" -v "TRUE,STATIC ID,securityIdName"

3. Register securityProfileName with the request node, either in the bar editor or by using mqsiapplybaroverride.
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Apr 08, 2014 5:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

SandiSan wrote:
Check these steps

1. Register the u/p
mqsisetdbparms brokerName -n securityIdName -u username -p password

2. Create a Security Profile configurable service by using the mqsicreateconfigurableservice command:
mqsicreateconfigurableservice brokerName -c SecurityProfiles -o securityProfileName -n "propagation,idToPropagateToTransport,transportPropagationConfig" -v "TRUE,STATIC ID,securityIdName"

3. Register securityProfileName with the request node, either in the bar editor or by using mqsiapplybaroverride.


I thought that only worked for passing static credentials (i.e. those not held or derived from the message payload) out to an external service.

The OP is (if I'm reading the post correctly) trying to expose a flow as a web service and authenticate a user against the registry.

Note also that this only works on higher versions of WMB/IIB
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Ramya.IN
PostPosted: Tue Apr 08, 2014 8:13 am    Post subject: Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

SandiSan wrote:
Check these steps

1. Register the u/p
mqsisetdbparms brokerName -n securityIdName -u username -p password

2. Create a Security Profile configurable service by using the mqsicreateconfigurableservice command:
mqsicreateconfigurableservice brokerName -c SecurityProfiles -o securityProfileName -n "propagation,idToPropagateToTransport,transportPropagationConfig" -v "TRUE,STATIC ID,securityIdName"

3. Register securityProfileName with the request node, either in the bar editor or by using mqsiapplybaroverride.





Thanks for the reply. I will try this once.
Back to top
View user's profile Send private message Send e-mail
Ramya.IN
PostPosted: Tue Apr 08, 2014 8:18 am    Post subject: Reply with quote

Novice

Joined: 07 Apr 2014
Posts: 13
Location: Los Angeles, USA

Vitor wrote:

I thought that only worked for passing static credentials (i.e. those not held or derived from the message payload) out to an external service.

The OP is (if I'm reading the post correctly) trying to expose a flow as a web service and authenticate a user against the registry.

Note also that this only works on higher versions of WMB/IIB




Hi.. does higher versions of WMB/IIB mean higher version than 7.0.0.3? Thanks.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Apr 08, 2014 9:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Ramya.IN wrote:
Vitor wrote:

I thought that only worked for passing static credentials (i.e. those not held or derived from the message payload) out to an external service.

The OP is (if I'm reading the post correctly) trying to expose a flow as a web service and authenticate a user against the registry.

Note also that this only works on higher versions of WMB/IIB




Hi.. does higher versions of WMB/IIB mean higher version than 7.0.0.3? Thanks.


Yes. Introduced in WMBv8
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
anurag.munjal
PostPosted: Fri Apr 11, 2014 5:41 am    Post subject: This should help Reply with quote

Voyager

Joined: 08 Apr 2012
Posts: 97

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;

_________________
- Anurag
------------------------
Be Simple, Be Happy
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 11, 2014 5:48 am    Post subject: Re: This should help Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, 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;


If I'm reading this correctly, this is placing a hard coded value in the HTTP header rather than reading the values from the broker registry where it's been placed by mqsisetdbparms as the OP requested.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Basic HTTP Authentication
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.