<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kenneth+Kron</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kenneth+Kron"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Kenneth_Kron"/>
		<updated>2026-05-28T12:59:01Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Securing_tomcat&amp;diff=180981</id>
		<title>Talk:Securing tomcat</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Securing_tomcat&amp;diff=180981"/>
				<updated>2014-08-23T00:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InvokerServlet ==&lt;br /&gt;
There needs to be an addendum in here about disabling the InvokerServlet. See my blog entry at [[http://yet-another-dev.blogspot.com/2009/12/this-post-is-especially-for-anyone.html yet-another-dev.blogspot.com]] for details about why this is a bad idea. --[[User:Chris Schmidt|Chris Schmidt]] 22:03, 17 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== File permissions ==&lt;br /&gt;
&lt;br /&gt;
Hmm, what does &amp;quot;Make sure tomcat user has read/write access to /tmp&amp;quot; mean?  &lt;br /&gt;
&lt;br /&gt;
Tomcat creates a directory &amp;quot;temp&amp;quot;, not &amp;quot;tmp&amp;quot;, and read/write on a directory doesn't actually allow reading or writing.  I assume the intention is &amp;quot;chmod 700 temp&amp;quot;... would love if anyone can clarify.&lt;br /&gt;
[[User:Douglasheld|Douglasheld]] 18:06, 3 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Newer Tomcat branches ==&lt;br /&gt;
&lt;br /&gt;
This page is hopelessly outdated for anyone working with the Tomcat 6 branch.  We need to figure out the best way to document security measures for the different supported branches.&lt;br /&gt;
[[User:Ken|Ken]] 10:25, 20 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I've not had call to use Tomcat 6, but in a few months I plan to start experimenting with the embedded version.  I don't mind expanding the article to have a section on 6 (and keep the section on 5.5), but I can't contribute anything just yet.  My preference would be a single article as it will cut down on duplication.  In the meantime, any differences, areas to cover, new features, etc. that others could note down will help speed things up. [[User:Dledmonds|Darren]] 09:11, 26 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== HttpOnly configuration ==&lt;br /&gt;
&lt;br /&gt;
Tomcat versions from 5.5.28 and 6.0.19 support the HttpOnly [http://www.owasp.org/index.php/HttpOnly] cookie option.&lt;br /&gt;
&lt;br /&gt;
This is configured in the conf/context.xml file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Context useHttpOnly=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;/Context&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Simon Bennetts|Simon Bennetts]] 14:40, 18 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Overriding Tomcat Version Number ==&lt;br /&gt;
&lt;br /&gt;
Rebuilding the catalina.jar to alter ServerInfo.properties may not be an ideal way to override the version number, the same effect can be achieved without repackaging JARs in the default distribution (repackaging can be somewhat intrusive and/or impractical). Classloader classpaths can be patched using strategically placed files on the classpath. Classes that are loaded first always take precedence, the same goes for properties files, hence you can override by creating files in the following places:&lt;br /&gt;
&lt;br /&gt;
 # For Tomcat 5.5 (inject your new file onto the path of the server classloader):&lt;br /&gt;
 ${catalina.home}/server/classes/org/apache/catalina/util/ServerInfo.properties&lt;br /&gt;
&lt;br /&gt;
 # For Tomcat 6 (inject it onto the path of the common classloader, or whichever classloader is loading catalina.jar):&lt;br /&gt;
 ${catalina.home}/lib/org/apache/catalina/util/ServerInfo.properties&lt;br /&gt;
&lt;br /&gt;
In both cases, ${catalina.home} is typically either the root of your local installation, or your global installation if you are making use of disjoint installs using ${catalina.base} to provide instance-specific information.&lt;br /&gt;
&lt;br /&gt;
== autoDeploy feature ==&lt;br /&gt;
&lt;br /&gt;
Wouldn't it make sense to disable the autoDeploy feature in production environments for added security?&lt;br /&gt;
&lt;br /&gt;
[[User:Pierre Ernst|Pierre Ernst]] 2011-08-12&lt;br /&gt;
&lt;br /&gt;
== Disabling weak ciphers in Tomcat ==&lt;br /&gt;
&lt;br /&gt;
Copied from [https://support.comodo.com/index.php?_m=knowledgebase&amp;amp;_a=viewarticle&amp;amp;kbarticleid=1225]&lt;br /&gt;
&lt;br /&gt;
In order to disable weak ciphers, please modify your SSL Connector container attribute inside server.xml with the following information.&lt;br /&gt;
&lt;br /&gt;
 ciphers=&amp;quot;SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, &lt;br /&gt;
  SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Connector port=&amp;quot;443&amp;quot; maxHttpHeaderSize=&amp;quot;8192&amp;quot; address=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 enableLookups=&amp;quot;false&amp;quot; disableUploadTimeout=&amp;quot;true&amp;quot;&lt;br /&gt;
 acceptCount=&amp;quot;100&amp;quot; scheme=&amp;quot;https&amp;quot; secure=&amp;quot;true&amp;quot;&lt;br /&gt;
 clientAuth=&amp;quot;false&amp;quot; sslProtocol=&amp;quot;SSL&amp;quot;&lt;br /&gt;
 ciphers=&amp;quot;SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,   &lt;br /&gt;
  SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
 keystoreFile=&amp;quot;SomeDir/SomeFile.key&amp;quot; keystorePass=&amp;quot;Poodle&amp;quot;&lt;br /&gt;
 truststoreFile=&amp;quot;SomeDir/SomeFile.truststore&amp;quot; truststorePass=&amp;quot;HomeRun&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Psiinon]] 2011-10-06&lt;br /&gt;
&lt;br /&gt;
[[User:Dirk Wetter]] 2014-03-27 : Those ciphers were maybe ok in 2011, in 2014 I would not recommend using RC4 and CBC ciphers!&lt;br /&gt;
&lt;br /&gt;
==  No missing steps required in Tomcat 7 or 8 ==&lt;br /&gt;
I've done some research and as far as I can tell there are no recommended hardening steps for Tomcat 7 or 8 missing from this guide.&lt;br /&gt;
&lt;br /&gt;
http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html#Securing_Management_Applications&lt;br /&gt;
http://chandank.com/application-server/tomcat/apache-tomcat-hardening-and-security-guide&lt;br /&gt;
&lt;br /&gt;
The SSL Cipher list should be upgraded however:&lt;br /&gt;
http://www.sslshopper.com/article-how-to-disable-weak-ciphers-and-ssl-2-in-tomcat.html&lt;br /&gt;
&lt;br /&gt;
[[User:Kenneth Kron|Kenneth Kron]] ([[User talk:Kenneth Kron|talk]]) 16:56, 22 August 2014 (CDT)&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Securing_tomcat&amp;diff=180980</id>
		<title>Talk:Securing tomcat</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Securing_tomcat&amp;diff=180980"/>
				<updated>2014-08-22T21:56:48Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InvokerServlet ==&lt;br /&gt;
