This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "CSRFGuard 3 User Manual"

From OWASP
Jump to: navigation, search
(Known Issues)
Line 43: Line 43:
 
The following is a quick bulleted list of known issues within the current release:
 
The following is a quick bulleted list of known issues within the current release:
  
:* Ajax support does not yet work in Internet Explorer
+
:* No known way to inject CSRF prevention tokens into setters of document.location (ex: document.location="http://www.owasp.org";)
:* Ajax support coupled with the TokenPerPage option only works as expected in Google Chrome. The Ajax request is not being triggered correctly in other browsers.
+
:* Tokens are not injected into HTML elements dynamically generated using JavaScript "createElement" and "setAttribute"
  
 
[[Category:OWASP_CSRFGuard_Project]]
 
[[Category:OWASP_CSRFGuard_Project]]

Revision as of 02:39, 28 January 2011

Overview

Welcome to the OWASP CSRFGuard 3 User Manual! The purpose of this article is to provide the user with guidance on obtaining, installing, deploying, and developing with the OWASP CSRFGuard library. The author's goal was to keep the User Manual informative, use to understand, and concise. If you find that one or more aspects of this document does not adhere to these goals, please me know at eric dot sheridan at owasp dot org.

Download

Users can download the latest release of OWASP CSRFGuard using one of the following links:

OWASP CSRFGuard 3.0.0.245 (ALPHA) - download the latest development release with binary and associated configuration files (recommended).

Installation

Installation of OWASP CSRFGuard 3 is very straight forward requiring three simple steps:

  1. Copy the Owasp.CsrfGuard.jar file to your application's classpath
  2. Map the CsrfGuardFilter in your application's deployment descriptor (web.xml)
  3. Configure the Owasp.CsrfGuard.properties file as you see fit

Click here for more detailed information regarding the installation of OWASP CSRFGuard.

Configuration

The minimum configuration settings that users should review include:

  • Default new token landing page (org.owasp.csrfguard.NewTokenLandingPage)
  • Support for Ajax and XMLHttpRequest (org.owasp.csrfguard.Ajax)
  • URI resources that should not be protected (org.owasp.csrfguard.unprotected.*)
  • Actions executed when an attack is detected (org.owasp.csrfguard.action.*)

Click here for more information regarding the configuration of OWASP CSRFGuard.

Token Injection

Users of OWASP CSRFGuard can inject prevention tokens into HTML using two strategies:

  • JavaScript DOM Manipulation - largely automated process requiring minimal effort and is ideal for most web applications
  • JSP Tag Library - provides fine grained strategy ideal for situations where automated DOM manipulation is insufficient.

Click here for more information regarding the injection of CSRF prevention tokens within your application.

Known Issues

The following is a quick bulleted list of known issues within the current release:

  • No known way to inject CSRF prevention tokens into setters of document.location (ex: document.location="http://www.owasp.org";)
  • Tokens are not injected into HTML elements dynamically generated using JavaScript "createElement" and "setAttribute"