<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Module Lost &#187; security</title>
	<atom:link href="http://www.modlost.net/home/tag/security/feed" rel="self" type="application/rss+xml" />
	<link>http://www.modlost.net/home</link>
	<description>Thoughts about software development &#38; productivity</description>
	<lastBuildDate>Sat, 12 Jun 2010 03:05:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Acegi Security: Custom Authentication</title>
		<link>http://www.modlost.net/home/article/acegi-security-custom-authentication.html</link>
		<comments>http://www.modlost.net/home/article/acegi-security-custom-authentication.html#comments</comments>
		<pubDate>Thu, 31 May 2007 18:14:46 +0000</pubDate>
		<dc:creator>Abner</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Information Technologies]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.modlost.net/wordpress/?p=89</guid>
		<description><![CDATA[I&#8217;ve been using Acegi Security in several projects with good results. It&#8217;s powerful and flexible! Sadly, sometimes, developers have problems when they want to customize it. The code is the best documentation, so, I recommend them to read the code and javadocs. Well, this time I&#8217;ll show you how to customize the authentication. I assume [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.acegisecurity.org/">Acegi Security</a> in several projects with good results. It&#8217;s powerful and flexible! Sadly, sometimes, developers have problems when they want to customize it. The code is the best documentation, so, I recommend them to read the code and javadocs. Well, this time I&#8217;ll show you how to customize the authentication. I assume a good knowledge of <a href="http://www.springframework.org/">Spring Framework</a> and basic knowledge of Acegi Security.</p>
<pre><tt><span style="color: #000000;">1:</span> <span style="color: #3f7f7f;">&lt;bean</span> <span style="color: #7f007f;">id</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationProcessingFilter"</span>
<span style="color: #000000;">2:</span>       <span style="color: #7f007f;">class</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"</span><span style="color: #3f7f7f;">&gt;</span>
<span style="color: #000000;">3:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationManager"</span>    <span style="color: #7f007f;">ref</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationManager"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">4:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationFailureUrl"</span> <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/login.htm?login_error=1"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">5:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"defaultTargetUrl"</span>         <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/foobar.htm"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">6:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"filterProcessesUrl"</span>       <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/j_acegi_security_check"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">7:</span> <span style="color: #3f7f7f;">&lt;/bean&gt;</span>
</tt></pre>
<p>You usually define a bean like <code>authenticationProcessingFilter</code> and add it to a chain in the FilterChainProxy bean. With this configuration, you attempt to authenticate when a request to <code>/j_acegi_security_check</code> has been made, delegating the authentication to the <code>authenticationManager</code> bean. If everything is OK, the user is redirected to <code>/foobar.htm</code> otherwise to <code>/login.htm?login_error=1</code></p>
<p><span id="more-89"></span></p>
<p>Most of the time, you will be happy with this configuration but what happens if you need to do some additional validations before authentication. You have to extend AuthenticationProcessingFilter</p>
<pre><tt><span style="color: #000000;">01:</span> <strong><span style="color: #7f0055;">package</span></strong> net<span style="color: #7f0055;">.</span>modlost<span style="color: #7f0055;">.</span>framework<span style="color: #7f0055;">.</span>security<span style="color: #7f0055;">;</span>
<span style="color: #000000;">02:</span>
<span style="color: #000000;">03:</span> <strong><span style="color: #7f0055;">import</span></strong> java<span style="color: #7f0055;">.</span>io<span style="color: #7f0055;">.</span>IOException<span style="color: #7f0055;">;</span>
<span style="color: #000000;">04:</span>
<span style="color: #000000;">05:</span> <strong><span style="color: #7f0055;">import</span></strong> javax<span style="color: #7f0055;">.</span>servlet<span style="color: #7f0055;">.</span>http<span style="color: #7f0055;">.</span>HttpServletRequest<span style="color: #7f0055;">;</span>
<span style="color: #000000;">06:</span> <strong><span style="color: #7f0055;">import</span></strong> javax<span style="color: #7f0055;">.</span>servlet<span style="color: #7f0055;">.</span>http<span style="color: #7f0055;">.</span>HttpServletResponse<span style="color: #7f0055;">;</span>
<span style="color: #000000;">07:</span>
<span style="color: #000000;">08:</span> <strong><span style="color: #7f0055;">import</span></strong> org<span style="color: #7f0055;">.</span>acegisecurity<span style="color: #7f0055;">.</span>AuthenticationException<span style="color: #7f0055;">;</span>
<span style="color: #000000;">09:</span> <strong><span style="color: #7f0055;">import</span></strong> org<span style="color: #7f0055;">.</span>acegisecurity<span style="color: #7f0055;">.</span>ui<span style="color: #7f0055;">.</span>webapp<span style="color: #7f0055;">.</span>AuthenticationProcessingFilter<span style="color: #7f0055;">;</span>
<span style="color: #000000;">10:</span>
<span style="color: #000000;">11:</span> <span style="color: #3f5fbf;">/**</span>
<span style="color: #000000;">12:</span> <span style="color: #3f5fbf;"> * @author Abner Ballardo Urco</span>
<span style="color: #000000;">13:</span> <span style="color: #3f5fbf;"> *</span>
<span style="color: #000000;">14:</span> <span style="color: #3f5fbf;"> */</span>
<span style="color: #000000;">15:</span> <strong><span style="color: #7f0055;">public</span></strong> <strong><span style="color: #7f0055;">class</span></strong> CustomAuthenticationProcessingFilter <strong><span style="color: #7f0055;">extends</span></strong>
<span style="color: #000000;">16:</span>                 AuthenticationProcessingFilter <span style="color: #7f0055;">{</span>
<span style="color: #000000;">17:</span>
<span style="color: #000000;">18:</span>         @Override
<span style="color: #000000;">19:</span>         <strong><span style="color: #7f0055;">protected</span></strong> <strong><span style="color: #7f0055;">void</span></strong> <span style="color: #000000;">onPreAuthentication</span><span style="color: #7f0055;">(</span>HttpServletRequest request<span style="color: #7f0055;">,</span>
<span style="color: #000000;">20:</span>                         HttpServletResponse response<span style="color: #7f0055;">)</span> <strong><span style="color: #7f0055;">throws</span></strong> AuthenticationException<span style="color: #7f0055;">,</span>
<span style="color: #000000;">21:</span>                         IOException <span style="color: #7f0055;">{</span>
<span style="color: #000000;">22:</span>
<span style="color: #000000;">23:</span>                 <strong><span style="color: #7f0055;">if</span></strong> <span style="color: #7f0055;">(!</span> <span style="color: #000000;">validAuthenticationRequest</span><span style="color: #7f0055;">(</span>request<span style="color: #7f0055;">,</span>response<span style="color: #7f0055;">))</span> <span style="color: #7f0055;">{</span>
<span style="color: #000000;">24:</span>                         <strong><span style="color: #7f0055;">throw</span></strong> <strong><span style="color: #7f0055;">new</span></strong> <span style="color: #000000;">FooBarAuthenticationException</span><span style="color: #7f0055;">();</span>
<span style="color: #000000;">25:</span>                 <span style="color: #7f0055;">}</span>
<span style="color: #000000;">26:</span>
<span style="color: #000000;">27:</span>         <span style="color: #7f0055;">}</span>
<span style="color: #000000;">28:</span>
<span style="color: #000000;">29:</span>         <strong><span style="color: #7f0055;">private</span></strong> <strong><span style="color: #7f0055;">boolean</span></strong> <span style="color: #000000;">validAuthenticationRequest</span><span style="color: #7f0055;">(</span>HttpServletRequest request<span style="color: #7f0055;">,</span>
<span style="color: #000000;">30:</span>                         HttpServletResponse response<span style="color: #7f0055;">)</span> <span style="color: #7f0055;">{</span>
<span style="color: #000000;">31:</span>                 <strong><span style="color: #7f0055;">return</span></strong> <strong><span style="color: #7f0055;">false</span></strong><span style="color: #7f0055;">;</span>
<span style="color: #000000;">32:</span>         <span style="color: #7f0055;">}</span>
<span style="color: #000000;">33:</span>
<span style="color: #000000;">34:</span> <span style="color: #7f0055;">}</span>
</tt></pre>
<p>Acegi provides a handily method: <code>onPreAuthentication</code>, you just need to override it, do your additional validations and throw an exception when the validation failed. This exception could extend <code>AuthenticationException</code> or <code>IOException</code>.</p>
<pre><tt><span style="color: #000000;">01:</span> <strong><span style="color: #7f0055;">package</span></strong> net<span style="color: #7f0055;">.</span>modlost<span style="color: #7f0055;">.</span>framework<span style="color: #7f0055;">.</span>security<span style="color: #7f0055;">;</span>
<span style="color: #000000;">02:</span>
<span style="color: #000000;">03:</span> <strong><span style="color: #7f0055;">import</span></strong> org<span style="color: #7f0055;">.</span>acegisecurity<span style="color: #7f0055;">.</span>AuthenticationException<span style="color: #7f0055;">;</span>
<span style="color: #000000;">04:</span>
<span style="color: #000000;">05:</span> <span style="color: #3f5fbf;">/**</span>
<span style="color: #000000;">06:</span> <span style="color: #3f5fbf;"> * @author Abner Ballardo Urco</span>
<span style="color: #000000;">07:</span> <span style="color: #3f5fbf;"> *</span>
<span style="color: #000000;">08:</span> <span style="color: #3f5fbf;"> */</span>
<span style="color: #000000;">09:</span> <strong><span style="color: #7f0055;">public</span></strong> <strong><span style="color: #7f0055;">class</span></strong> FooBarAuthenticationException <strong><span style="color: #7f0055;">extends</span></strong> AuthenticationException <span style="color: #7f0055;">{</span>
<span style="color: #000000;">10:</span>
<span style="color: #000000;">11:</span>         <strong><span style="color: #7f0055;">public</span></strong> <span style="color: #000000;">FooBarAuthenticationException</span><span style="color: #7f0055;">()</span> <span style="color: #7f0055;">{</span>
<span style="color: #000000;">12:</span>                 <strong><span style="color: #7f0055;">super</span></strong><span style="color: #7f0055;">(</span><span style="color: #2a00ff;">"FooBar Authentication Exception"</span><span style="color: #7f0055;">);</span>
<span style="color: #000000;">13:</span>         <span style="color: #7f0055;">}</span>
<span style="color: #000000;">14:</span>
<span style="color: #000000;">15:</span> <span style="color: #7f0055;">}</span>
</tt></pre>
<p>If <code>onPreAuthentication</code> doesn&#8217;t throw an exception, the normal authentication process continues. This isn&#8217;t the end of the story, what happens if you need to show different views according to the exception?. This step is a peace of cake!</p>
<pre><tt><span style="color: #000000;">01:</span> <span style="color: #3f7f7f;">&lt;bean</span> <span style="color: #7f007f;">id</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationProcessingFilter"</span>
<span style="color: #000000;">02:</span>       <span style="color: #7f007f;">class</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"org.acegisecurity.ui.webapp.AuthenticationProcessingFilter"</span><span style="color: #3f7f7f;">&gt;</span>
<span style="color: #000000;">03:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationManager"</span>    <span style="color: #7f007f;">ref</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationManager"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">04:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"authenticationFailureUrl"</span> <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/login.htm?login_error=1"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">05:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"defaultTargetUrl"</span>         <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/foobar.htm"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">06:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"filterProcessesUrl"</span>       <span style="color: #7f007f;">value</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"/j_acegi_security_check"</span><span style="color: #3f7f7f;">/&gt;</span>
<span style="color: #000000;">07:</span>   <span style="color: #3f7f7f;">&lt;property</span> <span style="color: #7f007f;">name</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"exceptionMappings"</span><span style="color: #3f7f7f;">&gt;</span>
<span style="color: #000000;">08:</span>   <span style="color: #3f7f7f;">&lt;props&gt;</span>
<span style="color: #000000;">09:</span>     <span style="color: #3f7f7f;">&lt;prop</span> <span style="color: #7f007f;">key</span><span style="color: #990000;">=</span><span style="color: #2a00ff;">"net.modlost.framework.security.FooBarAuthenticationException"</span><span style="color: #3f7f7f;">&gt;</span>/foobarError.jsp<span style="color: #3f7f7f;">&lt;/prop&gt;</span>
<span style="color: #000000;">10:</span>   <span style="color: #3f7f7f;">&lt;/props&gt;</span>
<span style="color: #000000;">11:</span>   <span style="color: #3f7f7f;">&lt;/property&gt;</span>
<span style="color: #000000;">12:</span> <span style="color: #3f7f7f;">&lt;/bean&gt;</span>
</tt></pre>
<p>Defining the property <code>exceptionMappings</code> in <code>authenticationProcessingFilter</code> you can add all the exceptions (from Acegi and yours) and the urls to redirect to. If the exception is not found in <code>exceptionMappings</code> the default <code>authenticationFailureUrl</code> will be used.</p>




	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;title=Acegi%20Security%3A%20Custom%20Authentication&amp;bodytext=I%27ve%20been%20using%20Acegi%20Security%20in%20several%20projects%20with%20good%20results.%20It%27s%20powerful%20and%20flexible%21%20Sadly%2C%20sometimes%2C%20developers%20have%20problems%20when%20they%20want%20to%20customize%20it.%20The%20code%20is%20the%20best%20documentation%2C%20so%2C%20I%20recommend%20them%20to%20read%20the%20code%20and" title="Digg"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;title=Acegi%20Security%3A%20Custom%20Authentication&amp;notes=I%27ve%20been%20using%20Acegi%20Security%20in%20several%20projects%20with%20good%20results.%20It%27s%20powerful%20and%20flexible%21%20Sadly%2C%20sometimes%2C%20developers%20have%20problems%20when%20they%20want%20to%20customize%20it.%20The%20code%20is%20the%20best%20documentation%2C%20so%2C%20I%20recommend%20them%20to%20read%20the%20code%20and" title="del.icio.us"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;t=Acegi%20Security%3A%20Custom%20Authentication" title="Facebook"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;title=Acegi%20Security%3A%20Custom%20Authentication&amp;annotation=I%27ve%20been%20using%20Acegi%20Security%20in%20several%20projects%20with%20good%20results.%20It%27s%20powerful%20and%20flexible%21%20Sadly%2C%20sometimes%2C%20developers%20have%20problems%20when%20they%20want%20to%20customize%20it.%20The%20code%20is%20the%20best%20documentation%2C%20so%2C%20I%20recommend%20them%20to%20read%20the%20code%20and" title="Google Bookmarks"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Acegi%20Security%3A%20Custom%20Authentication&amp;link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html" title="FriendFeed"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;title=Acegi%20Security%3A%20Custom%20Authentication&amp;source=Module+Lost+Thoughts+about+software+development+%26amp%3B+productivity&amp;summary=I%27ve%20been%20using%20Acegi%20Security%20in%20several%20projects%20with%20good%20results.%20It%27s%20powerful%20and%20flexible%21%20Sadly%2C%20sometimes%2C%20developers%20have%20problems%20when%20they%20want%20to%20customize%20it.%20The%20code%20is%20the%20best%20documentation%2C%20so%2C%20I%20recommend%20them%20to%20read%20the%20code%20and" title="LinkedIn"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Acegi%20Security%3A%20Custom%20Authentication%20-%20http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html" title="Twitter"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;t=Acegi%20Security%3A%20Custom%20Authentication" title="MySpace"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html&amp;title=Acegi%20Security%3A%20Custom%20Authentication&amp;body=I%27ve%20been%20using%20Acegi%20Security%20in%20several%20projects%20with%20good%20results.%20It%27s%20powerful%20and%20flexible%21%20Sadly%2C%20sometimes%2C%20developers%20have%20problems%20when%20they%20want%20to%20customize%20it.%20The%20code%20is%20the%20best%20documentation%2C%20so%2C%20I%20recommend%20them%20to%20read%20the%20code%20and" title="Ping.fm"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Acegi%20Security%3A%20Custom%20Authentication&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Farticle%2Facegi-security-custom-authentication.html" title="Slashdot"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.modlost.net/home/article/acegi-security-custom-authentication.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Core Security Patterns</title>
		<link>http://www.modlost.net/home/blog/core-security-patterns.html</link>
		<comments>http://www.modlost.net/home/blog/core-security-patterns.html#comments</comments>
		<pubDate>Wed, 02 Aug 2006 18:53:54 +0000</pubDate>
		<dc:creator>Abner</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.modlost.net/wordpress/?p=126</guid>
		<description><![CDATA[Title: Core Security Patterns Author(s): Christopher Steel, Ramesh Nagappan, Ray Lai Published: 2006 Edition: 1st Editorial: Prentice Hall I recommend this book for everyone who wants to know everything about security in Java applications. I like &#8220;Chapter 1: Security by Default&#8221; and &#8220;Chapter 2: Basics of Security&#8221;, they are a good introduction to security concepts. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Image" src="http://www.modlost.net/home/images/stories/books/csp.gif" border="0" alt="Image" hspace="6" width="381" height="502" /></p>
<table border="0">
<tbody>
<tr>
<td>Title:</td>
<td>Core Security Patterns</td>
</tr>
<tr>
<td>Author(s):</td>
<td>Christopher Steel, Ramesh Nagappan, Ray Lai</td>
</tr>
<tr>
<td>Published:</td>
<td>2006</td>
</tr>
<tr>
<td>Edition:</td>
<td>1st</td>
</tr>
<tr>
<td>Editorial:</td>
<td>Prentice Hall</td>
</tr>
</tbody>
</table>
<p><span id="more-126"></span></p>
<p>I recommend this book for everyone who wants to know everything about security in Java applications. I like &#8220;Chapter 1: Security by Default&#8221; and &#8220;Chapter 2: Basics of Security&#8221;, they are a good introduction to security concepts.</p>
<p>I found in this book a better way to express what I always think about the way some sysadmins take care of security,&#8230; they only pay attention to application security!</p>
<blockquote><p>Most security administrators focus on network and infrastructure security and tend to ignore application-specific and content-level vulnerabilities. This leads to application and content-level attacks suck as malicious code injection, cross-site scripting, XML attacks, and so on.</p></blockquote>
<p>It shows some interesting best practices and strategies to secure java applications and also web services. If you take care of security, you must buy this book.</p>




	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;title=Core%20Security%20Patterns&amp;bodytext=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0ACore%20Security%20Patterns%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AChristopher%20Steel%2C%20Ramesh%20Nagappan%2C%20Ray%20Lai%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2006%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0APrentice%20Hall%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AI%20recommend%20this%20book%20for%20everyone%20who%20wants%20to%20know%20everything%20abo" title="Digg"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;title=Core%20Security%20Patterns&amp;notes=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0ACore%20Security%20Patterns%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AChristopher%20Steel%2C%20Ramesh%20Nagappan%2C%20Ray%20Lai%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2006%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0APrentice%20Hall%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AI%20recommend%20this%20book%20for%20everyone%20who%20wants%20to%20know%20everything%20abo" title="del.icio.us"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;t=Core%20Security%20Patterns" title="Facebook"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;title=Core%20Security%20Patterns&amp;annotation=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0ACore%20Security%20Patterns%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AChristopher%20Steel%2C%20Ramesh%20Nagappan%2C%20Ray%20Lai%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2006%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0APrentice%20Hall%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AI%20recommend%20this%20book%20for%20everyone%20who%20wants%20to%20know%20everything%20abo" title="Google Bookmarks"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Core%20Security%20Patterns&amp;link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html" title="FriendFeed"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;title=Core%20Security%20Patterns&amp;source=Module+Lost+Thoughts+about+software+development+%26amp%3B+productivity&amp;summary=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0ACore%20Security%20Patterns%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AChristopher%20Steel%2C%20Ramesh%20Nagappan%2C%20Ray%20Lai%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2006%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0APrentice%20Hall%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AI%20recommend%20this%20book%20for%20everyone%20who%20wants%20to%20know%20everything%20abo" title="LinkedIn"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Core%20Security%20Patterns%20-%20http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html" title="Twitter"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;t=Core%20Security%20Patterns" title="MySpace"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html&amp;title=Core%20Security%20Patterns&amp;body=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0ACore%20Security%20Patterns%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AChristopher%20Steel%2C%20Ramesh%20Nagappan%2C%20Ray%20Lai%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2006%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0APrentice%20Hall%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AI%20recommend%20this%20book%20for%20everyone%20who%20wants%20to%20know%20everything%20abo" title="Ping.fm"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Core%20Security%20Patterns&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fcore-security-patterns.html" title="Slashdot"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.modlost.net/home/blog/core-security-patterns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploiting Software &#8211; How to break code</title>
		<link>http://www.modlost.net/home/blog/exploiting-software-how-to-break-code.html</link>
		<comments>http://www.modlost.net/home/blog/exploiting-software-how-to-break-code.html#comments</comments>
		<pubDate>Tue, 01 Aug 2006 18:56:11 +0000</pubDate>
		<dc:creator>Abner</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.modlost.net/wordpress/?p=130</guid>
		<description><![CDATA[Title: Exploiting Software &#8211; How to break code Author(s): Greg Hoglund, Gary McGraw Published: 2004 Edition: 1st Editorial: Addison Wesley What is the difference between Software Security and Application Security?, Do you want to know the answer? Read this book (page 44). Let&#8217;s talk about the book, I learned a lot of from this book, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Image" src="http://www.modlost.net/home/images/stories/books/eshtbc.gif" border="0" alt="Image" hspace="6" width="382" height="502" /></p>
<table border="0">
<tbody>
<tr>
<td>Title:</td>
<td>Exploiting Software &#8211; How to break code</td>
</tr>
<tr>
<td>Author(s):</td>
<td>Greg Hoglund, Gary McGraw</td>
</tr>
<tr>
<td>Published:</td>
<td>2004</td>
</tr>
<tr>
<td>Edition:</td>
<td>1st</td>
</tr>
<tr>
<td>Editorial:</td>
<td>Addison Wesley</td>
</tr>
</tbody>
</table>
<p><span id="more-130"></span></p>
<p>What is the difference between Software Security and Application Security?, Do you want to know the answer? Read this book (page 44).</p>
<p>Let&#8217;s talk about the book, I learned a lot of from this book, for example:</p>
<ul>
<li>The Trinity of Trouble</li>
<li>Software/Application Security</li>
<li>A lot oft Attack Patterns</li>
</ul>
<p>I recommend this book for everyone that wants to build secure software <img src='http://www.modlost.net/home/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Remember, everything is posible, hack the planet!</p>




	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;bodytext=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0AExploiting%20Software%20-%20How%20to%20break%20code%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AGreg%20Hoglund%2C%20Gary%20McGraw%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2004%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0AAddison%20Wesley%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWhat%20is%20the%20difference%20between%20Software%20Security%20and%20Application%20Se" title="Digg"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;notes=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0AExploiting%20Software%20-%20How%20to%20break%20code%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AGreg%20Hoglund%2C%20Gary%20McGraw%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2004%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0AAddison%20Wesley%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWhat%20is%20the%20difference%20between%20Software%20Security%20and%20Application%20Se" title="del.icio.us"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;t=Exploiting%20Software%20-%20How%20to%20break%20code" title="Facebook"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;annotation=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0AExploiting%20Software%20-%20How%20to%20break%20code%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AGreg%20Hoglund%2C%20Gary%20McGraw%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2004%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0AAddison%20Wesley%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWhat%20is%20the%20difference%20between%20Software%20Security%20and%20Application%20Se" title="Google Bookmarks"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.friendfeed.com/share?title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html" title="FriendFeed"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;source=Module+Lost+Thoughts+about+software+development+%26amp%3B+productivity&amp;summary=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0AExploiting%20Software%20-%20How%20to%20break%20code%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AGreg%20Hoglund%2C%20Gary%20McGraw%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2004%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0AAddison%20Wesley%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWhat%20is%20the%20difference%20between%20Software%20Security%20and%20Application%20Se" title="LinkedIn"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Exploiting%20Software%20-%20How%20to%20break%20code%20-%20http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html" title="Twitter"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;t=Exploiting%20Software%20-%20How%20to%20break%20code" title="MySpace"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html&amp;title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;body=%0D%0A%0D%0A%0D%0A%0D%0A%0D%0ATitle%3A%0D%0AExploiting%20Software%20-%20How%20to%20break%20code%0D%0A%0D%0A%0D%0AAuthor%28s%29%3A%0D%0AGreg%20Hoglund%2C%20Gary%20McGraw%0D%0A%0D%0A%0D%0APublished%3A%0D%0A2004%0D%0A%0D%0A%0D%0AEdition%3A%0D%0A1st%0D%0A%0D%0A%0D%0AEditorial%3A%0D%0AAddison%20Wesley%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AWhat%20is%20the%20difference%20between%20Software%20Security%20and%20Application%20Se" title="Ping.fm"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Exploiting%20Software%20-%20How%20to%20break%20code&amp;url=http%3A%2F%2Fwww.modlost.net%2Fhome%2Fblog%2Fexploiting-software-how-to-break-code.html" title="Slashdot"><img src="http://www.modlost.net/home/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.modlost.net/home/blog/exploiting-software-how-to-break-code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