There needs to be an addendum in here about disabling the InvokerServlet. See my blog entry at [[http://yet-another-dev.blogspot.com/2009/12/this-post-is-especially-for-anyone.html yet-another-dev.blogspot.com]] for details about why this is a bad idea. --[[User:Chris Schmidt|Chris Schmidt]] 22:03, 17 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== File permissions ==&lt;br /&gt;
&lt;br /&gt;
Hmm, what does &amp;quot;Make sure tomcat user has read/write access to /tmp&amp;quot; mean?  &lt;br /&gt;
&lt;br /&gt;
Tomcat creates a directory &amp;quot;temp&amp;quot;, not &amp;quot;tmp&amp;quot;, and read/write on a directory doesn't actually allow reading or writing.  I assume the intention is &amp;quot;chmod 700 temp&amp;quot;... would love if anyone can clarify.&lt;br /&gt;
[[User:Douglasheld|Douglasheld]] 18:06, 3 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Newer Tomcat branches ==&lt;br /&gt;
&lt;br /&gt;
This page is hopelessly outdated for anyone working with the Tomcat 6 branch.  We need to figure out the best way to document security measures for the different supported branches.&lt;br /&gt;
[[User:Ken|Ken]] 10:25, 20 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I've not had call to use Tomcat 6, but in a few months I plan to start experimenting with the embedded version.  I don't mind expanding the article to have a section on 6 (and keep the section on 5.5), but I can't contribute anything just yet.  My preference would be a single article as it will cut down on duplication.  In the meantime, any differences, areas to cover, new features, etc. that others could note down will help speed things up. [[User:Dledmonds|Darren]] 09:11, 26 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== HttpOnly configuration ==&lt;br /&gt;
&lt;br /&gt;
Tomcat versions from 5.5.28 and 6.0.19 support the HttpOnly [http://www.owasp.org/index.php/HttpOnly] cookie option.&lt;br /&gt;
&lt;br /&gt;
This is configured in the conf/context.xml file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Context useHttpOnly=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;/Context&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Simon Bennetts|Simon Bennetts]] 14:40, 18 June 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Overriding Tomcat Version Number ==&lt;br /&gt;
&lt;br /&gt;
Rebuilding the catalina.jar to alter ServerInfo.properties may not be an ideal way to override the version number, the same effect can be achieved without repackaging JARs in the default distribution (repackaging can be somewhat intrusive and/or impractical). Classloader classpaths can be patched using strategically placed files on the classpath. Classes that are loaded first always take precedence, the same goes for properties files, hence you can override by creating files in the following places:&lt;br /&gt;
&lt;br /&gt;
 # For Tomcat 5.5 (inject your new file onto the path of the server classloader):&lt;br /&gt;
 ${catalina.home}/server/classes/org/apache/catalina/util/ServerInfo.properties&lt;br /&gt;
&lt;br /&gt;
 # For Tomcat 6 (inject it onto the path of the common classloader, or whichever classloader is loading catalina.jar):&lt;br /&gt;
 ${catalina.home}/lib/org/apache/catalina/util/ServerInfo.properties&lt;br /&gt;
&lt;br /&gt;
In both cases, ${catalina.home} is typically either the root of your local installation, or your global installation if you are making use of disjoint installs using ${catalina.base} to provide instance-specific information.&lt;br /&gt;
&lt;br /&gt;
== autoDeploy feature ==&lt;br /&gt;
&lt;br /&gt;
Wouldn't it make sense to disable the autoDeploy feature in production environments for added security?&lt;br /&gt;
&lt;br /&gt;
[[User:Pierre Ernst|Pierre Ernst]] 2011-08-12&lt;br /&gt;
&lt;br /&gt;
== Disabling weak ciphers in Tomcat ==&lt;br /&gt;
&lt;br /&gt;
Copied from [https://support.comodo.com/index.php?_m=knowledgebase&amp;amp;_a=viewarticle&amp;amp;kbarticleid=1225]&lt;br /&gt;
&lt;br /&gt;
In order to disable weak ciphers, please modify your SSL Connector container attribute inside server.xml with the following information.&lt;br /&gt;
&lt;br /&gt;
 ciphers=&amp;quot;SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, &lt;br /&gt;
  SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Connector port=&amp;quot;443&amp;quot; maxHttpHeaderSize=&amp;quot;8192&amp;quot; address=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 enableLookups=&amp;quot;false&amp;quot; disableUploadTimeout=&amp;quot;true&amp;quot;&lt;br /&gt;
 acceptCount=&amp;quot;100&amp;quot; scheme=&amp;quot;https&amp;quot; secure=&amp;quot;true&amp;quot;&lt;br /&gt;
 clientAuth=&amp;quot;false&amp;quot; sslProtocol=&amp;quot;SSL&amp;quot;&lt;br /&gt;
 ciphers=&amp;quot;SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, &lt;br /&gt;
  SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,   &lt;br /&gt;
  SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;br /&gt;
 keystoreFile=&amp;quot;SomeDir/SomeFile.key&amp;quot; keystorePass=&amp;quot;Poodle&amp;quot;&lt;br /&gt;
 truststoreFile=&amp;quot;SomeDir/SomeFile.truststore&amp;quot; truststorePass=&amp;quot;HomeRun&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Psiinon]] 2011-10-06&lt;br /&gt;
