The Artima Developer Community
Sponsored Link

Java Buzz Forum
Enterprise Java 2 Security: Building Secure and Robust J2EE Applications - Book Review

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Vinny Carpenter

Posts: 276
Nickname: vscarpente
Registered: Feb, 2003

Vinny is a Java developer/architect working with Java, J2EE, OO, Linux, OpenSource.
Enterprise Java 2 Security: Building Secure and Robust J2EE Applications - Book Review Posted: Apr 21, 2004 9:34 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Vinny Carpenter.
Original Post: Enterprise Java 2 Security: Building Secure and Robust J2EE Applications - Book Review
Feed Title: Vinny Carpenter's Blog
Feed URL: http://www.j2eegeek.com/error.html
Feed Description: Welcome to my blog. I am a total Java geek that lives in Milwaukee, making my living as an architect/developer, spending all my time with Java, J2EE, OO, Linux, and open source. In my spare time, when I am not in front of my computers, I spend every other minute with my other loves: My wife, books, music, guitars, Formula-1 racing and StarGate. Check out my blog @ http://www.j2eegeek.com/blog
Latest Java Buzz Posts
Latest Java Buzz Posts by Vinny Carpenter
Latest Posts From Vinny Carpenter's Blog

Advertisement

Enterprise Java 2 Security: Building Secure and Robust J2EE Applications
by Marco Pistoia, Nataraj Nagaratnam, Larry Koved, Anthony Nadalin
Paperback: 416 pages
Publisher: Addison-Wesley Pub Co; 1st edition (February 17, 2004)
ISBN: 0321118898

Enterprise Java 2 Security: Building Secure and Robust J2EE Applications is the latest entry from Addison Wesley in this much needed space. I have been reading this book for the last 5 weeks and I have to say that I really love this book.

Security is a very important topic and yet people haven’t really a lot of attention to it in the Java space. If you ask your typical Java developer about security, he/she may be able to spell JAAS and that’s about it. I think part of the problem has been that the security API’s from Sun are cryptic and incredibly hard to use. I remember working on an application almost 3 years where we were communicating with a vendor over SSL with the use of a private certificate and just how difficult it was to hack the keystore, modify the security policy files to add support for JSSE. Yikes! Now that the Java platform has matured and security is no longer a second-class citizen, along comes a great book to allow you to take advantage of the rich API’s offered by the platform. I really like the book as it offers a comprehensive treatment and thorough analysis of security in J2SE and J2EE.

The book starts off with an overview of Java and security landscape with quick introductions to things like Java Cryptography Architecture (JCA), Java Cryptography Extension (JCE), Java Authentication and Authorization Service (JAAS), Java Secure Socket Extension (JSSE) and PKI. This chapter does a great job of introducing all of the security features in the Java platform and how they fit in the standard application development framework. There is a really nice picture on page 9 that sums up all of the security providers, services and components and how they fit together in J2SE and J2EE. After the introduction, the book moves into a discussion about firewall and some network architecture discussion.

The second section (Chapter 3) of the book deals with J2EE security model. This section starts with a quick intro of the J2EE components before moving into a discussion of the J2EE security roles and authorization model. After a quick example of using declarative security with EJB’s, the authors then discuss authentication in the realm of HTTP and web applications with a quick intro to basic, form and certificate based authentication. The authors recommend the use of declarative security over programmatic security as a best-practice. I have to agree with that assessment and recommendation completely. But there are instances where declarative security is not possible and you have to resort to programmatic security. The chapter shows some simple code example to validate security role of a user in an EJB, and fetching user information in a web application.

The next section of the book deals with JavaServer Pages (JSP) and Servlet security. The section starts with a quick intro of Servlets, Servlet life cycle, before moving into the authentication section. At first, the simple HTTP authentication mechanism is explained with a nice breakdown of the HTTP status code sent from the server to the browser along with a description of how the username and password are encoded on the client side. I really like the way this section was written as it didn’t leave any ambiguity in how the process works. After basic authentication, we move on to Form-based authentication which is explained very simply along with the appropriate snippet that belongs in your web.xml file. Once again, the explanation and graphic does a great job of breaking down the authentication process down to the http communication between the browser and server. This section also briefly describes certificate-based authentication and single sign-on.

After authentication, the section moves on to authorization or the roles part of the puzzle. In reading this section, I learned something new and really interesting. There is discussion of the RequestDispatcher object that allows you to use the forward() or include() method to create an invocation chain. In that scenario, the web container only authorizes the first invocation and not every forward or include that are part of the process. There is also discussion about how to use security-constraints to protect a single page, URL, or URL pattern. After declarative security, the chapter moves to programmatic security with discussion of the javax.security.Principal object, role reference and mapping in web.xml. The chapter then moves on to discuss some usage pattern and best practices on how to use cookies, SSL and HttpSession. I was pleasantly surprised to a see a simple Servlet Filter example to restrict a set of users from any application. The next section of the book covers EJB security starting with a quick intro to EJBs and the moves into EJB security and method authorization.

The next section of the book deal with J2SE security. This section starts with the class loader and how the default class loader and the whole delegation process works. I really liked the section on class loading process, the delegation hierarchy, bytecode verifier, security manager and privileged code. In fact, I really liked this chapter and re-read it several times. The section on the SecurityManager is very comprehensive and probably the best explanation I’ve read about the topic. The next chapter breaks down the Java permission model in great detail including the Java security policy. Most people that use the –D parameter to specify the java.security.manager and java.security.policy but don’t really understand the details behind those command line parameters really need to read this chapter.

The next chapter describes the Java Authentication and Authorization Service (JAAS) in great detail. This chapter is full of example code that walks you through the JAAS framework. I really like the treatment given to JAAS as it very comprehensive and very well written. This is also one of those chapters I re-read several times. I’ve been using JAAS for almost 2 years now and I still found this to be very educational and the included Java code made concepts very easy to understand and follow.

After JAAS, the book moves on to Cryptography and its role in terms of Enterprise security. This three chapter section starts off with the theory of cryptography and then describes JCA and JCE framework in great details. This was not of great interest to me personally and so I skimmed most of this section. After JCA/JCE, the book moves on to public-key cryptography and S/MIME.

The next chapter focuses on Secure Socket Layer (SSL) or Transport Layer Security (TLS). I love the section on the SSL handshake as it simplifies and explains this very complex interaction. This section also has a lot of Java code that helps illustrate some of the complex concepts including using and creating the keystore and using client authentication with certificate. I wish I had this book in my library 2 years ago.

The next chapter discusses security for Web Services and discusses topics such as XML Signature, Security Services Markup Language (SAML) and WS-Security. After Web Services, the book discusses security consideration that must be taken into account by container providers.

In conclusion, this is the best book I have ever read dealing with the topic of security. This is also the best Java security book and is a very comprehensive guide to anyone working with Java. This book belongs in every developer’s library and as developers really need to understand these concepts. If you are looking for a book that overwhelms you with code, this is not it. Instead this is a great tutorial book that uses Java code where appropriate but relies on great writing and explanation of the security framework and components. I highly recommend this book and I know this is going to be handy reference for me.

Read: Enterprise Java 2 Security: Building Secure and Robust J2EE Applications - Book Review

Topic: Curious about Spring transaction definitions? Previous Topic   Next Topic Topic: Bush Speaks: We're Doing the Right Thing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use