<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Apache CXF Tutorial &#8211; WS-Security with Spring</title>
	<atom:link href="http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/</link>
	<description>The software development weblog of Benjamin McCann.</description>
	<lastBuildDate>Fri, 03 Jul 2009 11:27:39 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: DeKapx</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-9219</link>
		<dc:creator>DeKapx</dc:creator>
		<pubDate>Mon, 27 Apr 2009 05:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-9219</guid>
		<description>Hi Ben,

In addition to my previous comment, there is one scenario in our application. We have Metro based WS-Security enabled web service and its implementation is based on WS-Security using Symmetric Keys. I am trying to hit the service using Apache CXF client but its not working. Is there any compatibility issues with these technologies or is there any way out for this. 

DeKapx</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>In addition to my previous comment, there is one scenario in our application. We have Metro based WS-Security enabled web service and its implementation is based on WS-Security using Symmetric Keys. I am trying to hit the service using Apache CXF client but its not working. Is there any compatibility issues with these technologies or is there any way out for this. </p>
<p>DeKapx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeKapx</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-9217</link>
		<dc:creator>DeKapx</dc:creator>
		<pubDate>Mon, 27 Apr 2009 05:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-9217</guid>
		<description>Hi Ben,

This is really a very good tutorial. Sometimes back I explore WS-Security using Metro - WSIT. There &#039;re multiple types of WS-Security can be created using Metro for example:
1. Message Security using Mutual Certificate
2. Message Security using Symmetric Keys.

and few more. Is there any possibility to create such types of WS-Security using Apache CXF. Any information on this will be a great help.

Thanks in advance.
DeKapx</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>This is really a very good tutorial. Sometimes back I explore WS-Security using Metro &#8211; WSIT. There &#8216;re multiple types of WS-Security can be created using Metro for example:<br />
1. Message Security using Mutual Certificate<br />
2. Message Security using Symmetric Keys.</p>
<p>and few more. Is there any possibility to create such types of WS-Security using Apache CXF. Any information on this will be a great help.</p>
<p>Thanks in advance.<br />
DeKapx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dipesh</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-2881</link>
		<dc:creator>Dipesh</dc:creator>
		<pubDate>Thu, 04 Dec 2008 05:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-2881</guid>
		<description>Very good security tutorial, I was able to set it up quickly and test both swAuth and corporateAuth webservice endpoints. 

One thing which I did not realize and got confused is when &#039;passwordType&#039; is &#039;PasswordText&#039;, responsibility to validate password lies with the CallbackHandler. 

I was trying to send wrong password from client and expecting the call to be rejected by WebService. But it was not happening. 

After some google found information on CXF wiki page

http://cwiki.apache.org/CXF20DOC/ws-security.html

This note is present under &#039;Username Token Authentication&#039; section, &quot;Note that for the special case of a plain-text password (or any other yet unknown password type), the password validation is delegated to the callback class&quot;. 

After reading this I modified ServerPasswordCallback.handle () method, so that the code looks something like:  

&lt;pre&gt;&lt;code&gt;    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {

        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
        // Set the password on the callback. This will be compared to the
        //     password which was sent from the client.
        // We can call pc.getIdentifer() right here to check the username
        //     if we want each client to have it&#039;s own password.
        
        if (!pc.getPassword().equals(password)) {
			throw new SecurityException (&quot;Password is invalid&quot;);
		}
    }&lt;/code&gt;&lt;/pre&gt;