&lt;br /&gt;
[[User:Dirk Wetter]] 2014-03-27 : Those ciphers were maybe ok in 2011, in 2014 I would not recommend using RC4 and CBC ciphers!&lt;br /&gt;
&lt;br /&gt;
==  No missing steps required in Tomcat 7 or 8 ==&lt;br /&gt;
I've done some research and as far as I can tell there are no recommended hardening steps for Tomcat 7 or 8 missing from this guide.&lt;br /&gt;
&lt;br /&gt;
http://tomcat.apache.org/tomcat-7.0-doc/security-howto.html#Securing_Management_Applications&lt;br /&gt;
http://chandank.com/application-server/tomcat/apache-tomcat-hardening-and-security-guide&lt;br /&gt;
&lt;br /&gt;
[[User:Kenneth Kron|Kenneth Kron]] ([[User talk:Kenneth Kron|talk]]) 16:56, 22 August 2014 (CDT)&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Injection_Theory&amp;diff=152171</id>
		<title>Talk:Injection Theory</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Injection_Theory&amp;diff=152171"/>
				<updated>2013-05-23T19:26:55Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: Created page with &amp;quot;I was suprised to find the wikipedia definition of data flow to be substanially different than the one I commonly hear used in programming circles.    Data Flow:  (See [ http:...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I was suprised to find the wikipedia definition of data flow to be substanially different than the one I commonly hear used in programming circles.  &lt;br /&gt;
&lt;br /&gt;
Data Flow:&lt;br /&gt;
&lt;br /&gt;
(See [ http://en.wikipedia.org/wiki/Message_passing Wikipedia message passing]&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Message passing is the paradigm of communication where messages are sent from a sender to one or more recipients. Forms of messages include (remote) method invocation, signals, and data packets. When designing a message passing system several choices are made:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So from the above definition.&lt;br /&gt;
&lt;br /&gt;
Modern web based programming tends to take a lazy approach to messaging in that the raw message is generally passed from the http layer as far as possible.  In part this is because different parts of the application act on different messages and in order to maintain the stateless communication model of the web each message must contain enough context to complete the entire transaction.&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Java_Server_Faces&amp;diff=152167</id>
		<title>Java Server Faces</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Java_Server_Faces&amp;diff=152167"/>
				<updated>2013-05-23T17:53:31Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
Under review 10/3/2008&lt;br /&gt;
&lt;br /&gt;
==Web security.. before you start ==&lt;br /&gt;
&lt;br /&gt;
This document is about security in web applications developed using the Java Server Faces (JSF) framework. The reader should be aware of the meaning of common terms of both JSF (converters, validators, managed beans) and web security (injection etc.)&lt;br /&gt;
&lt;br /&gt;
==JSF Standards and roles==&lt;br /&gt;
JavaServer Faces (JSF) is a Java-based Web application framework that implements the Model-View-Controller pattern and simplifies the development of web interfaces for Java EE applications.&lt;br /&gt;
&lt;br /&gt;
In a standard MVC JSF are meant to provide the V (of view) and part of the C (of Control). JSF components can present almost any basic interface model. The framework also provides part of the Control layer including:&lt;br /&gt;
* Navigation Handling &lt;br /&gt;
* Error Handling &lt;br /&gt;
* Action and event Management &lt;br /&gt;
* Input validation &lt;br /&gt;
* Value conversion &lt;br /&gt;
These elements are defined by the JSF standard (JCP 127) so that any attacker will have knowledge of the architecture and life cycle of a JSF based application. JSF does not implement its own security model but instead relies on standard JEE security. This means that both application server security model, JAAS or other ACL implementations can be used with the JSF framework without any integration effort. But Access Control is just one part of security - all aspects should be implemented in a secure manner in order to consider the application itself secure.&lt;br /&gt;
&lt;br /&gt;
==Client-side state saving==&lt;br /&gt;
A JSF application can save the state of its components in the client response or on the server. Saving state on the client may be required because some users turn off cookies support, but it can increase response times when connections are slow. Saving state on the server may have the disadvantage of high memory consumption for the user, but it does minimize bandwidth requirements.&lt;br /&gt;
Since client-side state saving stores data in the client , it should be used wisely, or not used at all. An attacker that can manipulate a user's data could manage a data tampering or worst, a privilege escalation exploit. Unencrypted data is quite easy to manipulate and most of the client-side saved data are serialized Java objects  which can contain a wealth of sensitive data. If you plan to use client-side state saving carefully consider which information you decide to store in the POJO/DTO in order to minimise these risks.&lt;br /&gt;
==Components==&lt;br /&gt;
===Converters===&lt;br /&gt;
Converter could be a source of threat since it converts string in Java objects. An attacker could inject malicious code or tampered data to make the converter itself misbehave and expose protected data. The converter system is not insecure by itself, but conversion, since it is a security touch point for business logic and persistent data, should be handled carefully. Input should '''always''' be validated '''after''' being converted. In JSF lingo you should '''always''' have a validator if a conversion occurs. See next section on how to implement a security aware validator.&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
Validation is your chance to verify that the input is as expected. This means that the input should be validated both from a domain view and from a security view. If input represents a string that in your domain should be from 10 to 254 characters long, the same string should be validated also to prevent SQL Injection and XSS attacks. Since many security checks are done using dictionary algorithms it's useful to have a validator that implements those checks and extends it to implement your domain validator.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 public class TenToHundredsValidator extends SecureValidator() {&lt;br /&gt;
    public void validate(...) {&lt;br /&gt;
       &lt;br /&gt;
       super.validate(...); // Do security checks&lt;br /&gt;
       &lt;br /&gt;
       domainvalidate(....);&lt;br /&gt;
    }&lt;br /&gt;
 }          &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ManagedBeans===&lt;br /&gt;
Managed beans are the gears of JSF based application. Developers can access FacesContext statically and this is potentially dangerous. This is a common short cut for everything in the JSF layer, but manipulating this data could be harmful. Relying on security principals, and software engineering, is always a good approach.&lt;br /&gt;
Calls such as:&lt;br /&gt;
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameter(&amp;quot;name&amp;quot;)&lt;br /&gt;
are dangerous because the whole validation stack is bypassed. You can read parameters but consider them as tainted input. Use Validators described above also if you are not in the validation phase . Validators are also an effective way to refactor your validation code and to prevent code repetition.&lt;br /&gt;
FacesContext  also allows access to user principal data; this data could be used to verify if the current user can actually execute the business logic in the managed Bean.&lt;br /&gt;
This practice should be adopted in favour of rendering or not the commandLinks that lead to the action of the managed Bean. A structured adoption of an execution based security framework , such as ACEGI (see the Appendix), could be a good enforcement of the security of the  managed bean.&lt;br /&gt;
===Custom components===&lt;br /&gt;
If the use of custom components is required in the application, the security depends on how the components are developed. Third party components should be delivered with a security report and support from the specific vendor or community.&lt;br /&gt;
If you develop custom components you should be aware of the same old security issues of web development:&lt;br /&gt;
* Do not trust request parameter &lt;br /&gt;
* Do not trust cookies &lt;br /&gt;
* Always consider that session could be hijacked &lt;br /&gt;
Since the component tree is assembled server side it can be trusted so if your custom component needs to read data from a sibling component it should be considered a safe operation although you will have to make assumptions on element names of the tree.&lt;br /&gt;
&lt;br /&gt;
==Implementations==&lt;br /&gt;
Since more than one JSF Implementation exists, bugs of the implementation should be first on the security list.&lt;br /&gt;
&lt;br /&gt;
===MyFaces===&lt;br /&gt;
There aren't major or critical security bugs registered in the current stable release of MyFaces (1.1.5). Client state saving is still the weak point and should be used wisely. My Faces comes also with a Security Extension  (http://wiki.apache.org/myfaces/SecurityContext) that allows to safely and easily retrieve authenticated user details.&lt;br /&gt;
&lt;br /&gt;
The MyFaces resource filter could be a source of threat. It is designed to expose resources from a jar file and could therefore, be considered, potentially dangerous. Note there aren't any claimed security flaws nor exploits in the resource filter, but the nature of this component makes it a good target for attackers. Since all it has to do is serve data it is recommended that a dispatcher be added to the filter mapping element. This should lower the possibility of an attacker successfully manipulating the server request.&lt;br /&gt;
For more information see: http://myfaces.apache.org/tomahawk/extensionsFilter.html&lt;br /&gt;
&lt;br /&gt;
There is also an easy way to enable encryption when using ''client save state''&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;context-param&amp;gt;&lt;br /&gt;
        &amp;lt;param-name&amp;gt;org.apache.myfaces.secret&amp;lt;/param-name&amp;gt;&lt;br /&gt;
        &amp;lt;param-value&amp;gt;NzY1NDMyMTA=&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/context-param&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported encryption methods are BlowFish, 3DES, AES and are definde bya a context parameter&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;context-param&amp;gt;&lt;br /&gt;
        &amp;lt;param-name&amp;gt;org.apache.myfaces.algorithm&amp;lt;/param-name&amp;gt;&lt;br /&gt;
        &amp;lt;param-value&amp;gt;Blowfish&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/context-param&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find more info at http://wiki.apache.org/myfaces/Secure_Your_Application&lt;br /&gt;
&lt;br /&gt;
===SUN Reference Implementation===&lt;br /&gt;
Quoting from the documentation:&lt;br /&gt;
''There are several ways for a web application to store session state on the client tier. One possible solution is to use Cookies to store the state on the client. However, cookies have limitations in size and are not ideal in cases where you want to store session state on the client.  The state that needs to be stored on the client is first serialized into a byte array. This byte array is then encrypted using industrial-strength 3DES with cipher-block-chaining (CBC) and an initialization vector. To make the content tamper-resistant, we then create a message authentication code (using SHA1 algorithm) from the encrypted content and the initialization vector. The initialization vector, the message authentication code, and the encrypted content is then combined in a single byte array. Finally, this resulting byte array is converted into a base64 string which is stored in a hidden FORM field on the client.&lt;br /&gt;
This solution is secure because it uses a strong crypto algorithm and also uses a MAC for tamper-resistance. We also generate all the random numbers (for example, to generate the initialization vectors and the password) using the cryptographically-secure SecureRandom class. Note that the encryption keys are NEVER sent to the client or sent on the wire. These keys are used only on the server-side to encrypt and decrypt the state. One challenge is to decide what encryption keys to use. The encryption keys should not be known to the client, but still be associated with the client. We solve this problem by generating these keys from a password that is generated randomly and stored in the HttpSession. This strategy for key generation through password is pluggable in our solution and can be changed if needed.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ICE Faces===&lt;br /&gt;
&lt;br /&gt;
Starting from the idea that AJAX on Its Own Doesn't Corrupt Web Security ICE faces implements a component suite with ajax support by maintainig a continuous sync between the dom sent to the browser and a dom representation on the server. javascript is used to send commands to the server and invoke the logic in the java layer. Since dom model and javascript is involved a Javascript debugging  tool with value injection or dom injection capability could be of some use in pick locking the app.&lt;br /&gt;
&lt;br /&gt;
As stated in ICEFaces manual &amp;quot; the client is untrusted, SO DON'T TRUST IT!!&amp;quot; : it means that is up to the application designer to implement a robust security logic behind the scenes.&lt;br /&gt;
In another point of view the developer could focus on implementing server side security since with the server-side-dom architecture the thin client is even thinner.&lt;br /&gt;
&lt;br /&gt;
The component that refresh the two dom , called IntervalRenderer, uses  a persistent ServletRequest stored on the server. Unfortunately, this request does not contain sufficient information to perform the isUserInRole() check.&lt;br /&gt;
This kind of check is possible only on stadar render request phase. &lt;br /&gt;
&lt;br /&gt;
To address this, a small amount of integration will be required either between ICEfaces and acegi-security or ICEfaces and the application server.  Acegi-security (see appendix one ) is likely preferable as it will be more portable.&lt;br /&gt;
&lt;br /&gt;
==Apendix I==&lt;br /&gt;
&lt;br /&gt;
===ACEGI Integration===&lt;br /&gt;
&lt;br /&gt;
Acegi Security is a powerful, flexible security solution for enterprise software, with a particular emphasis on applications that use Spring. If used in combination with jsf, the managed beans could become more &amp;quot;security aware&amp;quot; since acegi do not only perform authentication but also authorization in business layer. Acegi is a convenient way to manage security in all the layers of our application. This is a valuable thing especially when authorization is strongly coupled with business logic (approval work flows etc).&lt;br /&gt;
&lt;br /&gt;
In order to use a custom JSF-Acegi login we have to provide a valid Security Context (''userName'' and ''password'' are properties of the managed bean)&lt;br /&gt;
&lt;br /&gt;
 UsernamePasswordAuthenticationToken authReq = new UsernamePasswordAuthenticationToken(userName, password);&lt;br /&gt;
 Authentication auth = getAuthenticationManager().authenticate(authReq);&lt;br /&gt;
 SecurityContext secCtx = SecurityContextHolder.getContext();&lt;br /&gt;
 secCtx.setAuthentication(auth);&lt;br /&gt;
&lt;br /&gt;
We can override the standard ACEGI navigation with custom, logic driven, navigation reading security context and routing the outcome.&lt;br /&gt;
&lt;br /&gt;
More information can be found at  here [http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ACEGI can be integrated also in the rendering via custom components [http://cagataycivici.wordpress.com/2006/01/19/acegi_jsf_components_hit_the/] which basically wrap the standard ACEGI tag library in JSF components. This conveniently solve the ''stage zero'' of profiling: display or not a widget in the page.&lt;br /&gt;
&lt;br /&gt;
Including a JSF based form for login in a page could be a little tricky, bu using MyFaces tomahawk components it can be done easely.&lt;br /&gt;
&lt;br /&gt;
The form will look like&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib uri=&amp;quot;http://myfaces.apache.org/tomahawk&amp;quot; prefix=&amp;quot;t&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;t:inputText id=&amp;quot;j_username&amp;quot; forceId=&amp;quot;true&amp;quot; value=&amp;quot;#{backingBean.customerId}&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/t:inputText&amp;gt;&lt;br /&gt;
 &amp;lt;t:inputSecret id=&amp;quot;j_password&amp;quot; forceId=&amp;quot;true&amp;quot; value=&amp;quot;#{backingBean.password}&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;80&amp;quot; redisplay=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/t:inputSecret&amp;gt;&lt;br /&gt;
 &amp;lt;h:commandButton action=&amp;quot;login&amp;quot; value=&amp;quot;#{messages.page_signon}&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;h:messages id=&amp;quot;messages&amp;quot; layout=&amp;quot;table&amp;quot; globalOnly=&amp;quot;true&amp;quot; showSummary=&amp;quot;true&amp;quot; showDetail=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A navigation rule to follow ACEGI requirements&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;navigation-rule&amp;gt;&lt;br /&gt;
        &amp;lt;from-view-id&amp;gt;/login.jsp&amp;lt;/from-view-id&amp;gt;&lt;br /&gt;
        &amp;lt;navigation-case&amp;gt;&lt;br /&gt;
                &amp;lt;from-outcome&amp;gt;login&amp;lt;/from-outcome&amp;gt;&lt;br /&gt;
                &amp;lt;to-view-id&amp;gt;/j_acegi_security_check.jsp&amp;lt;/to-view-id&amp;gt;&lt;br /&gt;
        &amp;lt;/navigation-case&amp;gt;&lt;br /&gt;
 &amp;lt;/navigation-rule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finaly ACEGI is told which page do the login&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean id=&amp;quot;formAuthenticationProcessingFilter&amp;quot; class=&amp;quot;org.acegisecurity.ui.webapp.AuthenticationProcessingFilter&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;property name=&amp;quot;filterProcessesUrl&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;/j_acegi_security_check.jsp&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;property name=&amp;quot;authenticationFailureUrl&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;/login.faces&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/property&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Java Project]]&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Java_Server_Faces&amp;diff=152166</id>
		<title>Java Server Faces</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Java_Server_Faces&amp;diff=152166"/>
				<updated>2013-05-23T17:50:15Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
Under review 10/3/2008&lt;br /&gt;
&lt;br /&gt;
==Web security.. before you start ==&lt;br /&gt;
&lt;br /&gt;
This document is about security in web applications developed using the Java Server Faces (JSF) framework. The reader should be aware of the meaning of common terms of both JSF (converters, validators, managed beans) and web security (injection etc.)&lt;br /&gt;
&lt;br /&gt;
==JSF Standards and roles==&lt;br /&gt;
JavaServer Faces (JSF) is a Java-based Web application framework that implements the Model-View-Controller pattern and simplifies the development of web interfaces for Java EE applications.&lt;br /&gt;
&lt;br /&gt;
In a standard MVC JSF are meant to provide the V (of view) and part of the C (of Control). JSF components can present almost any basic interface model. The framework also provides part of the Control layer including:&lt;br /&gt;
* Navigation Handling &lt;br /&gt;
* Error Handling &lt;br /&gt;
* Action and event Management &lt;br /&gt;
* Input validation &lt;br /&gt;
* Value conversion &lt;br /&gt;
These elements are defined by the JSF standard (JCP 127) so that any attacker will have knowledge of the architecture and life cycle of a JSF based application. JSF does not implement its own security model but instead relies on standard JEE security. This means that both application server security model, JAAS or other ACL implementations can be used with the JSF framework without any integration effort. But Access Control is just one part of security - all aspects should be implemented in a secure manner in order to consider the application itself secure.&lt;br /&gt;
&lt;br /&gt;
==Client-side state saving==&lt;br /&gt;
A JSF application can save the state of its components in the client response or on the server. Saving state on the client may be required because some users turn off cookies support, but it can increase response times when connections are slow. Saving state on the server may have the disadvantage of high memory consumption for the user, but it does minimize bandwidth requirements.&lt;br /&gt;
Since client-side state saving stores data in the client , it should be used wisely, or not used at all. An attacker that can manipulate a user's data could manage a data tampering or worst, a privilege escalation exploit. Unencrypted data is quite easy to manipulate and most of the client-side saved data are serialized Java objects  which can contain a wealth of sensitive data. If you plan to use client-side state saving carefully consider which information you decide to store in the POJO/DTO in order to minimise these risks.&lt;br /&gt;
==Components==&lt;br /&gt;
===Converters===&lt;br /&gt;
Converter could be a source of threat since it converts string in Java objects. An attacker could inject malicious code or tampered data to make the converter itself misbehave and expose protected data. The converter system is not insecure by itself, but conversion, since it is a security touch point for business logic and persistent data, should be handled carefully. Input should '''always''' be validated '''after''' being converted. In JSF lingo you should '''always''' have a validator if a conversion occurs. See next section on how to implement a security aware validator.&lt;br /&gt;
&lt;br /&gt;
===Validators===&lt;br /&gt;
Validation is your chance to verify that the input is as expected. This means that the input should be validated both from a domain view and from a security view. If input represents a string that in your domain should be from 10 to 254 characters long, the same string should be validated also to prevent SQL Injection and XSS attacks. Since many security checks are done using dictionary algorithms it's useful to have a validator that implements those checks and extends it to implement your domain validator.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 public class TenToHundredsValidator extends SecureValidator() {&lt;br /&gt;
    public void validate(...) {&lt;br /&gt;
       &lt;br /&gt;
       super.validate(...); // Do security checks&lt;br /&gt;
       &lt;br /&gt;
       domainvalidate(....);&lt;br /&gt;
    }&lt;br /&gt;
 }          &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ManagedBeans===&lt;br /&gt;
Managed beans are the gears of JSF based application. Developers can access FacesContext statically and this is potentially dangerous. This is a common short cut for everything in the JSF layer, but manipulating this data could be harmful. Relying on security principals, and software engineering, is always a good approach.&lt;br /&gt;
Calls such as:&lt;br /&gt;
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameter(&amp;quot;name&amp;quot;)&lt;br /&gt;
are dangerous because the whole validation stack is bypassed. You can read parameters but consider them as tainted input. Use Validators described above also if you are not in the validation phase . Validators are also an effective way to refactor your validation code and to prevent code repetition.&lt;br /&gt;
FacesContext  also allows access to user principal data; this data could be used to verify if the current user can actually execute the business logic in the managed Bean.&lt;br /&gt;
This practice should be adopted in favour of rendering or not the commandLinks that lead to the action of the managed Bean. A structured adoption of an execution based security framework , such as ACEGI (see the Appendix), could be a good enforcement of the security of the  managed bean.&lt;br /&gt;
===Custom components===&lt;br /&gt;
If the use of custom components is required in the application, the security depends on how the components are developed. Third party components should be delivered with a security report and support from the specific vendor or community.&lt;br /&gt;
If you develop custom components you should be aware of the same old security issues of web development:&lt;br /&gt;
* Do not trust request parameter &lt;br /&gt;
* Do not trust cookies &lt;br /&gt;
* Always consider that session could be hijacked &lt;br /&gt;
Since the component tree is assembled server side it can be trusted so if your custom component needs to read data from a sibling component it should be considered a safe operation although you will have to make assumptions on element names of the tree.&lt;br /&gt;
&lt;br /&gt;
==Implementations==&lt;br /&gt;
Since more than one JSF Implementation exists, bugs of the implementation should be first on the security list.&lt;br /&gt;
&lt;br /&gt;
===MyFaces===&lt;br /&gt;
There aren't major or critical security bugs registered in the current stable release of MyFaces (1.1.5). Client state saving is still the weak point and should be used wisely. My Faces comes also with a Security Extension  (http://wiki.apache.org/myfaces/SecurityContext) that allows to safely and easily retrieve authenticated user details.&lt;br /&gt;
&lt;br /&gt;
The MyFaces resource filter could be a source of threat. It is designed to expose resources from a jar file and could therefore, be considered, potentially dangerous. Note there aren't any claimed security flaws nor exploits in the resource filter, but the nature of this component makes it a good target for attackers. Since all it has to do is serve data it is recommended that a dispatcher be added to the filter mapping element. This should lower the possibility of an attacker successfully manipulating the server request.&lt;br /&gt;
For more information see: http://myfaces.apache.org/tomahawk/extensionsFilter.html&lt;br /&gt;
&lt;br /&gt;
There is also an easy way to enable encryption when using ''client save state''&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;context-param&amp;gt;&lt;br /&gt;
        &amp;lt;param-name&amp;gt;org.apache.myfaces.secret&amp;lt;/param-name&amp;gt;&lt;br /&gt;
        &amp;lt;param-value&amp;gt;NzY1NDMyMTA=&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/context-param&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported encryption methods are BlowFish, 3DES, AES and are definde bya a context parameter&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;context-param&amp;gt;&lt;br /&gt;
        &amp;lt;param-name&amp;gt;org.apache.myfaces.algorithm&amp;lt;/param-name&amp;gt;&lt;br /&gt;
        &amp;lt;param-value&amp;gt;Blowfish&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/context-param&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find more info at http://wiki.apache.org/myfaces/Secure_Your_Application&lt;br /&gt;
&lt;br /&gt;
===SUN Reference Implementation===&lt;br /&gt;
Quoting from the documentation:&lt;br /&gt;
''There are several ways for a web application to store session state on the client tier. One possible solution is to use Cookies to store the state on the client. However, cookies have limitations in size and are not ideal in cases where you want to store session state on the client.  The state that needs to be stored on the client is first serialized into a byte array. This byte array is then encrypted using industrial-strength 3DES with cipher-block-chaining (CBC) and an initialization vector. To make the content tamper-resistant, we then create a message authentication code (using SHA1 algorithm) from the encrypted content and the initialization vector. The initialization vector, the message authentication code, and the encrypted content is then combined in a single byte array. Finally, this resulting byte array is converted into a base64 string which is stored in a hidden FORM field on the client.&lt;br /&gt;
This solution is secure because it uses a strong crypto algorithm and also uses a MAC for tamper-resistance. We also generate all the random numbers (for example, to generate the initialization vectors and the password) using the cryptographically-secure SecureRandom class. Note that the encryption keys are NEVER sent to the client or sent on the wire. These keys are used only on the server-side to encrypt and decrypt the state. One challenge is to decide what encryption keys to use. The encryption keys should not be known to the client, but still be associated with the client. We solve this problem by generating these keys from a password that is generated randomly and stored in the HttpSession. This strategy for key generation through password is pluggable in our solution and can be changed if needed.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ICE Faces===&lt;br /&gt;
&lt;br /&gt;
Starting from the idea that AJAX on Its Own Doesn't Corrupt Web Security ICE faces implements a component suite with ajax support by maintainig a coninus sync between the dom sent to the browser and a dom representation on the server. javascript is used to send commands to the server and invoke the logic in the java layer. Since dom model and javascript is involved a Javascript debugging  tool with value injection or dom injection capability could be of some use in pick locking the app.&lt;br /&gt;
&lt;br /&gt;
As stated in ICEFaces manual &amp;quot; the client is untrusted, SO DON'T TRUST IT!!&amp;quot; : it means that is all ups to the application designer to implement a robust security logic behind the scenes.&lt;br /&gt;
In another point of view the developer could focus on implementing server side security since with the server-side-dom architecture the thin client is even thinner.&lt;br /&gt;
&lt;br /&gt;
The component that refresh the two dom , caled IntervalRenderer, uses  a persistent ServletRequest stored on the server. Unfortunately, this request does not contain sufficient information to perform the isUserInRole() check.&lt;br /&gt;
This kind of check is possible only on stadar render request phase. &lt;br /&gt;
&lt;br /&gt;
To address this, a small amount of integration will be required either between ICEfaces and acegi-security or ICEfaces and the application server.  Acegi-security (see appendix one ) is likely preferable as it will be more portable.&lt;br /&gt;
&lt;br /&gt;
==Apendix I==&lt;br /&gt;
&lt;br /&gt;
===ACEGI Integration===&lt;br /&gt;
&lt;br /&gt;
Acegi Security is a powerful, flexible security solution for enterprise software, with a particular emphasis on applications that use Spring. If used in combination with jsf, the managed beans could become more &amp;quot;security aware&amp;quot; since acegi do not only perform authentication but also authorization in business layer. Acegi is a convenient way to manage security in all the layers of our application. This is a valuable thing especially when authorization is strongly coupled with business logic (approval work flows etc).&lt;br /&gt;
&lt;br /&gt;
In order to use a custom JSF-Acegi login we have to provide a valid Security Context (''userName'' and ''password'' are properties of the managed bean)&lt;br /&gt;
&lt;br /&gt;
 UsernamePasswordAuthenticationToken authReq = new UsernamePasswordAuthenticationToken(userName, password);&lt;br /&gt;
 Authentication auth = getAuthenticationManager().authenticate(authReq);&lt;br /&gt;
 SecurityContext secCtx = SecurityContextHolder.getContext();&lt;br /&gt;
 secCtx.setAuthentication(auth);&lt;br /&gt;
&lt;br /&gt;
We can override the standard ACEGI navigation with custom, logic driven, navigation reading security context and routing the outcome.&lt;br /&gt;
&lt;br /&gt;
More information can be found at  here [http://www.javakaffee.de/blog/2006/07/04/jsfacegi-authentication-with-a-backing-bean/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ACEGI can be integrated also in the rendering via custom components [http://cagataycivici.wordpress.com/2006/01/19/acegi_jsf_components_hit_the/] which basically wrap the standard ACEGI tag library in JSF components. This conveniently solve the ''stage zero'' of profiling: display or not a widget in the page.&lt;br /&gt;
&lt;br /&gt;
Including a JSF based form for login in a page could be a little tricky, bu using MyFaces tomahawk components it can be done easely.&lt;br /&gt;
&lt;br /&gt;
The form will look like&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib uri=&amp;quot;http://myfaces.apache.org/tomahawk&amp;quot; prefix=&amp;quot;t&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;t:inputText id=&amp;quot;j_username&amp;quot; forceId=&amp;quot;true&amp;quot; value=&amp;quot;#{backingBean.customerId}&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;80&amp;quot;&amp;gt;&amp;lt;/t:inputText&amp;gt;&lt;br /&gt;
 &amp;lt;t:inputSecret id=&amp;quot;j_password&amp;quot; forceId=&amp;quot;true&amp;quot; value=&amp;quot;#{backingBean.password}&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;80&amp;quot; redisplay=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/t:inputSecret&amp;gt;&lt;br /&gt;
 &amp;lt;h:commandButton action=&amp;quot;login&amp;quot; value=&amp;quot;#{messages.page_signon}&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;h:messages id=&amp;quot;messages&amp;quot; layout=&amp;quot;table&amp;quot; globalOnly=&amp;quot;true&amp;quot; showSummary=&amp;quot;true&amp;quot; showDetail=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A navigation rule to follow ACEGI requirements&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;navigation-rule&amp;gt;&lt;br /&gt;
        &amp;lt;from-view-id&amp;gt;/login.jsp&amp;lt;/from-view-id&amp;gt;&lt;br /&gt;
        &amp;lt;navigation-case&amp;gt;&lt;br /&gt;
                &amp;lt;from-outcome&amp;gt;login&amp;lt;/from-outcome&amp;gt;&lt;br /&gt;
                &amp;lt;to-view-id&amp;gt;/j_acegi_security_check.jsp&amp;lt;/to-view-id&amp;gt;&lt;br /&gt;
        &amp;lt;/navigation-case&amp;gt;&lt;br /&gt;
 &amp;lt;/navigation-rule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finaly ACEGI is told which page do the login&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean id=&amp;quot;formAuthenticationProcessingFilter&amp;quot; class=&amp;quot;org.acegisecurity.ui.webapp.AuthenticationProcessingFilter&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;property name=&amp;quot;filterProcessesUrl&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;/j_acegi_security_check.jsp&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/property&amp;gt;&lt;br /&gt;
        &amp;lt;property name=&amp;quot;authenticationFailureUrl&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;value&amp;gt;/login.faces&amp;lt;/value&amp;gt;&lt;br /&gt;
        &amp;lt;/property&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Java Project]]&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68547</id>
		<title>File:Threat Graph.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68547"/>
				<updated>2009-09-04T14:17:58Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: uploaded a new version of &amp;quot;File:Threat Graph.gif&amp;quot;:&amp;amp;#32;Reverted to version as of 13:50, 4 September 2009&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68545</id>
		<title>File:Threat Graph.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68545"/>
				<updated>2009-09-04T13:53:22Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: uploaded a new version of &amp;quot;File:Threat Graph.gif&amp;quot;:&amp;amp;#32;Really I made the change!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68544</id>
		<title>File:Threat Graph.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68544"/>
				<updated>2009-09-04T13:50:13Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: uploaded a new version of &amp;quot;File:Threat Graph.gif&amp;quot;:&amp;amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68543</id>
		<title>File:Threat Graph.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=File:Threat_Graph.gif&amp;diff=68543"/>
				<updated>2009-09-04T13:47:59Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: uploaded a new version of &amp;quot;File:Threat Graph.gif&amp;quot;:&amp;amp;#32;mail fail -&amp;gt; may fail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Threat_Risk_Modeling&amp;diff=68542</id>
		<title>Threat Risk Modeling</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Threat_Risk_Modeling&amp;diff=68542"/>
				<updated>2009-09-04T13:33:27Z</updated>
		
		<summary type="html">&lt;p&gt;Kenneth Kron: /* Identify Threats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
When you start a web application design, it is essential to apply threat risk modeling; otherwise you will squander resources, time, and money on useless controls that fail to focus on the real risks.&lt;br /&gt;
&lt;br /&gt;
The method used to assess risk is not nearly as important as actually performing a structured threat risk modeling. Microsoft notes that the single most important factor in their security improvement program was the corporate adoption of threat risk modeling.&lt;br /&gt;
&lt;br /&gt;
OWASP recommends Microsoft’s threat modeling process because it works well for addressing the unique challenges facing web application security and is simple to learn and adopt by designers, developers, code reviewers, and the quality assurance team.&lt;br /&gt;
&lt;br /&gt;
The following sections provide some overview information (or see Section 6.9, Further Reading, for additional resources).&lt;br /&gt;
&lt;br /&gt;
== Threat Risk Modeling ==&lt;br /&gt;
Threat risk modeling is an essential process for secure web application development. It allows organizations to determine the correct controls and to produce effective countermeasures within budget. For example, there is little point in spending $100,000 for fraud control for a system that has negligible fraud risk.&lt;br /&gt;
&lt;br /&gt;
== Performing threat risk modeling using the Microsoft Threat Modeling Process ==&lt;br /&gt;
The threat risk modeling process has five steps, enumerated below and shown graphically in Figure 1. They are:&lt;br /&gt;
# Identify Security Objectives&lt;br /&gt;
# Survey the Application&lt;br /&gt;
# Decompose it&lt;br /&gt;
# Identify Threats&lt;br /&gt;
# Identify Vulnerabilities&lt;br /&gt;
&lt;br /&gt;
[[Image:Threat_Model_Flow.gif|Figure 1: Threat Model Flow]]&lt;br /&gt;
&lt;br /&gt;
Let’s consider the steps in more detail.&lt;br /&gt;
&lt;br /&gt;
=== Identify Security Objectives ===&lt;br /&gt;
The business (or project management) leadership, in concert with the software development and quality assurance teams, all need to understand the security objectives. To facilitate this, start by breaking down the application’s security objectives into the following categories:&lt;br /&gt;
&lt;br /&gt;
* '''Identity:''' Does the application protect user identity from abuse? Are there adequate controls in place to ensure evidence of identity (as required for many banking applications?)&lt;br /&gt;
* '''Financial:''' Assess the level of risk the organization is prepared to absorb in remediation, as a potential financial loss. For example, forum software may have a lower estimated financial risk than an Internet banking application.&lt;br /&gt;
* '''Reputation:''' Quantify or estimate of the loss of reputation derived from the application being misused or successfully attacked.&lt;br /&gt;
* '''Privacy and Regulatory:''' To what extent will the application have to protect user data? Forum software by its nature is public, but a tax preparation application is subject to tax regulations and privacy legislation requirements in most countries.&lt;br /&gt;
* '''Availability Guarantees:''' Is the application required to be available per a '''''Service Level Agreement (SLA)''''' or similar guarantee? Is it a nationally protected infrastructure? To what level will the application have to be available? High availability techniques are significantly more expensive, so applying the correct controls up front will save a great deal of time, resources, and money.&lt;br /&gt;
&lt;br /&gt;
This is by no means an exhaustive list, but it gives an idea of some of the business risk decisions leading into selecting and building security controls.&lt;br /&gt;
&lt;br /&gt;
Other sources of risk guidance come from:&lt;br /&gt;
* Laws (such as privacy or finance laws)&lt;br /&gt;
* Regulations (such as banking or e-commerce regulations)&lt;br /&gt;
* Standards (such as ISO 17799)&lt;br /&gt;
* Legal Agreements (such as payment card industry standards or merchant agreements)&lt;br /&gt;
* Corporate Information Security Policy&lt;br /&gt;
&lt;br /&gt;
=== Application Overview ===&lt;br /&gt;
Once the security objectives have been defined, analyze the application design to identify the '''''components''''', '''''data flows''''', and '''''trust boundaries'''''.&lt;br /&gt;
&lt;br /&gt;
Do this by surveying the application’s architecture and design documentation. In particular, look for UML component diagrams. Such high level component diagrams are generally sufficient to understand how and why data flows to various places. For example, data movement across a trust boundary (such as from the Internet to the web tier, or from the business logic to the database server), needs to be carefully analyzed, whereas data that flows within the same trust level does not need as much scrutiny.&lt;br /&gt;
&lt;br /&gt;
=== Decompose Application ===&lt;br /&gt;
Once the application architecture is understood then decompose it further, to identify the features and modules with a security impact that need to be evaluated. For example, when investigating the authentication module, it is necessary to understand how data enters the module, how the module validates and processes the data, where the data flows, how the data is stored, and what fundamental decisions and assumptions are made by the module.&lt;br /&gt;
&lt;br /&gt;
=== Identify Threats ===&lt;br /&gt;
It is impossible to write down unknown threats, but it is likewise unlikely that new malware will be created to exploit new vulnerabilities within custom systems. Therefore, concentrate on known risks, which can be easily demonstrated using tools or techniques from Bugtraq.&lt;br /&gt;
&lt;br /&gt;
Microsoft suggests two different approaches for writing up threats. One is a threat graph, as shown in Figure 2, and the other is a structured list. &amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:FIXME|Change 3rd orange box in graphic to &amp;quot;Authorization MAY fail&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Threat_Graph.gif|Figure 2: Threat Graph]]&lt;br /&gt;
&lt;br /&gt;
Typically, a threat graph imparts more information quickly but it takes longer to construct, while a structured list is easier to create but it will take longer for the threat impacts to become obvious.&lt;br /&gt;
&lt;br /&gt;
# Attacker may be able to read other user’s messages&lt;br /&gt;
# User may not have logged off on a shared PC&lt;br /&gt;
# Data validation may allow SQL injection&lt;br /&gt;
# Implement data validation&lt;br /&gt;
# Authorization may fail, allowing unauthorized access&lt;br /&gt;
# Implement authorization checks&lt;br /&gt;
# Browser cache may contain contents of message&lt;br /&gt;
# Implement anti-caching directive in HTTP headers&lt;br /&gt;
# If eavesdropping risk is high, use SSL&lt;br /&gt;
&lt;br /&gt;
Note that it takes a motivated attacker to exploit a threat; they generally want something from your application or to obviate controls. To understand the relevant threats, use the following categories to understand who might attack the application:&lt;br /&gt;
&lt;br /&gt;
* '''Accidental Discovery:''' An ordinary user stumbles across a functional mistake in your application, just using a web browser, and gains access to privileged information or functionality.&lt;br /&gt;
* '''Automated Malware:''' Programs or scripts, which are searching for known vulnerabilities, and then report them back to a central collection site.&lt;br /&gt;
* '''The Curious Attacker:''' a security researcher or ordinary user, who notices something wrong with the application, and decides to pursue further.&lt;br /&gt;
* '''Script Kiddies:''' Common renegades, seeking to compromise or deface applications for collateral gain, notoriety, or a political agenda, perhaps using the attack categories described in the ''OWASP Web Application Penetration Checklist.''&lt;br /&gt;
* '''The Motivated Attacker:''' Potentially, a disgruntled staff member with inside knowledge or a paid professional attacker.&lt;br /&gt;
* '''Organized Crime:''' Criminals seeking high stake payouts, such as cracking e-commerce or corporate banking applications, for financial gain.&lt;br /&gt;
&lt;br /&gt;
It is vital to understand the level of attacker you are defending against. For example, a motivated attacker, who understands your internal processes is often more dangerous than script kiddies.&lt;br /&gt;
&lt;br /&gt;
=== STRIDE ===&lt;br /&gt;
STRIDE is a classification scheme for characterizing known threats according to the kinds of exploit that are used (or motivation of the attacker). The STRIDE acronym is formed from the first letter of each of the following categories.&lt;br /&gt;
&lt;br /&gt;
'''''Spoofing Identity'''''&lt;br /&gt;
“Identity spoofing” is a key risk for applications that have many users but provide a single execution context at the application and database level. In particular, users should not be able to become any other user or assume the attributes of another user.&lt;br /&gt;
&lt;br /&gt;
'''''Tampering with Data'''''&lt;br /&gt;
Users can potentially change data delivered to them, return it, and thereby potentially manipulate client-side validation, GET and POST results, cookies, HTTP headers, and so forth. The application should not send data to the user, such as interest rates or periods, which are obtainable only from within the application itself. The application should also carefully check data received from the user and validate that it is sane and applicable before storing or using it.&lt;br /&gt;
&lt;br /&gt;
'''''Repudiation'''''&lt;br /&gt;
Users may dispute transactions if there is insufficient auditing or recordkeeping of their activity. For example, if a user says, “But I didn’t transfer any money to this external account!”, and you cannot track his/her activities through the application, then it is extremely likely that the transaction will have to be written off as a loss.&lt;br /&gt;
&lt;br /&gt;
Therefore, consider if the application requires non-repudiation controls, such as web access logs, audit trails at each tier, or the same user context from top to bottom. Preferably, the application should run with the user’s privileges, not more, but this may not be possible with many off-the-shelf application frameworks.&lt;br /&gt;
&lt;br /&gt;
'''''Information Disclosure'''''&lt;br /&gt;
Users are rightfully wary of submitting private details to a system. If it is possible for an attacker to publicly reveal user data at large, whether anonymously or as an authorized user, there will be an immediate loss of confidence and a substantial period of reputation loss. Therefore, applications must include strong controls to prevent user ID tampering and abuse, particularly if they use a single context to run the entire application. &lt;br /&gt;
&lt;br /&gt;
Also, consider if the user’s web browser may leak information. Some web browsers may ignore the no caching directives in HTTP headers or handle them incorrectly. In a corresponding fashion, every secure application has a responsibility to minimize the amount of information stored by the web browser, just in case it leaks or leaves information behind, which can be used by an attacker to learn details about the application, the user, or to potentially become that user.&lt;br /&gt;
&lt;br /&gt;
Finally, in implementing persistent values, keep in mind that the use of hidden fields is insecure by nature. Such storage should not be relied on to secure sensitive information or to provide adequate personal privacy safeguards.&lt;br /&gt;
&lt;br /&gt;
'''''Denial of Service'''''&lt;br /&gt;
Application designers should be aware that their applications may be subject to a denial of service attack. Therefore, the use of expensive resources such as large files, complex calculations, heavy-duty searches, or long queries should be reserved for authenticated and authorized users, and not available to anonymous users.&lt;br /&gt;
&lt;br /&gt;
For applications that do not have this luxury, every facet of the application should be engineered to perform as little work as possible, to use fast and few database queries, to avoid exposing large files or unique links per user, in order to prevent simple denial of service attacks.&lt;br /&gt;
&lt;br /&gt;
'''''Elevation of Privilege'''''&lt;br /&gt;
If an application provides distinct user and administrative roles, then it is vital to ensure that the user cannot elevate his/her role to a higher privilege one. In particular, simply not displaying privileged role links is insufficient. Instead, all actions should be gated through an authorization matrix, to ensure that only the permitted roles can access privileged functionality.&lt;br /&gt;
&lt;br /&gt;
=== DREAD ===&lt;br /&gt;
DREAD is a classification scheme for quantifying, comparing and prioritizing the amount of risk presented by each evaluated threat.  The DREAD acronym is formed from the first letter of each category below.&lt;br /&gt;
&lt;br /&gt;
DREAD modeling influences the thinking behind setting the risk rating, and is also used directly to sort the risks. The DREAD algorithm, shown below, is used to compute a risk value, which is an average of all five categories.&lt;br /&gt;
&lt;br /&gt;
'''Risk_DREAD''' = (&amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;AMAGE + &amp;lt;u&amp;gt;R&amp;lt;/u&amp;gt;EPRODUCIBILITY + &amp;lt;u&amp;gt;E&amp;lt;/u&amp;gt;XPLOITABILITY + &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;FFECTED USERS + &amp;lt;u&amp;gt;D&amp;lt;/u&amp;gt;ISCOVERABILITY) / 5&lt;br /&gt;
&lt;br /&gt;
The calculation always produces a number between 0 and 10; the higher the number, the more serious the risk.&lt;br /&gt;
&lt;br /&gt;
Here are some examples of how to quantify the DREAD categories.&lt;br /&gt;
&lt;br /&gt;
'''''Damage Potential'''''&lt;br /&gt;
* If a threat exploit occurs, how much damage will be caused?&lt;br /&gt;
**0 = Nothing	&lt;br /&gt;
**5 = Individual user data is compromised or affected.	&lt;br /&gt;
**10 = Complete system or data destruction&lt;br /&gt;
&lt;br /&gt;
'''''Reproducibility'''''&lt;br /&gt;
* How easy is it to reproduce the threat exploit?&lt;br /&gt;
**0 = Very hard or impossible, even for administrators of the application.&lt;br /&gt;
**5 = One or two steps required, may need to be an authorized user.	&lt;br /&gt;
**10 = Just a web browser and the address bar is sufficient, without authentication.&lt;br /&gt;
&lt;br /&gt;
'''''Exploitability'''''&lt;br /&gt;
* What is needed to exploit this threat?&lt;br /&gt;
**0 = Advanced programming and networking knowledge, with custom or advanced attack tools.	&lt;br /&gt;
**5 = Malware exists on the Internet, or an exploit is easily performed, using available attack tools.	&lt;br /&gt;
**10 = Just a web browser&lt;br /&gt;
&lt;br /&gt;
'''''Affected Users'''''&lt;br /&gt;
* How many users will be affected?&lt;br /&gt;
**0 = None	&lt;br /&gt;
**5 = Some users, but not all	&lt;br /&gt;
**10 = All users&lt;br /&gt;
&lt;br /&gt;
'''''Discoverability'''''&lt;br /&gt;
* How easy is it to discover this threat?&lt;br /&gt;
**0 = Very hard to impossible; requires source code or administrative access.&lt;br /&gt;
**5 = Can figure it out by guessing or by monitoring network traces.	&lt;br /&gt;
**9 = Details of faults like this are already in the public domain and can be easily discovered using a search engine.&lt;br /&gt;
**10 = The information is visible in the web browser address bar or in a form.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When performing a security review of an existing application, “Discoverability” will often be set to 10 by convention, as it is assumed the threat issues will be discovered.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using DREAD can be difficult at first. It may be helpful to think of Damage Potential and Affected Users in terms of Impact, while thinking of Reproducibility, Exploitability, and Discoverability in terms of Probability. Using the Impact vs Probability approach (which follows best practices such as defined in NIST-800-30), I would alter the formula to make the Impact score equal to the Probability score. Otherwise the probability scores have more weight in the total.&lt;br /&gt;
&lt;br /&gt;
== Alternative Threat Modeling Systems ==&lt;br /&gt;
OWASP recognizes that the adoption of the Microsoft modeling process may not fit all organizations. If STRIDE and DREAD are unacceptable for some reason, we recommend that your organization “dry run” the other threat risk models discussed against an existing application or design. This will allow you to determine which approach works best for you, and to adopt the most appropriate threat modeling tools for your organization.&lt;br /&gt;
&lt;br /&gt;
'''In summary, performing threat modeling provides a far greater return than most any other control in this Guide. Therefore, make threat risk modeling an early priority in your application design process.'''&lt;br /&gt;
&lt;br /&gt;
=== Trike ===&lt;br /&gt;
Trike is a threat modeling framework with similarities to the Microsoft threat modeling processes. However, Trike differs because it uses a risk based approach with distinct implementation, threat, and risk models, instead of using the STRIDE/DREAD aggregated threat model (attacks, threats, and weaknesses).&lt;br /&gt;
From the Trike paper, Trike’s goals are:&lt;br /&gt;
* With assistance from the system stakeholders, to ensure that the risk this system entails to each asset is acceptable to all stakeholders.&lt;br /&gt;
* Be able to tell whether we have done this.&lt;br /&gt;
* Communicate what we’ve done and its effects to the stakeholders.&lt;br /&gt;
* Empower stakeholders to understand and reduce the risks to them and other stakeholders implied by their actions within their domains. &lt;br /&gt;
&lt;br /&gt;
For more information on Trike, please see Section 6.9, reference 8.&lt;br /&gt;
&lt;br /&gt;
=== AS/NZS 4360:2004 Risk Management ===&lt;br /&gt;
The Australian/New Zealand Standard AS/NZS 4360, first issued in 1999, and revised in 2004, is the world’s first formal standard for documenting and managing risk and is still one of the few formal standards for managing it.&lt;br /&gt;
The standard’s approach is simple (it’s only 28 pages long), flexible, and iterative. Furthermore, it does not lock organizations into a particular risk management methodology, provided the methodology fulfils the AS/NZS 4360 five steps. It also provides several sets of risk tables as examples, and allows organizations to freely develop and adopt their own.&lt;br /&gt;
&lt;br /&gt;
'''The five steps of the AS/NZS 4360 process are:'''&lt;br /&gt;
* '''Establish Context:''' Establish the risk domain, i.e., which assets/systems are important?&lt;br /&gt;
* '''Identify the Risks:''' Within the risk domain, what specific risks are apparent?&lt;br /&gt;
* '''Analyze the Risks:''' Look at the risks and determine if there are any supporting controls in place.&lt;br /&gt;
* '''Evaluate the Risks:''' Determine the residual risk.&lt;br /&gt;
* '''Treat the Risks:''' Describe the method to treat the risks so that risks selected by the business will be mitigated.&lt;br /&gt;
AS/NZS 4360 assumes that risk will be managed by an '''''operational risk group''''', and that the organization has adequate skills and risk management resources in house to identify, analyze, and treat the risks.&lt;br /&gt;
&lt;br /&gt;
'''The advantages of AS/NZS 4360:'''&lt;br /&gt;
* AS/NZS 4360 works well as a risk management methodology for organizations requiring Sarbanes-Oxley compliance.&lt;br /&gt;
* AS/NZS 4360 works well for organizations that prefer to manage risks in a traditional way, such as just using likelihood and consequence to determine an overall risk. &lt;br /&gt;
* AS/NZS 4360 is familiar to most risk managers worldwide, and your organization may already have implemented an AS/NZS 4360 compatible approach.&lt;br /&gt;
* You are an Australian organization, and may be required to use it if you are audited on a regular basis, or to justify why you aren’t using it. Luckily, the STRIDE/DREAD model discussed earlier is AS/NZS 4360 compatible.&lt;br /&gt;
&lt;br /&gt;
'''The limitations of AS/NZS 4360:'''&lt;br /&gt;
* The AS/NZS 4360 approach works best for business or systemic risks than for technical risks.&lt;br /&gt;
* AS/NZS 4360 does not define the methodology to perform a structured threat risk modeling exercise.&lt;br /&gt;
* As AS/NZS 4360 is a generic framework for managing risk, it does not provide any structured method to enumerate web application security risks. &lt;br /&gt;
Although AS/NZS 4360 may be used to rank risks for security reviews, the lack of structured methods of enumerating threats for web applications makes it less desirable than other methodologies described earlier.&lt;br /&gt;
&lt;br /&gt;
=== CVSS ===&lt;br /&gt;
The US Department of Homeland Security (DHS) established the NIAC Vulnerability Disclosure Working Group, which incorporates input from Cisco Systems, Symantec, ISS, Qualys, Microsoft, CERT/CC, and eBay. One of the group’s outputs is the '''''Common Vulnerability Scoring System (CVSS).'''''&lt;br /&gt;
&lt;br /&gt;
'''The advantages of CVSS:'''&lt;br /&gt;
* You have just received notification from a security researcher or other source that your product has vulnerability, and you wish to ensure that it has an accurate and normalized severity rating, so as to alert your customers to the appropriate level of action required when you release the patch.&lt;br /&gt;
* You are a security researcher, and have found several threat exploits within an application. You would like to use the CVSS ranking system to produce reliable risk rankings, to ensure that the ISV will take the exploits seriously as indicated by their rating.&lt;br /&gt;
* CVSS has been recommended by the working group for use by US Government departments. However, it is unclear if it will become policy or be widely adopted at the time of this writing.&lt;br /&gt;
[[Category:FIXME|The first two are more scenarios than advantages]]&lt;br /&gt;
&lt;br /&gt;
'''The limitations of CVSS:'''&lt;br /&gt;
* CVSS does not find or reduce the attack surface area (i.e. design flaws), or help enumerate risks within any arbitrary piece of code, as it is just a scoring system, not a modeling methodology.&lt;br /&gt;
* CVSS is more complex than STRIDE/DREAD, as it aims to calculate the risk of announced vulnerabilities as applied to deployed software and environmental factors.&lt;br /&gt;
* The CVSS risk ranking is complex – a spreadsheet is required to calculate the risk components as the assumption behind CVSS is that a specific vulnerability has been identified and announced, or a worm or Trojan has been released targeting a small number of attack vectors. &lt;br /&gt;
* The overhead of calculating the CVSS risk ranking is quite high if applied to a thorough code review, which may have 250 or more threats to rank.&lt;br /&gt;
&lt;br /&gt;
=== OCTAVE ===&lt;br /&gt;
OCTAVE is a heavyweight risk methodology approach originating from Carnegie Mellon University’s Software Engineering Institute (SEI) in collaboration with CERT. OCTAVE focuses on organizational risk, not technical risk.&lt;br /&gt;
OCTAVE comes in two versions: Full OCTAVE, for large organizations, and OCTAVE-S for small organizations, both of which have specific catalogs of practices, profiles, and worksheets to document the modeling outcomes.&lt;br /&gt;
&lt;br /&gt;
'''OCTAVE is popular with many sites and is useful when:'''&lt;br /&gt;
* Implementing an organizational culture of risk management and controls becomes necessary.&lt;br /&gt;
* Documenting and measuring business risk becomes timely.&lt;br /&gt;
* Documenting and measuring the overall IT security risk, particularly as it relates to the corporate IT risk management, becomes necessary.&lt;br /&gt;
* When documenting risks surrounding complete systems becomes necessary.&lt;br /&gt;
* To accommodate a fundamental reorganization, such as when an organization does not have a working risk methodology in place, and requires a robust risk management framework to be put in place.&lt;br /&gt;
&lt;br /&gt;
'''The limitations of OCTAVE are:''' &lt;br /&gt;
* OCTAVE is incompatible with AS/NZS 4360, as it mandates Likelihood = 1 (i.e., It assumes a threat will always occur) and this is inappropriate for many organizations. OCTAVE-S makes the inclusion of this probability optional, but this is not part of the more comprehensive OCTAVE standard.&lt;br /&gt;
* Consisting of 18 volumes, OCTAVE is large and complex, with many worksheets and practices to implement.&lt;br /&gt;
* It does not provide a list of “out of the box” practices for assessing and mitigating web application security risks.&lt;br /&gt;
&lt;br /&gt;
Because of these issues, OWASP does not anticipate that OCTAVE will be used at large by application designers or developers, because it fails to take threat risk modeling into consideration, which is useful during all stages of development, by all participants, to reduce the overall risk of an application becoming vulnerable to attack.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In this chapter, we have touched on the basic principles of threat risk modeling, risk management, and web application security. Applications that leverage the underlying intent of these principles will be more secure than their counterparts, which will only be minimally compliant just by including specific controls.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
* [http://www.microsoft.com/downloads/details.aspx?FamilyId=59888078-9DAF-4E96-B7D1-944703479451 Threat Analysis &amp;amp;amp; Modeling v2.1.2], © Microsoft Corporation, 2007.  [[category:FIXME |link not working, please replace]]&lt;br /&gt;
* [http://msdn.microsoft.com/library/ms978516.aspx Threat Modeling Web Applications], J.D. Meier, Alex Mackman, Blaine Wastell, © Microsoft Corporation, May 2005.&lt;br /&gt;
* [http://msdn.microsoft.com/library/ms994921.aspx Improving Web Application Security: Threats and Countermeasures], J.D. Meier, Alex Mackman, Michael Dunner, Srinath Vasireddy, Ray Escamilla and Anandha Murukan, © Microsoft Corporation, June 2003.&lt;br /&gt;
* [http://www.microsoft.com/downloads/details.aspx?FamilyID=62830f95-0e61-4f87-88a6-e7c663444ac1&amp;amp;displaylang=en Threat Modeling], Frank Swiderski and Window Snyder, Microsoft Press, June 2004, ISBN 0-7356-1991-3.&lt;br /&gt;
* Writing Secure Code, 2nd Edition, Howard and LeBlanc, (pp. 69 – 124), Microsoft Press, 2003, ISBN 0-7356-1722-8.&lt;br /&gt;
* [http://msdn.microsoft.com/library/ms954176.aspx The STRIDE Threat Model], © Microsoft Corporation, 2005.&lt;br /&gt;
* [http://blogs.msdn.com/david_leblanc/archive/2007/08/13/dreadful.aspx DREADful] - the DREAD system, © Microsoft Corporation, 2005.&lt;br /&gt;
* [http://dymaxion.org/trike/Trike_v1_Methodology_Document-draft.pdf A Conceptual Model for Threat Modeling Applications], Saitta, Larcom, and Michael Eddington, July 2005, http://dymaxion.org/trike/.&lt;br /&gt;
* [http://www.standards.co.nz/web-shop/?action=viewSearchProduct&amp;amp;mod=catalog&amp;amp;pid=4360:2004(AS|NZS) AS/NZS 4360:2004 Risk Management], Standards Australia and Standards New Zealand.&lt;br /&gt;
* [http://www.dhs.gov/interweb/assetlibrary/NIAC_CyberVulnerabilitiesPaper_Feb05.pdf CVSS], U.S. Department of Homeland Security library, February 2005.    [[category:FIXME |link not working, please replace]]&lt;br /&gt;
* [http://www.cert.org/octave/ OCTAVE], CERT library.&lt;br /&gt;
&lt;br /&gt;
== Appendix: Alternative open-source Risk Management tools ==&lt;br /&gt;
* [http://sourceforge.net/projects/osmr/ OSMR]&lt;br /&gt;
* [http://sourceforge.net/projects/marco/ MARCO]&lt;br /&gt;
* [http://sourceforge.net/projects/coras/ CORAS Risk Assessment Platform]&lt;br /&gt;
* [http://sourceforge.net/projects/ratiso17799/ ISO 17799 Risk Assessment Toolkit]&lt;br /&gt;
* [http://sourceforge.net/projects/easy-tra/ Easy Threat Risk Assessment]&lt;br /&gt;
* [http://sourceforge.net/projects/arms-17799/ ARMS]&lt;br /&gt;
* [http://sourceforge.net/projects/minaccia/ Minaccia]&lt;br /&gt;
* [http://sourceforge.net/projects/threatmind/ ThreatMind]&lt;br /&gt;
* [http://sourceforge.net/projects/osrmt/ Open Source Requirements Management Tool]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[[Guide Table of Contents|Development Guide Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP_Guide_Project]]&lt;br /&gt;
[[Category:Activity]]&lt;br /&gt;
[[Category:Externally Linked Page]]&lt;/div&gt;</summary>
		<author><name>Kenneth Kron</name></author>	</entry>

	</feed>