<?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>Core Security Patterns Weblog</title>
	<atom:link href="http://www.coresecuritypatterns.com/blogs/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.coresecuritypatterns.com/blogs</link>
	<description>Practical security facts and fun....off the record</description>
	<lastBuildDate>Thu, 23 Dec 2010 16:16:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Firesheep: HTTP Session Hijacking made so easy !</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=2121</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=2121#comments</comments>
		<pubDate>Sat, 30 Oct 2010 14:54:37 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Cloud Security]]></category>
		<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Junk 2.0]]></category>
		<category><![CDATA[InputValidation]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=2121</guid>
		<description><![CDATA[Way cool ! HTTP Session Hijacking can&#8217;t be made simpler than using Firesheep. Couple of days ago, a friend of mine suggested me to login a most popular website and he demonstrated how he took control and accessed my user session in less than a minute. First, I thought he used a network protocol analyser [...]]]></description>
			<content:encoded><![CDATA[<p>Way cool !  HTTP Session Hijacking can&#8217;t be made simpler than using <a href="http://codebutler.github.com/firesheep/">Firesheep</a>.  Couple of days ago, a friend of mine suggested me to login a most popular website and he demonstrated how he took control and accessed my user session in less than a minute.  First, I thought he used a network protocol analyser tool such as <a href="http://www.wireshark.org/">Wireshark</a> or sniffer to access my session information&#8230;but I was a bit surprised to see he used a simple and user friendly <a href="http://codebutler.github.com/firesheep/">Firefox plugin (Firesheep)</a> to steal and access my session information. Believe it or not &#8211; in an unsecured network,  <strong>Firesheep can easily capture active user session information exchanged with a Website that</strong><strong> uses clear-text/unencrypted HTTP communication and session ID cookies</strong><em> <strong>irrespective of their underlying Operating System and user&#8217;s Browser</strong>. </em>Ofcourse sending and receiving clear-text over HTTP has always posed a huge risk and compromising the session cookie allows impersonation&#8230;.. interestingly majority of us don&#8217;t care much till we become a victim  of a data loss !  Even the many popular social network websites still uses clear-text over HTTP.<br /></br><br /></br></p>
<p>With my first experience, Firesheep worked well on my Mac&#8230; capturing my Facebook and WordPress sessions running on a PC&#8230; so quick ! Not just Facebook sessions &#8211; if you are using an unsecured/clear network and accessing any unsecured web site (without SSL), Firesheep can act as a &#8220;Man-in-the-Middle&#8221; attacker who can comfortably capture, hijack and obtain unauthorized access to the currently active user&#8217;s HTTP session. Unfortunately, there is no silver bullet to thwart these attacks unless you are aware and avoid the risks of using unsecured networks and clear-text communication.<br /></br><br /></br><br />
<H3>Thwarting Firesheep !</H3></p>
<p><img class="alignleft" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2009/09/kssl.png" alt="" width="155" height="100" />If you are concerned about Firesheep attacks on the client side (user&#8217;s browser) then make sure to use a Secured VPN or Secure Shell (SSH) or IPSec or Encrypted WiFi (ex.WPA2) connection for accessing unsecured web applications. In case of accessing from unsecured networks, you may use <a title="Blacksheep" href="http://research.zscaler.com/2010/11/blacksheep-tool-to-detect-firesheep.html" target="_blank">Blacksheep</a> tool which helps to find out whether your user session is currently being captured by a rogue Firesheep user on the network. In case of accessing Facebook, you may consider using <a href="https://www.eff.org/https-everywhere">HTTPS Everywhere</a> a firefox extension that allows to rewrite Facebook requests and other HTTPS supported Websites.</p>
<p>On the server-side, if you are curious about securing your web application and user sessions from prying eyes&#8230;.here is some best practices that can help thwarting similar session hijacking attacks:<br /></br></p>
<ol>
<li>Use SSL/TLS communication to ensure encrypted transport between the user&#8217;s client and Web server.</li>
<li>Use encrypted session cookies and use encrypt/decryption mechanisms for setting and getting of cookie data.</li>
<li>Enable Hostname/IP address verification for all critical requests,  identify and compare the current user&#8217;s host with the originating user&#8217;s host in the user&#8217;s session cookie.</li>
</ol>
<p>If you are concerned about SSL/TLS overheads and looking for high-performance SSL/TLS acceleration solutions then refer to my previous entries..that would able to help you.<br /></br><br /></br></p>
<p>Goodluck.</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MjEyMQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=2121&amp;t=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=2121  Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=2121&t=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=2121&title=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=2121" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=2121&amp;title=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=2121&amp;title=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=2121&amp;title=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Firesheep: HTTP Session Hijacking made so easy !&amp;u=http://www.coresecuritypatterns.com/blogs/?p=2121" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=2121&amp;title=Firesheep: HTTP Session Hijacking made so easy !&amp;newcomment=Firesheep: HTTP Session Hijacking made so easy !" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=2121</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1918</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1918#comments</comments>
		<pubDate>Thu, 30 Sep 2010 12:58:31 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Identity Management]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[WS-Security]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1918</guid>
		<description><![CDATA[I&#8217;ve spent the last few days attending Oracle OpenWorld conference at San Francisco..it is my second OOW experience, so it is not a surprise to see the conference was fully packed with people, hundreds of sessions and demos &#8211; I did have an opportunity to attend few and also present two sessions focused on Security [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last few days attending Oracle OpenWorld conference at San Francisco..it is my second OOW experience, so it is not a surprise to see the conference was fully packed with people, hundreds of sessions and demos &#8211; I did have an opportunity to attend few and also present two sessions focused on Security topics featuring &#8220;Hardware Assisted Security Solution for SOA, XML Web Services and Java EE applications&#8221; &#8211; showcasing how &#8220;Hardware and Software Engineered together&#8221;.<br /></br><br /></br></p>
<p><a rel="attachment wp-att-1925" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=1925"><img class="alignleft size-full wp-image-1925" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/09/sparcT3cpu-for.web_.png" alt="" width="184" height="154" /></a>During the conference, John Fowler &#8211; Oracle EVP, Systems announced the industry&#8217;s first 16 core processor introducing new SPARC T3 systems with integrated security and virtualization capabilities. Each SPARC T3 processor features 16 on-chip cryptographic accelerators that deliver cryptographic operations running in parallel at CPU speeds and offloading compute-intensive cryptographic functions from software  &#8211; thus eliminating the need for additional special-purpose cryptographic accelerators such as PCIe cards or network appliances.  The cryptographic operation offload and acceleration is accomplished using dedicated cryptographic accelerator drivers, called the Niagara Crypto Provider (NCP), Niagara 2 Crypto Provider (N2CP) and Niagara 2 Random Number Generator (N2RNG).  In practice, the NCP and N2CP accelerators uses the Oracle Solaris Cryptographic Framework for enabling user-level applications to off-load cryptographic operations via PKCS#11 standard interfaces and take advantage of NCP and N2CP based on-chip cryptographic acceleration. The current UltraSPARC T3 processors provide acceleration support for public-key encryption mechanisms including RSA, DSA, DH and ECC algorithms,  symmetric key-based encryption amechanisms including DES, 3DES, AES and Kasumi algorthms and Message disgest/hashing mechanisms MD5, SHA1, SHA-256 and SHA-512 algorithms. The Solaris Cryptographic Framework (SCF) library plays a vital role for providing applications access to NCP and N2CP accelerators through a set of cryptographic services for kernel-level and user-level consumers. Using PKCS#11 interfaces of Solaris Cryptographic Framework, SOA and Java EE Applications (ex. Oracle Fusion Middleware, WebLogic, Glassfish, JBoss, Websphere)  can <!-- @font-face {   font-family: "SunSans-Regular"; }@font-face {   font-family: "Garamond"; }p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman"; }div.Section1 { page: Section1; } --> take advantage of NCP and N2CP based cryptography acceleration (Refer figure).<br /></br><br /></br></p>
<p><div id="attachment_1946" class="wp-caption aligncenter" style="width: 556px"><a rel="attachment wp-att-1946" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=1946"><img class="size-full wp-image-1946  " src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/09/SCF.png" alt="" width="546" height="429" /></a><p class="wp-caption-text">Hardware Assisted Cryptographic Acceleration using Solaris on UltraSPARC T3 Servers</p></div><br /></br><br /></br></p>
<h2>Cryptographic Acceleration for SOA and Java EE Security</h2>
<p></br><br />
Both SOA/XML Web services and Java EE based applications can significantly gain on security performance by offloading and delegating their cryptographic operations to the on-chip cryptographic accelerators of Oracle SPARC Enterprise T-Series servers.<br /></br><br /></br></p>
<h3>Applied Security Mechanisms and Usage Scenarios</h3>
<p></br><br />
To enhance security performance, both the Oracle WebLogic server and Oracle WSM secured applications can offload select cryptographic operations to address the following security scenarios.<br /></br><br /></br></p>
<ul>
<li><strong>Transport-layer Security</strong>
<ul>
<li>SSL/TLS acceleration offloads computationally intensive public-key cryptographic operations such as RSA, DH and ECC.</li>
<li>RMI over IIOP with SSL uses SSL/TLS to protect IIOP connections to RMI remote objects.</li>
</ul>
</li>
</ul>
<ul>
<li><strong>Message-Layer Security</strong>
<ul>
<li>Acceleration of cryptographic operations intended for supporting XML Web Services security standards such as WS-Security, WS-SecurityPolicy. XML Web services security relies on public-key encryption, digital signature (ex. RSA, DSA), bulk encryption (ex. AES, 3DES,DES) and message digest (ex. SHA-1, SHA-2, MD5) functions intended for supporting XML encryption, XML digital signature and related cryptographic operations.</li>
</ul>
</li>
</ul>
<p></br></p>
<h3>Performance Characteristics</h3>
<p></br><br />
Based on a performance study, Oracle&#8217;s SPARC Enterprise T3-1 server was  used to evaluate both SSL and WS-Security application performance of a SOA/XML Web Services application deployed on Oracle Fusion Middleware (WebLogic 10.3.3 and Oracle Web Services Manager).<br /></br><br /></br></p>
<ul>
<li> Enabling on-chip acceleration for SSL (Cipher suite using RSA-1024/AES-256) and WS-Security (Algorithm suite using Basic256Rsa15) usecases  solidly delivered between 2X &#8211; 3X overall application throughput performance gain  in comparison with SSL and WS-Security usecases running with no acceleration.</li>
<li>Using Oracle Solaris KSSL as an SSL proxy provided an additional performance gain of about 25-30%  outperforming WebLogic server SSL configured using Java SunPKCS11 provider for enabling cryptographic acceleration.</li>
</ul>
<p></br><br />
Now, you got the highlights,  if you are ready to dig deeper on the details and test-drive the solution &#8211; Please download and read the following two whitepapers (available from Oracle Technology network)  that explores the above solution from ground up.<br /></br></p>
<ul>
<li><a href="http://www.oracle.com/technetwork/articles/systems-hardware-architecture/security-weblogic-t-series-168447.pdf" target="_blank"> <strong>High Performance Security for Oracle Weblogic  Applications Using Oracle SPARC Enterprise T-Series Servers</strong></a> (external pdf)</li>
<li><a href="http://www.oracle.com/technetwork/articles/systems-hardware-architecture/hi-perf-soa-xml-svcs-172821.pdf" target="_blank"> <strong>High Performance Security for  SOA and XML Web Services Manager and Oracle SPARC Enterprise T-Series Servers</strong></a> (external pdf)</li>
</ul>
<p></br></p>
<p>If you are curious to see the <a href="http://www.slideshare.net/ramesh_r_nagappan/analysis-of-security-and-compliance-using-oracle-sparc-tseries-servers-emphasis-on-hardware-assisted-cryptography">OOW presentation &#8211; It is right here</a>.<br /></br><br /></br></p>
<p>Thanks to <a href="http://http://ws-security.blogspot.com/">Vikas Jain</a>, Nitin Handa and Chad Prucha for all the help and support on this effort.</p>
<p>Don&#8217;t forget to let me know, if you had any comments and suggestions.</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTkxOA==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1918&amp;t=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1918  Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1918&t=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1918&title=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1918" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1918&amp;title=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1918&amp;title=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1918&amp;title=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1918" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1918&amp;title=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications&amp;newcomment=Hardware Assisted Security: Cryptographic Acceleration for SOA and Java EE applications" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1918</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Cryptography on Intel Westmere: Solaris Advantage</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1827</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1827#comments</comments>
		<pubDate>Wed, 01 Sep 2010 01:44:52 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[WS-Security]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1827</guid>
		<description><![CDATA[When it comes to Java cryptography based application security &#8211;  Solaris has significant performance advantage over Linux and Windows on Intel Westmere processor equipped servers.  I am not debunking Linux performance on Intel but evidently Linux does not take advantage of Intel Westmere&#8217;s AES-NI instructions when the Java applications relies on Java cryptographic implementations  for performing AES encryption/decryption functions.  AES is one of the most [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left"><a rel="attachment wp-att-1829" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=1829"><img class="alignleft size-full wp-image-1829" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/10/javasecurity.png" alt="" width="71" height="87" /></a>When it comes to <strong><em>Java cryptography based application security &#8211;  Solaris has significant performance advantage over Linux and Windows</em></strong> on Intel Westmere processor equipped servers.  I am not debunking Linux performance on Intel but evidently Linux does not take advantage of Intel Westmere&#8217;s AES-NI instructions when the Java applications relies on Java cryptographic implementations  for performing AES encryption/decryption functions.  AES is one of the most popular symmetric-key encryption algorithm widely used in security transaction protocols (SSL/TLS, IPSEC),  Disk encryption,  Database encryption,  XML Web Services security standards (WS-Security) and so forth. If you are a Java  security enthusiast or a developer who is curious about Intel Westmere and Java security &#8211; here is some observations:</p>
<p></br><br /></br>
<p style="text-align: left"><a rel="attachment wp-att-1861" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=1861"><img class="alignright size-full wp-image-1861" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/09/Intel5600.gif" alt="" width="120" height="89" /></a>Intel introduced the new 32nm Westmere processors family (Xeon processor 5600 series) that incorporates  instructions for AES algorithm (AES-NI) to faster cryptographic applications that uses AES &#8211; a symmetric-key encryption standard.  AES is a block cipher, with a fixed block size of 128 bits that encrypts and decrypts data using multiple rounds where the number of rounds (10, 12, or 14) depends on the keysize (128, 192 or 256 bits). The Intel&#8217;s AES-NI implementation consists of seven new instructions for AES  algorithm - AESENC, AESENCLAST, AESDEC, AESDECLAST, CLMUL, AESIMC, and AESKEYGENASSIST to support performing computations for 10 (128 Bit), 12 (192 Bit), and 14 (256 Bit) rounds and most operational modes including ECB, CBC and CTR.  AES-NI accelerates AES based encryption/decryption operations in the CPU by offloading them from the software and eliminates its time spent in AES encryption/decryption functions. This means applications relying on AES algorithm can delegate its AES encryption/decryption functions to Intel&#8217;s AES-NI.  To enable applications make use of Intel AES-NI, it is critical that the applications must be recompiled to use Intel&#8217;s Integrated Performance Primitives (Intel IPP) library that contains functions and optimizations for achieving AES performance using AES-NI on Intel Westmere processors. Assuming the applications are recompiled and optimized to include Intel&#8217;s IPP library &#8211; applications can benefit from AES-NI features of Intel Westmere.</p>
<p></br></p>
<p><div class="wp-caption aligncenter" style="width: 450px"><img class=" " src="http://www.pcstats.com/articleimages/200902/32nm_11.jpg" alt="Intel Westmere - AES-NI (Source: pcsstats.com)" width="440" height="316" /><p class="wp-caption-text">Intel Westmere - AES-NI (Source: pcsstats.com)</p></div><br />
<br /></br><br />
<h2><strong>Java Security: The Solaris Advantage</strong></h2>
<p></br><br />
With the release of Solaris 10 Update 8 and above,  Solaris 10  introduced support for Intel AES-NI through integration with Solaris Cryptographic Framework (SCF).  As Solaris Cryptographic Framework acts as the intermediary for cryptographic operations, <strong>all applications relying on Solaris based PKCS#11 provider APIs, CLIs and Solaris kernel modules will automatically take advantage of AES-NI instructions for AES encryption and decryption</strong>. More importantly, with AES-NI integration -  Java SE/Java EE applications using JDK&#8217;s SunPKCS11 provider for supporting Java Cryptographic Extensions (JCE) and Java Secure Socket Extensions (JSSE),  applications using OpenSSL with Solaris PKCS11 and Mozilla NSS  with Solaris PKCS11 automatically use Intel AES-NI accelerating AES encryption/decryption operations on Solaris.<br /></br><br /></br></p>
<p>By default on Solaris, the Sun JDK and its JCE provider environment uses a Sun PKCS#11 implementation (SunPKCS11) that allows Java applications to access Solaris managed software/hardware cryptographic services. The SunPKCS11 provider is a Java based PKCS#11 implementation that integrates with underlying Solaris PKCS#11 implementations provided by the SCF and its exposed cryptographic providers (ex. Intel AES-NI). In a typical JDK installation on Solaris, the Java runtime environment is pre-configured to make use of the SunPKCS11 provider. To verify this refer to the Java security properties file located at $JAVA_HOME/jre/lib/security/java.security properties file and make sure it identifies SunPKCS11 as the default provider.<br /></br><br /></br></p>
<p style="text-align: center"><strong><em>security.provider.1=sun.security.pkcs11.SunPKCS11     ${java.home}/lib/security/sunpkcs11solaris.cfg</em></strong></p>
<p></br><br />
The $JAVA_HOME/jre/lib/security/sunpkcs11-solaris.cfg file contains the configuration information used by the SunPKCS11 provider for accessing the SCF.  To leverage AES-NI acceleration, it is important to enable and enforce delegation of the required cryptographic mechanisms to the underlying Solaris PKCS#11 provider that facilitates the AES-NI acceleration support. Make sure to include the required AES mechanisms (ex. CKM_AES) in the Java SunPKCS11 provider configuration file that lists as part of  enabledMechanisms  list or removes the mechanisms from the list of disabledMechanisms  of the Java SunPKCS11 configuration file. Doing so forces the required AES operations  performed by Intel AES-NI.<br /></br><br /></br></p>
<p>For SSL scenarios using AES for bulk encryption,  it is important that the Java application server&#8217;s SSL configuration is enforced to use <strong>TLS_*_AES*</strong> cipher suites (-<em>Dhttps</em>.<em>cipherSuites</em>=TLS_RSA_WITH_AES_256_CBC_SHA). For WS-Security scenarios using AES for XML Encryption scenarios, it is required to choose WS-SecurityPolicy using algorithm suite that includes AES ciphers. If the WS-SecurityPolicy specified algorithm suite is <strong>Basic256Rsa15</strong>, it uses Aes256 encryption and Rsa-oaep-mgf1p for key wrap. To enable acceleration, you need to remove the required bulk encryption algorithms in the disabledMechanisms list that forces those operations (ex. CKM_AES) performed by Intel AES-NI.</p>
<p></br><br /></br></p>
<p><H3>AES-NI Performance on Solaris for SSL and WS-Security</H3>
<p>As I tested on a Xeon 5660 based server, using AES-NI for securing Java EE applications and XML Web services on Solaris 10 Update 9 showed significant SSL and WS-Security performance gains on Solaris 10.  The SSL performance (RSA-1024/AES-256) showed 30% &#8211; 40% performance gain over not using AES-NI and WS-SecurityPolicy (using Basic256Rsa15) showed about 2X &#8211; 3X performance on XML encryption and decryption operations.  Certainly Java security applications has strong advantage while running on Solaris on Intel Westmere processor based servers.</p>
<p></br></p>
<p>I am not a performance guru&#8230;but in my opinion<strong> Java Cryptographic performance on Linux (Intel Westmere) has NO EFFECT</strong> as Linux lacks support for a software PKCS#11 provider that takes advantage of AES-NI.  If your Java applications has significant AES workloads then Solaris 10 is ideal choice on Intel Westmere based servers.</p>
<p></br><br /></br></p>
<p>Try it out and let me know your comments.</p>
<p></br></p>
<p><strong><br />
</strong></p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTgyNw==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1827&amp;t=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1827  Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1827&t=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1827&title=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1827" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1827&amp;title=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1827&amp;title=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1827&amp;title=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Java Cryptography on Intel Westmere: Solaris Advantage&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1827" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1827&amp;title=Java Cryptography on Intel Westmere: Solaris Advantage&amp;newcomment=Java Cryptography on Intel Westmere: Solaris Advantage" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1827</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1992</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1992#comments</comments>
		<pubDate>Tue, 15 Jun 2010 06:33:29 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Database Security]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[FIPS-140]]></category>
		<category><![CDATA[PCI-DSS]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1992</guid>
		<description><![CDATA[Hardware Security Module (HSM) plays a critical role in securing the storage of private keys and accelerating compute-intensive cryptographic processes associated with public-key encryption, symmetric-key(secret-key) encryption and digital signature applications. Using HSM in Oracle Transparent Data Encryption applications will ensure that the Key material stored on the card is protected and not exportable (never leaves [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2049" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=2049"><img class="size-medium wp-image-2049  alignleft" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/04/SCA-300x217.png" alt="" width="180" height="130" /></a>Hardware Security Module (HSM) plays a critical role in securing the storage of private keys and accelerating compute-intensive cryptographic processes associated with public-key encryption, symmetric-key(secret-key) encryption and digital signature applications. Using HSM in Oracle Transparent Data Encryption applications will ensure that the Key material stored on the card is protected and not exportable (never leaves the card) and all associated cryptographic operations are performed on the card. Using HSM in payment card transactions is critical and it is mandatory for compliance with <strong><em>Payment Card Industry &#8211; Data Security Standard (PCI-DSS), Payment Application &#8211; Data Security Standard (PA-DSS) and Health Insurance Portability and Accountability Act (HIPAA) privacy and security requirements</em></strong> and several government security standards.<br /></br><br /></br></p>
<h2>Oracle Transparent Data Encryption</h2>
<p></br></p>
<p style="text-align: justify">Oracle Transparent Data Encryption (TDE) was first introduced in Oracle Database 10gR2 as part of the Oracle Advanced Security option.  TDE performs encryption and decryption of application table columns or entire application tablespaces.  TDE uses standard algorithms and facilitates a built-in key management services for supporting data encryption. Since Oracle Database 11gR1, TDE supports HSMs using PKCS#11 interface to support providing centralized key management and to secure TDE&#8217;s master encryption key.</p>
<p></br><br /></br></p>
<h2>Sun Cryptographic Accelerator 6000 (SCA-6000)</h2>
<p></br><br />
The Sun Crypto Accelerator 6000 is a PCI-E card that combines a cryptographic accelerator for Secure Sockets Layer (SSL) and IPSec sessions and also it can act as a local HSM for performing secure key management functions. Qualified as a FIPS 140-2 Level 3 compliant device, the SCA-6000 PCI-E card is designed to prevent the disclosure or corruption of cryptographic keys, results, or other sensitive data. SCA-600o supports both Solaris and Linux environments.<br /></br><br /></br></p>
<h3>Applied Scenarios</h3>
<p></br></p>
<blockquote>
<ul>
<li><strong>HSM based Secure key store and Master Key Management for supporting encryption and decryption of keys</strong> performing actual data encryption:
<ol>
<strong>
<li>Encryption/decryption of tablespace keys and table keys</li>
<li>Encryption/decryption support for Oracle Data Pump utility</li>
<li>Encryption/decryption support for Oracle Recovery Manager (RMAN)</li>
<li>Master key backup and recovery</li>
<p></strong>
</ol>
</li>
<p>	<strong>
<li>FIPS-140-2 Level 3 compliance</li>
<p></strong></p>
<li>Acceleration of Network encryption -  SSL/TLS communication between the Oracle client and server.
<ul>
<li>Offloading computationally intensive cryptographic operations to the accelerator</li>
</ul>
</li>
</ul>
</blockquote>
<blockquote>
<div id="attachment_1997" class="wp-caption aligncenter" style="width: 580px"><a rel="attachment wp-att-1997" href="http://www.coresecuritypatterns.com/blogs/?attachment_id=1997"><img class="size-full wp-image-1997" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/04/SCA6k-TDE.png" alt="" width="570" height="227" /></a><p class="wp-caption-text">The Role of SCA-6000 as a HSM for Oracle TDE</p></div></blockquote>
<p></br><br /></br></p>
<p style="text-align: justify">If you are curious to know the configuration details and ready to test-drive the  solution using Sun Crypto Accelerator 6000 (SCA-6000) PCIe card for Oracle TDE – <a href="http://www.oracle.com/technetwork/articles/systems-hardware-architecture/adv-encryption-sca6000-163879.pdf">Please download and read the following whitepaper  (available from Sun Wiki)</a>.</p>
<p></br><br /></br><br />
Don&#8217;t forget to post your comments.</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTk5Mg==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1992&amp;t=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1992  Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1992&t=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1992&title=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1992" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1992&amp;title=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1992&amp;title=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1992&amp;title=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1992" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1992&amp;title=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)&amp;newcomment=Using Hardware Security Module (HSM) for Oracle Transparent Data Encryption (TDE)" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1992</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAML Attribute Exchange for X.509 Authentication based Identity Federation</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1699</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1699#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:49:22 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Identity Management]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Smartcards / PKI]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[OpenSSO]]></category>
		<category><![CDATA[PIV]]></category>
		<category><![CDATA[SAML]]></category>
		<category><![CDATA[Smartcards]]></category>
		<category><![CDATA[SPML]]></category>
		<category><![CDATA[WS-Security]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1699</guid>
		<description><![CDATA[In a typical Single Sign-On (SSO)/Federation scenario using SAML, the Service Provider (SP) initiates the user authentication request using SAML AuthnRequest assertion with an Identity Provider (IDP). The IDP authenticates the principal and returns a SAML AuthnStatement assertion response confirming the user authentication. If the user is successfully authenticated, the SP is required to have the subject&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>In a typical Single Sign-On (SSO)/Federation scenario using SAML, the Service Provider (SP) initiates the user authentication request using SAML <strong><em>AuthnRequest</em></strong> assertion with an Identity Provider (IDP). The IDP authenticates the principal and returns a SAML <em><strong>AuthnStatement</strong> </em>assertion response confirming the user authentication. If the user is successfully authenticated, the SP is required to have the subject&#8217;s profile attributes of the authenticated principal for making local authorization decisions. To obtain the subject&#8217;s profile attributes (ex. organization, email, role), the SP initiates a SAML <strong><em>AttributeQuery</em></strong> request with the target IDP.  The IDP returns a response SAML <strong><em>AttributeStatement</em></strong> assertion listing the name of the attributes and the associated values.  Using the subject&#8217;s profile attributes, the SP can perform authorization operations.</p>
<p> </p>
<p>Ofcourse, it looks simple&#8230;here is the complexity &#8211; Last two weeks I spent on building a Proof-of-Concept that conforms to <a href="http://www.idmanagement.gov/awg/documents/BackendArchitectureInterfaceSpec.pdf" target="_blank">HSPD-12 Back-end Attribute Exchange specifications</a> and <a href="http://www.oasis-open.org/committees/download.php/27766/sstc-saml-x509-authn-attrib-profile-cs-01.pdf">SAMLv2 Attribute Sharing Profile for X.509 Authentication based systems</a> (Both specifications are mandated as part of <a href="http://www.idmanagement.gov" target="_blank">Federal Identity, Credential and Access Management (ICAM)</a> initiative of <a href="http://www.cio.gov" target="_blank">Federal CIO Council</a>).  I had been experimenting with an Identity Federation scenario that makes use of Smartcard/PKI credentials &#8211; Card Authentication Key (CAK)/X.509 Certificate on a PIV card authenticates a PKI provider (using OCSP) and then using its X.509 credential attributes (Subject DN) for looking up off-card user attributes from an IDP (that acts as an Attribute Authority). The IDP provides the user profile attribute information to the requesting SP. In simpler terms, the SP initiated X.509 authentication directly  via OCSP request/response with a Certificate Validation Authority (VA) of a Certificate Authority (CA). Upon successful authentication, the SP  initiates a SAML AttributeQuery to the IDP (which acts as an Attribute Authority), the SAML AttributeQuery uses the <em>SubjectDN</em> of the authenticated principal from the X.509 certificate and requests the IDP to provide the subject&#8217;s user profile attributes.</p>
<p> </p>
<h3>Using Fedlet for SAML X.509 Authentication based Attribute Sharing</h3>
<p> </p>
<div id="attachment_1719" class="wp-caption aligncenter" style="width: 602px"><a href="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/02/samlattributequery.jpg"><img class="size-full wp-image-1719" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/02/samlattributequery.jpg" alt="" width="592" height="360" /></a><p class="wp-caption-text">SAML Attribute Exchange for X.509 based Authentication</p></div>
<p> </p>
<p><span style="Calibri,Verdana,Helvetica,Arial;"><span style="10.5pt;">Fedlet is a lightweight SAMLv2 based Service Provider (SP) implementation (currently part of Sun OpenSSO 8.x and <a href="http://blog.talkingidentity.com/2010/01/expanding-on-the-oracle-sun-idm-strategy.html" target="_blank">sooner to be available in Oracle Identity Federation</a>) for enabling</span></span> <span style="Calibri,Verdana,Helvetica,Arial;"><span style="10.5pt;">SAMLv2 based Single Sign-On environment. In simpler terms, Fedlet allows an Identity Provider (IDP) to enable an SP that need not have federation implemented. The SP plugs in the Fedlet to a Java/.NET web application and then ready to initiate SAML v2 based SSO authentication, authorization and attribute exchanges.  A Fedlet installed and configured with a SP can set up to use multiple IDPs where select IDPs can acts as Attribute Authorities. In this case, the Fedlet need to update its configuration with the IDP Metadata configuration (such as entity ID, IDP Meta Alias, Attribute Authority Meta Alias &#8211; same as IDP ). In addition, the Fedlets are capable of performing XML signature verification and decryption of responses from the IDP must identify the alias of signing and encryption certificates.</span></span></p>
<address></address>
<p>Here is the <a href="http://wikis.sun.com/display/OpenSSO/Configuring+the+OpenSSO+Express+8+Java+Fedlet+for+SAMLv2+Attribute+Query" target="_blank">quick documentation,</a> which I referred  for putting together the solution using Fedlets for SAMLv2 Attribute Sharing for X.509 based authentication scenarios. In case, if you want your Service Provider to use OpenSSO for PIV/CAC based certificate authentication, you may refer to my earlier entry on <a href="http://www.coresecuritypatterns.com/blogs/?p=644" target="_blank">Smartcard/PKI authentication based SSO (Using OpenSSO)</a>. Besides that you should be good to test-drive your excercise. Ofcourse, you can use Fedlets for Microsoft .NET service providers but it was&#8217;nt in my scope of work !</p>
<p> </p>
<p>In case of SP requiring to fetch multiple user profile attributes you may also choose to use SPML based queries (<a href="http://www.coresecuritypatterns.com/blogs/?tag=spml20">SPML Lookup/Update/Batch Request/Response</a>) to an Identity Manager (acting as Attribute Authority) &#8211; assuming it facilitates an SPML implementation). If you are looking for a solution that requires user profile attributes after a single-user X.509 authentication, then SAML Attribute query should help fetching a single user profile of an authenticated principal !<br />
 <img src='http://www.coresecuritypatterns.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTY5OQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1699&amp;t=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1699  SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1699&t=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1699&title=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1699" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1699&amp;title=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1699&amp;title=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1699&amp;title=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=SAML Attribute Exchange for X.509 Authentication based Identity Federation&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1699" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1699&amp;title=SAML Attribute Exchange for X.509 Authentication based Identity Federation&amp;newcomment=SAML Attribute Exchange for X.509 Authentication based Identity Federation" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1699</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bye, Bye, Sun&#8230;a new beginning at Oracle :-)</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1765</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1765#comments</comments>
		<pubDate>Wed, 27 Jan 2010 03:28:53 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1765</guid>
		<description><![CDATA[Life goes on&#8230; as everyone know by now, EU approved the Oracle&#8217;s Sun acquisition deal.   After my 10+ years long saga ending at Sun&#8230;..now I am pushed into Oracle (Sun + Oracle).  It looks like I will be doing the same job&#8230;.as always I continue my passion towards security and identity technologies&#8230; especially on Solaris and Sun systems [...]]]></description>
			<content:encoded><![CDATA[<p>Life goes on&#8230; as everyone know by now, EU approved the Oracle&#8217;s Sun acquisition deal.</p>
<p> </p>
<p>After my 10+ years long saga ending at Sun&#8230;..<strong><em>now I am pushed into Oracle (Sun + Oracle).</em></strong>  It looks like I will be doing the same job&#8230;.as always I continue my passion towards security and identity technologies&#8230; especially on Solaris and Sun systems (oops&#8230;Oracle servers)&#8230; maybe a bit more on Oracle software stack.</p>
<p> </p>
<p> </p>
<div class="wp-caption aligncenter" style="width: 479px"><img class="    " src="http://blogs.sun.com/jag/resource/SunRIP.jpg" alt="Sun Memorial by James Gosling" width="469" height="366" /><p class="wp-caption-text">Sun Memorial by James Gosling</p></div>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTc2NQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1765&amp;t=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1765  Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1765&t=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1765&title=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1765" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1765&amp;title=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1765&amp;title=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1765&amp;title=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1765" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1765&amp;title=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)&amp;newcomment=Bye, Bye, Sun&#8230;a new beginning at Oracle :-)" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1765</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web SSO with One-time Passwords via Mobile SMS and Email</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1669</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1669#comments</comments>
		<pubDate>Tue, 19 Jan 2010 04:01:03 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Identity Management]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Smartcards / PKI]]></category>
		<category><![CDATA[OpenSSO]]></category>
		<category><![CDATA[Smartcards]]></category>
		<category><![CDATA[SSO]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1669</guid>
		<description><![CDATA[With increasing incidents of online frauds through username/password compromises and stolen/forged identity credentials - Strong authentication using multi-factor credentials is often considered as a  defensive solution for ensuring high-degree of identity assurance to accessing  Web applications. Adopting multi-factor credentials based authentication has also become a most common security requirement for enabling access control to critical online banking transactions and to [...]]]></description>
			<content:encoded><![CDATA[<p>With increasing incidents of online frauds through username/password compromises and stolen/forged identity credentials - Strong authentication using multi-factor credentials is often considered as a  defensive solution for ensuring high-degree of identity assurance to accessing  Web applications. Adopting multi-factor credentials based authentication has also become a most common security requirement for enabling access control to critical online banking transactions and to safeguard online customer information  (Mandated by <a href="http://www.ffiec.gov/pdf/authentication_guidance.pdf" target="_blank">FFIEC authentication guidelines</a>). One-time Passwords using Tokens, USB dongles, Java Smartcards/SIM cards, Mobile Phones and other specialized devices has become the most simplest and effective option that can be easily adopted as the &#8220;second-factor credential (Something I have)&#8221; for strong authentication solution.   Although&#8230;and there is a myriad ways to create one-time passwords, the overwhelming developer issue is to make it to work by readily integrating it with existing applications and further enabling them for use in Web SSO and Federation scenarios.</p>
<p> </p>
<h2>One-time Password (OTP) Authentication using OpenSSO</h2>
<p> </p>
<p>The One-time password (OTP) is commonly generated on a physical device such as a token and is entered by the user at the time of authentication, once used it cannot be reused which renders it useless to anyone that may have intercepted it during the authentication process.</p>
<p><strong>Sun OpenSSO Enterprise 8.x</strong> offers a ready-to-use OTP based authentication module that allows to deliver <strong><em>One-time passwords via SMS (on Mobile phones) and Personal email</em></strong> or combination of both. OpenSSO implements <strong>Hashed Message Authentication Code (HMAC) based One-time password (HOTP)</strong> algorithm as defined in <a href="http://www.ietf.org/rfc/rfc4226.txt" target="_blank">RFC 4226 </a>- an IETF &#8211; OATH (Open Authentication) joint initiative. The HOTP is based on HMAC-SHA-1 algorithm - using an increasing 8-bit counter value and a static symmetric key that is known to the HOTP generator and validation service.  In a typical OpenSSO deployment, the HOTP authentication module is configured to work as part of an authentication chain that includes a first-factor authentication (ex. Username/Password authentication with LDAP, Datastore). This means that atleast one of the existing authentication must be performed successful before commencing HOTP authentication.</p>
<p> </p>
<h2>Try it yourself</h2>
<p>To deploy OTP for Web SSO authentication, all you would need is to have OpenSSO Enterprise 8.x and configured up and running&#8230;. and then follow these steps:</p>
<ol>
<li>Login to OpenSSO Administrator console, select the &#8220;Access Control&#8221; tab, select your default &#8220;Realm&#8221;, select &#8220;Authentication&#8221;. Click on &#8220;Module Instances&#8221; and click on &#8220;New&#8221; to create a Module instance. Assign a name to the module instance (ex. HOTP) and select &#8220;HOTP&#8221; as type.</li>
<li>Configure the HOTP authentication module properties.  You need to identify the values for Authentication Level, SMTP Server (Access credentials including host name, port, username, password), One-time password validity length (Maximun validity time valid since creation and before OTP expires), One-time Password length (6 or 8 digits), One-time Password Delivery (&#8220;SMS&#8221; or &#8220;Email&#8221; or &#8220;Both&#8221; to receive SMS and Email). 
<ul>
<li> 
<div id="attachment_1777" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/two-factor-1.png"><img class="size-full wp-image-1777" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/two-factor-1.png" alt="Configuring HOTP Authentication Module Properties" width="500" height="255" /></a><p class="wp-caption-text">Configuring HOTP Authentication Module Properties</p></div>
<p> </li>
</ul>
</li>
<li>Configure an Authentication Chain that includes HOTP authentication module with any other authentication module (ex. Datastore, LDAP). You may note HOTP authentication cannot act as primary authentication since it HOTP authentication does not identify the user profile, so it must be combined with an authentication module that identifies the calling user identity. To create an authentication chain&#8230; goto the OpenSSO administrator console, select &#8220;Access Control&#8221;, Goto &#8220;Authentication Chaining&#8221;, click on &#8220;New&#8221;, assign a name to the authentication chain (ex. Two-factor&#8221;) and the choose &#8220;HOTP&#8221; module instance and select &#8220;Required&#8221;.
<ul>
<li> 
<div id="attachment_1779" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/two-factor-2.png"><img class="size-full wp-image-1779" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/two-factor-2.png" alt="Configuring the Two-factor authentication chain including HOTP" width="500" height="136" /></a><p class="wp-caption-text">Configuring the Two-factor authentication chain including HOTP</p></div>
<p> </li>
</ul>
</li>
<li>Now the OpenSSO One-time Authentication Module is ready for use as par of &#8220;Two-factor&#8221; authentication chain.</li>
<li>Create an User Profile that identifies the user&#8217;s &#8220;Telephone Number&#8221; attribute with the Mobile Phone Number appended with the SMS Gateway domain.
<ul>
<li>For example:
<ul>
<li>AT&amp;T (USA) :  <a href="mailto:YourPhoneNumber@txt.att.net">YourPhoneNumber@txt.att.net</a>  (<a href="mailto:178199931234@txt.att.net">178199931234@txt.att.net</a>)</li>
<li>SprintPCS   :   <a href="mailto:YourPhoneNumber@messaging.sprintpcs.com">YourPhoneNumber@messaging.sprintpcs.com</a></li>
<li>T-Mobile  :     <a href="mailto:YourPhoneNumber@tmomail.net">YourPhoneNumber@tmomail.net</a></li>
<li>Virgin Mobile:  <a class="moz-txt-link-abbreviated" href="mailto:YourPhoneNumber@vmobl.com">YourPhoneNumber@vmobl.com</a></li>
<li>Verizon: <a class="moz-txt-link-abbreviated" href="mailto:YourPhoneNumber@vtext.com">YourPhoneNumber@vtext.com</a></li>
<li>Metro PCS: <a class="moz-txt-link-abbreviated" href="mailto:YourPhoneNumber@MyMetroPcs.com">YourPhoneNumber@MyMetroPcs.com</a></li>
<li>For a complete list of Email to SMS Gateways refer to: <a href="http://www.mutube.com/projects/open-email-to-sms/gateway-list/">http://www.mutube.com/projects/open-email-to-sms/gateway-list/</a></li>
</ul>
</li>
</ul>
</li>
<li> Test drive the configured One-time Password based SSO authentication, by accessing the URL of the configured &#8220;Two-factor&#8221; authentication chain as follows:
<ul>
<li><a href="http://openssoserver:port/opensso/UI/Login?service=Two-factor">http://openssoserver:port/opensso/UI/Login?service=Two-factor</a></li>
</ul>
</li>
<li>As a result, you will be prompted to perform username/password authentication and then followed by HOTP. To deliver One-Time Password, click &#8220;Request OTP Code&#8221;, the One-time password will be delivered to your Mobile via SMS and also via email (provided in your User profile).
<ul>
<li>
<p style="center;">
<div id="attachment_1782" class="wp-caption aligncenter" style="width: 570px"><a href="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/hotp.png"><img class="size-full wp-image-1782   " src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/hotp.png" alt="One-time Password based SSO" width="560" height="284" /></a><p class="wp-caption-text">One-time Password based SSO</p></div>
</li>
<li>As verified using my Blackberry&#8230;the OTP showed up as follows:    <a href="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/blackberry.jpg"><img class="size-full wp-image-1785 aligncenter" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/03/blackberry.jpg" alt="" width="442" height="332" /></a></li>
</ul>
</li>
</ol>
<p>  </p>
<p>Adopting to One-time Pasword based authentication credentials certainly<span style="#000000;"> </span>helps to defend against many illegitimate access using compromised user credentials such as Passwords, PIN and Digital certificates.  Using OpenSSO based OTP authentication is just a no-brainer&#8230; try it for yourselves, I am sure you will enjoy !</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTY2OQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1669&amp;t=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1669  Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1669&t=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1669&title=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1669" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1669&amp;title=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1669&amp;title=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1669&amp;title=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Web SSO with One-time Passwords via Mobile SMS and Email&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1669" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1669&amp;title=Web SSO with One-time Passwords via Mobile SMS and Email&amp;newcomment=Web SSO with One-time Passwords via Mobile SMS and Email" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1669</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Secure Java Coding Guidelines v3.0</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1655</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1655#comments</comments>
		<pubDate>Sat, 09 Jan 2010 02:36:06 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[securitypatterns]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1655</guid>
		<description><![CDATA[When it comes to application security,  Secure coding is the first line of defense&#8230;.and it is very critical to follow the best practice patterns and avoid pitfalls to secure the application from known risks and vulnerabities. The Java Security team has just released the updated &#8211; &#8220;Secure Coding Guidelines for the Java Programming Language, Version 3.0&#8220; .  Certainly it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://java.sun.com/security/seccodeguide.html"><img class="alignleft size-medium wp-image-1643" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/01/javasecurity.png" alt="" width="94" height="116" /></a>When it comes to application security,  Secure coding is the first line of defense&#8230;.and it is very critical to follow the best practice patterns and avoid pitfalls to secure the application from known risks and vulnerabities. The Java Security team has just released the updated &#8211; &#8220;<a href="http://java.sun.com/security/seccodeguide.html" target="_blank"><strong><span style="#ff0000;">Secure Coding Guidelines for the Java Programming Language, Version 3.0</span></strong></a>&#8220; .  Certainly it included a newer set of fundamentals and enhanced set of secure coding guidelines.  </p>
<p> A must have URL for your <a href="http://java.sun.com/security/seccodeguide.html" target="_blank">quick reference</a>&#8230;if you are a security conscious developer !</p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTY1NQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1655&amp;t=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1655  Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1655&t=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1655&title=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1655" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1655&amp;title=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1655&amp;title=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1655&amp;title=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Secure Java Coding Guidelines v3.0&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1655" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1655&amp;title=Secure Java Coding Guidelines v3.0&amp;newcomment=Secure Java Coding Guidelines v3.0" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1655</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java EE 6: Web Application Security made simple !</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1622</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1622#comments</comments>
		<pubDate>Thu, 31 Dec 2009 21:02:45 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Java Security]]></category>
		<category><![CDATA[Main]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[JSP]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1622</guid>
		<description><![CDATA[Java EE 6 RI was released few weeks ago&#8230;.I am bit late to have my first look   Without a doubt, the new Web container security enhancements are very compelling for any budding or experienced Java developer working on Web applications. The Java EE 6 has unveiled several new security features with ease of use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.coresecuritypatterns.com/blogs"><img class="alignleft size-full wp-image-1643" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/01/javasecurity.png" alt="" width="118" height="145" /></a>Java EE 6 RI was released few weeks ago&#8230;.I am bit late to have my first look <img src='http://www.coresecuritypatterns.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   Without a doubt, the new Web container security enhancements are very compelling for any budding or experienced Java developer working on Web applications. The Java EE 6 has unveiled several new security features with ease of use and targetted for simplified Web application security deployments. Based on Servlet 3.0 specification, the Java EE 6 Web applications can take advantage of an enriched set of <strong>programmatic and declarative security features and Security annotations</strong> previously available to EJB 3.x applications. Also, the deployed Web applications/Web Services can use <strong>JSR-196 based pluggable authentication/authorization modules (based on SOAP Web Services) </strong>that can be configured as part of the Servlet container.</p>
<p> </p>
<h2> Java EE 6 : Programmatic Security for Web Applications</h2>
<p>The newly introduced Java EE 6 programmatic security features for Web applications are represented by the following methods of <strong><em>HttpServletRequest</em></strong> interface:</p>
<p> </p>
<p><strong><em>1. authenticate()</em></strong></p>
<ul>
<li>This method helps to initiate authentication of the calling user by launching an authentication dialog for acquiring username/password and perform BASIC authentication by the container within an unconstrained request context.</li>
</ul>
<p style="60px">import java.io.*;<br />
import javax.servlet.*;<br />
import javax.servlet.http.*;
</p>
<p style="60px"> </p>
<p style="60px">public class MyAuthServlet extends HttpServlet {</p>
<p style="60px"> </p>
<p style="60px">protected void processRequest(HttpServletRequest request, HttpServletResponse response)</p>
<p style="60px">                     throws ServletException, IOException {</p>
<p style="90px">            response.setContentType(&#8220;text/html;charset=UTF-8&#8243;);<br />
            PrintWriter out = response.getWriter();
</p>
<p style="60px">   try {</p>
<p style="90px">     //Launch the BASIC authentication dialog<br />
                request.authenticate(response);<br />
                     out.println(&#8220;Authenticate Successful&#8221;);
</p>
<p style="60px">            } finally {</p>
<p style="90px">                          out.close();</p>
<p style="60px">         }</p>
<p style="60px"> </p>
<p style="60px">          public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</p>
<p style="90px">                   processRequest(request, response);</p>
<p style="60px">        }</p>
<p style="60px"> </p>
<p style="60px">           public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</p>
<p style="90px">                processRequest(request, response);</p>
<p style="60px">          }</p>
<p style="60px">}</p>
<p> </p>
<p> </p>
<p><strong><em>2. login() and logout ()</em></strong></p>
<ul>
<li>The login() method allows to programmatically collect with the provided username/password credentials (as an alternative to FORM-based authentication) and perform user authentication.</li>
<li>The logout() method performs logging out the user and resets the context.</li>
</ul>
<p style="60px"> <br />
import java.io.*;<br />
import javax.servlet.*;<br />
import javax.servlet.http.*;
</p>
<p style="60px"> </p>
<p style="60px">public class MySecurityServlet extends HttpServlet {</p>
<p style="60px"> </p>
<p style="60px">protected void processRequest(HttpServletRequest request, HttpServletResponse response)</p>
<p style="60px">                                                   throws ServletException, IOException {</p>
<p style="90px">   response.setContentType(&#8220;text/html;charset=UTF-8&#8243;);<br />
   PrintWriter out = response.getWriter();
</p>
<p style="60px">   try {</p>
<p style="90px">              String myUsername = request.getParameter(&#8220;UserName&#8221;);<br />
             String myPassword = request.getParameter(&#8220;Password&#8221;);
</p>
<p style="60px">           try {</p>
<p style="90px">                 <strong><em>request.login(myUsername, myPassword);</em></strong></p>
<p style="60px">                   } catch(ServletException ex) {</p>
<p style="90px">                            out.println(&#8220;Login Failed&#8221; + ex.getMessage());</p>
<p style="90px">              return;</p>
<p style="60px">     }</p>
<p style="60px">    }   catch (Exception e) {</p>
<p style="90px">                 throw new ServletException(e);</p>
<p style="60px">            } finally {</p>
<p style="90px">               <strong><em> request.logout();<br />
</em></strong>              out.close();
</p>
<p style="60px">             }</p>
<p style="60px">     }</p>
<p style="60px">      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</p>
<p style="90px">             processRequest(request, response);</p>
<p style="60px">        }</p>
<p style="60px">      public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</p>
<p style="90px">              processRequest(request, response);</p>
<p style="90px">      }</p>
<p style="60px">}</p>
<p style="60px"> </p>
<p>The above code assumes the authentication is configured to BASIC by setting the login-config element in web.xml. If the authentication is the successful, the Web application can take advantage of the following methods in the HttpServletRequest interface to identify the remote user, role attributes and to perform business logic decisions.</p>
<p> </p>
<p><strong><em>3. getRemoteUser()</em></strong></p>
<ul>
<li>Determines the authenticate username of the remote user associated with the request. If no authentication occured, it will return a null value.</li>
</ul>
<p><strong><em>4. IsUserInRole(..rolename..)</em></strong></p>
<ul>
<li>Determines whether the authenticated user is in a specified security role. If the user is not authenticated, it returns false.</li>
</ul>
<p><strong><em>5. getUserPrincipal()</em></strong></p>
<ul>
<li>Determines the principal name that represents the authenticated user entity (name of the remote user) and returns a java.security.Principal object corresponding to the user.</li>
</ul>
<p>Here is my sample code that I tested it on Glassfish v3 (Developer Sample):</p>
<p> </p>
<p> </p>
<p style="90px">import java.io.*;<br />
import javax.servlet.*;<br />
import javax.servlet.http.*;<br />
import javax.servlet.annotation.WebServlet;<br />
import javax.annotation.security.DeclareRoles;
</p>
<p style="90px"> </p>
<p style="90px">  //Annotation for defining the Servlet name and its URL pattern<br />
  @WebServlet(name=&#8221;MySecurityServlet&#8221;, urlPatterns={&#8220;/MySecurityServlet&#8221;})
</p>
<p style="90px"> </p>
<p style="90px">  // Annotation for declaring roles<br />
   @DeclareRoles(&#8220;securityguy&#8221;)
</p>
<p style="90px">public class MySecurityServlet extends HttpServlet {</p>
<p style="90px"> </p>
<p style="90px">              protected void processRequest(HttpServletRequest request, HttpServletResponse response) </p>
<p style="90px">                                   throws ServletException, IOException {</p>
<p style="90px"> </p>
<p style="120px">                                     response.setContentType(&#8220;text/html;charset=UTF-8&#8243;);<br />
                                     PrintWriter out = response.getWriter();
</p>
<p style="90px">               try {</p>
<p style="120px">                                    String myUsername = request.getParameter(&#8220;UserName&#8221;);<br />
                                    String myPassword = request.getParameter(&#8220;Password&#8221;);
</p>
<p style="90px">              try {</p>
<p style="90px">                                   request.login(myUsername, myPassword);</p>
<p style="90px">                                  }      catch(ServletException ex) {</p>
<p style="90px">                                   out.println(&#8220;Login Failed&#8221; + ex.getMessage());</p>
<p style="90px">                                   return;</p>
<p style="90px">                   }</p>
<p style="120px">                                              out.println(&#8220;The authenticated user is in Role: &#8221; + request.isUserInRole(&#8220;securityguy&#8221;));<br />
                                              out.println(&#8220;The authenticated remote username: &#8221; + request.getRemoteUser());<br />
                                             out.println(&#8220;The authenticated Principal name: &#8221; + request.getUserPrincipal());<br />
                                             out.println(&#8220;The authentication type: &#8221; + request.getAuthType());
</p>
<p style="90px">                   } catch (Exception e) {</p>
<p style="120px">                                  throw new ServletException(e);</p>
<p style="90px">                }  finally {</p>
<p style="120px">                                request.logout();</p>
<p style="120px">                                out.close();</p>
<p style="90px">             }</p>
<p style="90px">   }</p>
<p style="90px">       public void doGet(HttpServletRequest request, HttpServletResponse response)  throws ServletException, IOException {</p>
<p style="120px">                    processRequest(request, response);</p>
<p style="120px">        }</p>
<p style="90px">        public void doPost(HttpServletRequest request, HttpServletResponse response)  throws ServletException, IOException {</p>
<p style="120px">                   processRequest(request, response);</p>
<p style="120px">      }</p>
<p style="90px">}<br />
 </p>
<p>To test the code, it is assumed that you have the Java EE runtime deployment descriptor include the appropriate role mapping that associated the user with the specified role-name.</p>
<p> </p>
<h2>Security Annotations for the Web Applications</h2>
<p>With Servlet 3.0 implementation, we would able to use standard Java annotations for declaring security constraints as equivalent to those defined in a standard Web deployment descriptor (web.xml). With Security annotation you should able to define roles, access control to HTTP methods, transport-layer protection (for enforcing SSL/TLS). To make use of security annotations in Servlets, Servlet 3.0 has introduced <strong>@ServletSecurity</strong> annotation to support defining security constraints.</p>
<p> </p>
<h3>Using @ServletSecurity</h3>
<p> </p>
<p>The @ServletSecurity annotation allows to define the security constraints as its fields:</p>
<ol>
<li>@HttpConstraint  &#8211; Used as a field of @ServletSecurity to specify roles to all methods and ensure transport-layer security)
<ul>
<li>ex.  <span style="#000000;">@ServletSecurity(@HttpConstraint(rolesAllowed={&#8220;customer&#8221;})) - Ensures all HTTP methods (GET, POST, TRACE) are protected and access is allowed to security role &#8220;customer&#8221;.</span></li>
<li>ex. @ServletSecurity(@HttpConstraint(transportGuarantee=ServletSecurity.TransportGuarantee.CONFIDENTIAL)) &#8211; Ensures all methods require SSL transport</li>
</ul>
</li>
<li>@HttpMethodConstraint (Applied to define methods ex. GET, POST, TRACE)
<ul>
<li>ex. ServletSecurity(value=@HttpConstraint(httpMethodConstraints={ @HttpMethodConstraint(value=&#8221;POST&#8221;, transportGuarantee=ServletSecurity.TransportGuarantee.NONE, rolesAllowed={&#8220;customer&#8221;}) })  &#8211; Ensures only authenticated users with security role is allowed to access HTTP POST method and transport-layer security/SSL is supported but not required.</li>
</ul>
</li>
<li>@DeclareRoles (Allows to define security roles)</li>
<li>@RoleAllowed (Allows to define authorized roles)</li>
</ol>
<p>Here is a quick usage scenario of @ServletSecurity annotation (Developer Sample):</p>
<pre> import java.io.*;</pre>
<pre> import javax.servlet.*;</pre>
<pre> import javax.servlet.http.*;</pre>
<pre> import javax.annotation.security.*;</pre>
<pre><strong> @DeclareRoles("customer","guest")</strong></pre>
<pre><strong> @ServletSecurity(@HttpConstraint(rolesAllowed={"customer"}))</strong></pre>
<pre> public class MyHelloWorld extends HttpServlet {</pre>
<pre>     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</pre>
<pre>    PrintWriter out = response.getWriter();</pre>
<pre>    out.println("Hello World");</pre>
<pre>  }</pre>
<pre>  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {</pre>
<pre>    response.setContentType("text/html");</pre>
<pre>    PrintWriter out = response.getWriter();</pre>
<pre>     out.println("Hello World");</pre>
<pre>     out.close();</pre>
<pre>  }</pre>
<pre>}<strong>  </strong></pre>
<pre> </pre>
<p>Sometimes, it’s the small things that make even complex things much easier. Way to go&#8230;Java EE 6 ! </p>
<p> </p>
<p>Here is couple of references, you may consider to explore Java EE 6:</p>
<p><a href="http://java.sun.com/developer/technicalArticles/JavaEE/JavaEE6Overview.html" target="_blank">Java EE 6: New Enhancements</a></p>
<p><a href="https://glassfish-samples.dev.java.net/source/browse/*checkout*/glassfish-samples/ws/javaee6/docs/list.html" target="_blank">Glassfish v3/Java EE 6 Sample Applications</a></p>
<p> </p>
<p>Enjoy <img src='http://www.coresecuritypatterns.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTYyMg==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1622&amp;t=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1622  Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1622&t=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1622&title=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1622" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1622&amp;title=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1622&amp;title=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1622&amp;title=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Java EE 6: Web Application Security made simple !&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1622" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1622&amp;title=Java EE 6: Web Application Security made simple !&amp;newcomment=Java EE 6: Web Application Security made simple !" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1622</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Drone video feeds got eavesdropped ?</title>
		<link>http://www.coresecuritypatterns.com/blogs/?p=1651</link>
		<comments>http://www.coresecuritypatterns.com/blogs/?p=1651#comments</comments>
		<pubDate>Sun, 20 Dec 2009 13:34:59 +0000</pubDate>
		<dc:creator>Ramesh</dc:creator>
				<category><![CDATA[PKI]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.coresecuritypatterns.com/blogs/?p=1651</guid>
		<description><![CDATA[Interesting news..I am not sure how far this story is true !  The Iraqi insurgents has used the SkyGrabber utility to eavesdrop the live video feeds from the US Drones&#8230;as reported by Wallstreet journal yesterday.  Quite interesting to note, the multi-million dollar unmanned aircraft did&#8217;nt use &#8220;Encrypted Communication&#8221; in first place. It&#8217;s time for them [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting news..I am not sure how far this story is true !  The Iraqi insurgents has used the SkyGrabber utility to eavesdrop the live video feeds from the US Drones&#8230;as reported by Wallstreet journal yesterday.  Quite interesting to note, the multi-million dollar unmanned aircraft did&#8217;nt use &#8220;Encrypted Communication&#8221; in first place.</p>
<p style="text-align: center"><a href="http://news.cnet.com/8301-1009_3-10417247-83.html"><img class="size-medium wp-image-1652  aligncenter" src="http://www.coresecuritypatterns.com/blogs/wp-content/uploads/2010/01/usdroneshacked-271x300.png" alt="" width="271" height="300" /></a></p>
<p>It&#8217;s time for them to deploy a tamper-proof encrypted communication for ensuring high-degree of confidentiality and integrity&#8230;without compromising the performance, so a wire-speed cryptography solution might help..as posted in <a href="http://www.coresecuritypatterns.com/blogs/?p=1556" target="_blank">my previous entry</a></p>
<p> <img src='http://www.coresecuritypatterns.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<!-- Begin WP-Social-Bookmarking -->
<div class="WP-Social-Bookmarking"> 
<a href="http://www.onlinerel.com/sfeed/?f=aHR0cDovL3d3dy5jb3Jlc2VjdXJpdHlwYXR0ZXJucy5jb20vYmxvZ3MvP3A9MTY1MQ==&l=en-US" target="_blank" title="Onlinerel"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/onlinerel.png" style="width:24px;height:24px;border:0px;" alt="Onlinerel" title="Onlinerel" /></a>
<a href="http://facebook.com/sharer.php?u=http://www.coresecuritypatterns.com/blogs/?p=1651&amp;t=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Facebook"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/facebook.png" style="width:24px;height:24px;border:0px;" alt="Facebook" title="Facebook" /></a>
<a href="http://twitter.com/home?status=http://www.coresecuritypatterns.com/blogs/?p=1651  Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Twitter"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/twitter.png" style="width:24px;height:24px;border:0px;" alt="Twitter" title="Twitter" /></a>
<a href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.coresecuritypatterns.com/blogs/?p=1651&t=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Myspace"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/myspace.png" style="width:24px;height:24px;border:0px;" alt="Myspace" title="Myspace" /></a>
<a href="http://friendfeed.com/share?url=http://www.coresecuritypatterns.com/blogs/?p=1651&title=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Friendfeed"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/friendfeed.png" style="width:24px;height:24px;border:0px;" alt="Friendfeed" title="Friendfeed" /></a>
<a href="http://www.technorati.com/faves?add=http://www.coresecuritypatterns.com/blogs/?p=1651" target="_blank" rel="nofollow" title="Technorati"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/technorati.png" style="width:24px;height:24px;border:0px;" alt="Technorati" title="Technorati" /></a>
<a href="http://del.icio.us/post?url=http://www.coresecuritypatterns.com/blogs/?p=1651&amp;title=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="del.icio.us"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/delicious.png" style="width:24px;height:24px;border:0px;" alt="del.icio.us" title="del.icio.us" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http://www.coresecuritypatterns.com/blogs/?p=1651&amp;title=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Digg"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/digg.png" style="width:24px;height:24px;border:0px;" alt="Digg" title="Digg" /></a>
<a href="http://google.com/bookmarks/mark?op=add&amp;bkmk=http://www.coresecuritypatterns.com/blogs/?p=1651&amp;title=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="Google"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/google.png" style="width:24px;height:24px;border:0px;" alt="Google" title="Google" /></a>
<a href="http://buzz.yahoo.com/submit?submitUrl=Drone video feeds got eavesdropped ?&amp;u=http://www.coresecuritypatterns.com/blogs/?p=1651" target="_blank" rel="nofollow" title="Yahoo Buzz"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/yahoobuzz.png" style="width:24px;height:24px;border:0px;" alt="Yahoo Buzz" title="Yahoo Buzz" /></a>
<a href="http://stumbleupon.com/submit?url=http://www.coresecuritypatterns.com/blogs/?p=1651&amp;title=Drone video feeds got eavesdropped ?&amp;newcomment=Drone video feeds got eavesdropped ?" target="_blank" rel="nofollow" title="StumbleUpon"><img src="http://www.coresecuritypatterns.com/blogs/wp-content/plugins/wp-social-bookmarking/images/stumbleupon.png" style="width:24px;height:24px;border:0px;" alt="StumbleUpon" title="StumbleUpon" /></a>
</div><br /> <!-- End WP-Social-Bookmarking -->

]]></content:encoded>
			<wfw:commentRss>http://www.coresecuritypatterns.com/blogs/?feed=rss2&amp;p=1651</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

