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 » WS-Security in SOAP Request node

Post new topic  Reply to topic
 WS-Security in SOAP Request node « View previous topic :: View next topic » 
Author Message
meekings
PostPosted: Wed Feb 06, 2013 9:16 am    Post subject: WS-Security in SOAP Request node Reply with quote

Voyager

Joined: 28 Jun 2001
Posts: 86
Location: UK, South West

I can access a web service successfully from soapUI, providing security info via the Aut tab, with Authorisation type Preemptive, and username and password set.

When I put the following message through a SOAP Request node:

Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Header>
                   <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                                   <wsse:UsernameToken>
                                                   <wsse:Username xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-29">MyUser</wsse:Username>
                                                   <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">abc123</wsse:Password>
                                   </wsse:UsernameToken>
                   </wsse:Security>
   </soap:Header>
   <soap:Body>
   ...


I get an "unauthorized" response. What is soapUI doing that I'm not? This is the early stages of development of a flow that will ultimately use policy sets.
_________________
Brian Meekings
Information Design, Inc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lancelotlinc
PostPosted: Wed Feb 06, 2013 9:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

I would imagine your not passing the proper values in the SOAP Header.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
meekings
PostPosted: Wed Feb 06, 2013 9:37 am    Post subject: Reply with quote

Voyager

Joined: 28 Jun 2001
Posts: 86
Location: UK, South West

Same values as for soapUI. I wondered if it might have something to do with the "Preemptive" authorization, which I don't know how to emulate in broker.
_________________
Brian Meekings
Information Design, Inc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lancelotlinc
PostPosted: Wed Feb 06, 2013 9:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Take a look at this:

http://www.mqseries.net/phpBB2/viewtopic.php?t=62150&start=0&postdays=0&postorder=asc&highlight=

Code:
OutputRoot.SOAP.Header.wsse:Security.wsse:UsernameToken.wsse:Password

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Feb 06, 2013 10:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
Take a look at this:

Code:
OutputRoot.SOAP.Header.wsse:Security.wsse:UsernameToken.wsse:Password


Which, according to
http://www.mqseries.net/phpBB2/viewtopic.php?t=62150&start=0&postdays=0&postorder=asc&highlight=

IS DOING IT THE HARD WAY.

Please always use the built-in mechanisms in Broker - Security Profiles, in conjunction with Policy Sets and Policy Bindings, to perform Identity, Authorization, Authentication, Mapping and other security functions.

If you roll your own, the system is only as secure as your own personal expertise, and does not leverage the vast experience of IBM.

Also, if you construct a system to hold all passwords in a single location, then none of those passwords matter any more, the only passwords that matter are the passwords that are used to access the system that holds passwords.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Feb 06, 2013 10:13 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

He said he was mocking up a proof-of-concept.

Other things he can try are :

Code:
OutputRoot.Properties.IdentitySourceType = 'usernameAndPassword';
OutputRoot.Properties.IdentitySourceToken = 'xyz_user';
OutputRoot.Properties.IdentitySourcePassword = 'xyz_pwd';

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
meekings
PostPosted: Thu Feb 07, 2013 9:59 am    Post subject: Reply with quote

Voyager

Joined: 28 Jun 2001
Posts: 86
Location: UK, South West

Thanks, lancelotlinc - that did the trick, once I'd figured out that I also needed Default Propagation for the Security Profile.

Onward and upward, to implement security properly - before I send mqjeff off on another tirade ...
_________________
Brian Meekings
Information Design, Inc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mqjeff
PostPosted: Thu Feb 07, 2013 10:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

meekings wrote:
Thanks, lancelotlinc - that did the trick, once I'd figured out that I also needed Default Propagation for the Security Profile.

Onward and upward, to implement security properly - before I send mqjeff off on another tirade ...


No need to wait. I'm happy to provide tirades to respected colleagues on request.
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 » WS-Security in SOAP Request node
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.