After this modification in ServerPasswordCallback, service started responding in correct way. Failed for wrong password and get valid response with correct password.</description>
		<content:encoded><![CDATA[<p>Very good security tutorial, I was able to set it up quickly and test both swAuth and corporateAuth webservice endpoints. </p>
<p>One thing which I did not realize and got confused is when &#8216;passwordType&#8217; is &#8216;PasswordText&#8217;, responsibility to validate password lies with the CallbackHandler. </p>
<p>I was trying to send wrong password from client and expecting the call to be rejected by WebService. But it was not happening. </p>
<p>After some google found information on CXF wiki page</p>
<p><a href="http://cwiki.apache.org/CXF20DOC/ws-security.html" rel="nofollow">http://cwiki.apache.org/CXF20DOC/ws-security.html</a></p>
<p>This note is present under &#8216;Username Token Authentication&#8217; section, &#8220;Note that for the special case of a plain-text password (or any other yet unknown password type), the password validation is delegated to the callback class&#8221;. </p>
<p>After reading this I modified ServerPasswordCallback.handle () method, so that the code looks something like:  </p>
<pre><code>    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {

        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
        // Set the password on the callback. This will be compared to the
        //     password which was sent from the client.
        // We can call pc.getIdentifer() right here to check the username
        //     if we want each client to have it's own password.

        if (!pc.getPassword().equals(password)) {
			throw new SecurityException ("Password is invalid");
		}
    }</code></pre>
<p>After this modification in ServerPasswordCallback, service started responding in correct way. Failed for wrong password and get valid response with correct password.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-2630</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 27 Nov 2008 18:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-2630</guid>
		<description>Hi Ben,

Thank you for your help!  Following your examples definitely cleared up a lot of my questions.</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>Thank you for your help!  Following your examples definitely cleared up a lot of my questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-2608</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 27 Nov 2008 00:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-2608</guid>
		<description>Hey Dave,
I agree CXF is really tricky.  I think it took me a week or two to get a sample app up and running.
You should read the other CXF tutorial on this site first.  It will show you how to create a client to access your service.  Definitely do that and create an unprotected service first.  Then come back to this writeup and add in the security portions.

-Ben</description>
		<content:encoded><![CDATA[<p>Hey Dave,<br />
I agree CXF is really tricky.  I think it took me a week or two to get a sample app up and running.<br />
You should read the other CXF tutorial on this site first.  It will show you how to create a client to access your service.  Definitely do that and create an unprotected service first.  Then come back to this writeup and add in the security portions.</p>
<p>-Ben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-2607</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 27 Nov 2008 00:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-2607</guid>
		<description>This is an excellent article!  It&#039;s what I&#039;ve been looking for for hours.  I&#039;ve followed everything but don&#039;t see how to actually make use of the protected service...  Am I supposed to be visiting the address for the protected service (/corporateAuth) or something else?

I&#039;m somewhat familiar with CXF, but am really having trouble understanding how to implement WS-Security.  Thank you for your time!</description>
		<content:encoded><![CDATA[<p>This is an excellent article!  It&#8217;s what I&#8217;ve been looking for for hours.  I&#8217;ve followed everything but don&#8217;t see how to actually make use of the protected service&#8230;  Am I supposed to be visiting the address for the protected service (/corporateAuth) or something else?</p>
<p>I&#8217;m somewhat familiar with CXF, but am really having trouble understanding how to implement WS-Security.  Thank you for your time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manisha</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-752</link>
		<dc:creator>Manisha</dc:creator>
		<pubDate>Mon, 15 Sep 2008 20:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-752</guid>
		<description>It&#039;s really a great tutorial, I could make it work on my local. Here I am trying to understand the client part, which uses org.apache.ws.security.WSPasswordCallback in ClientPasswordCallback() class. Would really appreciate if you could let me know one thing, if my client is .Net - what changes shall I make ?</description>
		<content:encoded><![CDATA[<p>It&#8217;s really a great tutorial, I could make it work on my local. Here I am trying to understand the client part, which uses org.apache.ws.security.WSPasswordCallback in ClientPasswordCallback() class. Would really appreciate if you could let me know one thing, if my client is .Net &#8211; what changes shall I make ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blair</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-647</link>
		<dc:creator>Blair</dc:creator>
		<pubDate>Fri, 29 Aug 2008 17:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-647</guid>
		<description>Hello,

This is a great tutorial. Does anyone know if a tutorial like this one exists for a JAXRS (RESTful) service. In my service I pass simple XML back and forth. I try using what is shown here in this tutorial and get a bunch of SOAP errors.


Thanks.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>This is a great tutorial. Does anyone know if a tutorial like this one exists for a JAXRS (RESTful) service. In my service I pass simple XML back and forth. I try using what is shown here in this tutorial and get a bunch of SOAP errors.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Av</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-603</link>
		<dc:creator>Av</dc:creator>
		<pubDate>Thu, 21 Aug 2008 22:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-603</guid>
		<description>Nice tutorial.
Do you know if there is a preferred method of authorizing a web service using cxf? I mean, after authentication, one needs to ensure that the specified user is actually authorized to execute the web service method in question. Does cxf offer any support for this, do you know?

Thanks.</description>
		<content:encoded><![CDATA[<p>Nice tutorial.<br />
Do you know if there is a preferred method of authorizing a web service using cxf? I mean, after authentication, one needs to ensure that the specified user is actually authorized to execute the web service method in question. Does cxf offer any support for this, do you know?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-507</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 04 Aug 2008 21:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-507</guid>
		<description>Hi Mike,
The interceptors are setup on a per endpoint basis, so you shouldn&#039;t have any trouble doing that.  Simply copy everything between the jaxws:endpoint tags to create a new endpoint and leave out the wss4j interceptor for the endpoints you don&#039;t want to secure. 

-Ben</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
The interceptors are setup on a per endpoint basis, so you shouldn&#8217;t have any trouble doing that.  Simply copy everything between the jaxws:endpoint tags to create a new endpoint and leave out the wss4j interceptor for the endpoints you don&#8217;t want to secure. </p>
<p>-Ben</p>
]]></content:encoded>
	</item>
</channel>
</rss>
