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
 Basic HTTP Authentication « View previous topic :: View next topic » 
Author Message
vanshulchawla_target
PostPosted: Tue May 25, 2010 11:58 pm    Post subject: Basic HTTP Authentication Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

I have a requirement.I need to access a service using HTTPRequest node.I need to set the username and password because the external webservice needs to authenticate our request.
I need to set the username and password in basci HTTP authentication mechanisn.
Please help me as to how to use the same in message broker?
Can i code it in esql?
Back to top
View user's profile Send private message
n1ghtrain
PostPosted: Wed May 26, 2010 10:04 pm    Post subject: s Reply with quote

Apprentice

Joined: 23 Mar 2006
Posts: 48
Location: Bangalore

Hi did you try mapping the identity
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ap04010_.htm[/url]


SET OutputRoot.Properties.IdentityMappedType = 'usernameAndPassword';
SET OutputRoot.Properties.IdentityMappedToken = 'xxx';
SET OutputRoot.Properties.IdentityMappedPassword = 'yy';
SET OutputRoot.Properties.IdentityMappedIssuedBy = 'zz';
Back to top
View user's profile Send private message Yahoo Messenger
vanshulchawla_target
PostPosted: Wed May 26, 2010 10:28 pm    Post subject: Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

Hi,

Thanks but its only applicable when we use security profiles i think
Back to top
View user's profile Send private message
n1ghtrain
PostPosted: Thu May 27, 2010 2:36 am    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2006
Posts: 48
Location: Bangalore

I don't think u need to use the security profiles unless you need it for connect to LDAP or so to validate the identity. I

f you just need to send a HTTP request with Basic Authentication this should be good enough.
Back to top
View user's profile Send private message Yahoo Messenger
napier
PostPosted: Fri May 28, 2010 11:44 am    Post subject: Reply with quote

Apprentice

Joined: 09 Oct 2007
Posts: 48
Location: USA

You can do it using compute node before the HTTP request node.
Add the following state ment in compute node

SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||base64Encode(CAST('username:password' as BLOB CCSID InputRoot.Properties.CodedCharSetId));


CREATE PROCEDURE base64Encode(IN source BLOB)
RETURNS CHARACTER
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.encode";
Back to top
View user's profile Send private message
AndreasMartens
PostPosted: Fri Jun 04, 2010 2:39 am    Post subject: Properties and Security Profiles for the win! Reply with quote

Acolyte

Joined: 30 Jan 2006
Posts: 65
Location: Hursley, UK

Do you have any reason not to use a security profile on the request node?

Setting Properties.Identity[Source|Mapped][Type|Token|Password|IssuedBy] is an easy way of telling the broker which Identity you want to use with this message, without needing to deal with having to encode and place it in the right header yourself. Then you just set the securityProfile of the request node to "Default_Propagation" and it'll massage the headers for you. It won't so any more than that on the request node (the request node only uses the Propagation field of the profile) so you don't need to worry about LDAP etc.

cheers,
Andreas
Back to top
View user's profile Send private message MSN Messenger
mq4u
PostPosted: Tue Nov 20, 2012 5:49 pm    Post subject: Reply with quote

Newbie

Joined: 20 Nov 2012
Posts: 2

Quote:
SET OutputRoot.Properties.IdentityMappedType = 'usernameAndPassword';
SET OutputRoot.Properties.IdentityMappedToken = 'xxx';
SET OutputRoot.Properties.IdentityMappedPassword = 'yy';
SET OutputRoot.Properties.IdentityMappedIssuedBy = 'zz';


Can we use these Properties field in Broker 6.1.0.10 ?

Quote:
Do you have any reason not to use a security profile on the request node?


But still one has to hardcode the username/password in compute node. I guess basic authentication without LDAP will not work without hardcoding credentials in the message flow. So, my second question is can we use a combination of configurable services and security profiles to avoid hardcoding the username/password in message flow and instead the administrator sets up username/password.

Sorry, this reply is on a little old thread.

Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 20, 2012 6:18 pm    Post subject: Reply with quote

Grand High Poobah

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

mq4u wrote:
Quote:
SET OutputRoot.Properties.IdentityMappedType = 'usernameAndPassword';
SET OutputRoot.Properties.IdentityMappedToken = 'xxx';
SET OutputRoot.Properties.IdentityMappedPassword = 'yy';
SET OutputRoot.Properties.IdentityMappedIssuedBy = 'zz';


Can we use these Properties field in Broker 6.1.0.10 ?


Are they in the v6.1.0.10 documentation.

Quote:
Do you have any reason not to use a security profile on the request node?


mq4u wrote:
But still one has to hardcode the username/password in compute node.


No you don't. You just need to supply it.
_________________
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 Page 1 of 1

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.