Enterprise Java 2 Security: Building Secure and Robust J2EE Applications

Enterprise Java 2 Security: Building Secure and Robust J2EE Applications

$49.99 $49.99

  • Release Date: 17 February, 2004
  • Used Price: $29.99
  • Availability: Usually ships in 24 hours
  • Third Party Used Price: $26.99

Authors: Marco Pistoia, Nataraj Nagaratnam, Larry Koved, Anthony Nadalin

Similar Products

Core J2EE Patterns: Best Practices and Design Strategies, Second Edition

From $34.99:

Core J2EE Patterns: Best Practices and Design Strategies, Second Edition

J2EE Security for Servlets, EJBs, and Web Services

From $34.99:

J2EE Security for Servlets, EJBs, and Web Services

J2EE Web Services

From $33.99:

J2EE Web Services

Head First EJB (Brain-Friendly Study Guides)

From $30.57:

Head First EJB (Brain-Friendly Study Guides)

J2EE & Java: Developing Secure Web Applications with Java Technology (Hacking Exposed)

From $32.99:

J2EE & Java: Developing Secure Web Applications with Java Technology (Hacking Exposed)

Customer Rating: 3.58 of 5 (12 total reviews)

  • 4 starsA solid resource

    Security is a topic which often seems to be given too little thought. This book gives a hand for the J2EE developer new to security on a Java platform and, especially, on the J2EE platform.

    The book has been split into five parts. I have gathered my thoughts about each in their separate paragraphs below.

    Part I discusses about the needs of enterprise application security in general, and how these needs are associated with the J2EE components on a two or three-tier architecture, illustrated with pretty pictures of firewalls etc. The discussion is high-level in nature and acts mainly as a smooth entry into the mind-set of implementing security into your application.

    Part II takes the focus inside J2EE and shows what kind of handles the J2EE architecture provides for security-related services such as authentication and authorization. Basically, this part of the book explains the programmatic and declarative security for web applications and Enterprise JavaBean components. The writing is very easy to understand but I would've liked to see one or two complete examples of a deployment descriptor instead of just small snippets. To me, seeing a full example would seem like a great way to tie things up in the context.

    Part III, titled "The Foundations of Java 2 Security", is something I'm sure I'll come back to when I have to deal with J2SE security. The authors describe the whole shebang from class loaders to security managers and the horde of different types of permissions. This part also includes a chapter about the Java Authentication and Authorization Service (JAAS), which is top-notch amongst those I've seen about the subject. Clear writing combined with precise and illustrative examples. The one topic that could've deserved some concrete usage help were the command-line utilities such as keytool and jarsigner. Also, applet security was only mentioned in passing (the word "applet" can't even be found from the index), which may or may not be significant for the reader.

    Part IV is dedicated to the art of cryptography. After presenting the basics of cryptographic algorithms, secret and public-key cryptography, the authors continue by discussing how the selected algorithms affect the confidentiality, integrity, authenticity, and non-repudiation properties of data. The chapters also discuss digital signatures, certificates, and key distribution on a high level. The rest of the fourth part shows how the JCA and JCE frameworks are built (i.e. how the pluggable implementation architecture works) and how the relevant APIs are used. The Java Secure Socket Extension (JSSE) for SSL is also presented with a couple of very nice examples including server and client authentication.

    The fifth and final part talks about "advanced" topics such as web services security and some security considerations for container providers (which seems a bit out-of-place in this book). The subjects are covered only very superficially, which is understandable because the area of web services security admittedly requires a whole book to discuss in detail.

    I can recommend this book as a solid source of information for J2EE security topics. Accompanied with vendor-specific documentation on deployment and configuration issues, you probably won't need anything else for your security needs. Its biggest weakness, in my opinion, is the lack of more complete sample code which could've at least been published online.

  • 5 starsThe BEST book on Java/J2EE security

    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 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 sing-on.

    After authentication, the section moves on the 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 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 explain 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.

    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 bookcase and he/she really needs 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.

  • 4 starsA good book on Java security

    This book makes me nostalgic for the early SAMS Publishing Unleashed series of books on Java. Remember when you first learned what a servlet was? That's the feeling I get when reading Enterprise Java Security. The book does a good job explaining how Secure Sockets Layer (SSL,) object-level security, Kerberos, and legacy security came about. It then shows detailed examples with sample code how to implement each of the security techniques. The text is surprisingly complete, including coverage of Web Service Security protocols and techniques.