public
Description: The Lift web framework for Scala
Home | Edit | New

Lifts Security

The Ten Reasons Why Lift Is Secure

As stated in this thread David explains Lifts security.

  1. Lift is resistant to XSS attacks. By default pages are composed in
    XML rather than Strings. It takes the developer extra work to insert XSS
    strings into output rather than having to make sure each String is properly
    escaped before being cat’ed to the output.
     
  2. Lift is resistant to SQL Injection attacks because mapper and JPA do
    not compose Strings into SQL statements, but rather bind well typed
    parameters into prepared statements. So, if you go the normal path, you get
    SQL injection resistance. If you want to manually craft a String to send as
    a query, in mapper you have to “sign” the string with the time, date and a
    certification that you’ve reviewed the String for SQL Injection problems.
     
  3. Lift never shells out. You can’t cause a file to be executed from a
    Lift app unless your app manually uses Java’s Runtime.execute() call.
     
  4. By default, Lift creates opaque GUIDs to refer to components on the
    server side (whether that’s a function to execute when a form field is
    submitted, what to do on an Ajax call, etc.) By default, it’s easier to use
    this callback mechanism than advertise a primary key or other sensitive
    piece of information. Lift also has the KeyObfuscator which will create a
    session-specific mapping of primary keys to opaque ids. Using
    KeyObfuscator, you can send JSON objects to the client with stable primary
    keys that are obfuscated and not usable outside the current session.
     
  5. By default Lift’s form fields contain GUIDs that are cryptographically
    impossible to predict. It’s not possible to do CSRF because one does not
    know the name of form fields (they are not stable).
     
  6. Lift has different production vs. development mode error messages.
    There’s little information that leaks about underlying configurations, even
    exceptions, in production mode.
     
  7. Lift uses the container’s session management (usually JSESSIONID) for
    session management. As far as I know, Jetty, Tomcat, Glassfish are secure
    in terms of the way they deal with sessions. Of course, anything that’s not
    over SSL is vulnerable to a cookie stealing attack.
     
  8. Crypto key storage is a container-level issue. See #7
     
  9. See #7
     
  10. Lift’s sitemap is the best and most secure integration of UI and
    page-level access. You can look at the sitemap to determine the access
    control rules for a given page (it’s declarative) and it’s enforced long
    before your page gets accessed.
Last edited by mal3, Sun Nov 01 01:59:21 -0800 2009
Home | Edit | New
Versions: