J2EE Security
The second section is "The Technology," and includes chapters three through seven. Chapter three is a discussion of cryptography with Java and would have been worth the price of the whole book for me if (I hadn't have gotten it for free as a review copy)! :-) Chapter four covers PKI (Public Key Infrastructure) with Java. Managing certificates is explained as well as the steps necessary to issue and revoke your own. Chapter five is a discussion of access control. Access control in Java is available based on the origin of the code (the applet effect), the signer of the code or the logged-in user. Chapter six concerns securing the wire. This is the use of encryption for the transmission channel, SSL in a web browser being the most obvious example, where everything served over HTTPS is encrypted. Chapter seven secures the message. This covers message encryption for those times in life where you have to use a non-encrypted transfer medium as well as techniques for authentication, so that the message you do send can be guaranteed to be authentic and provably from you.
The third section is "The Application." Chapter eight discusses the security aspects of RMI based applications, especially using the Java security managers. Chapter nine reviews web application security using both declarative and programmatic security, giving examples using Apache Tomcat.Chapter ten discusses EJB security, including JNDI-based client authentication, SSL and declarative access control. Chapter eleven talks about the security issues associated with web services using the Apache Axis tool to illustrate the points. Chapter twelve is a wrap up of the whole book.
What's To Like The book is logically divided into chapters on each of the main aspects of security that apply to J2EE. These chapters are then located within three sections: background, technology and application. This sequence worked nicely for me, each chapter getting more detailed. This way I knew how deep I was by how far into the book I'd gotten.The main thing that struck me about this book was that it was designed to be practical. Mr. Kumar not only explains his point and gives you example source code, but he has written a freely available security toolkit, to demonstrate each of the points he makes. The Java Security Tool Kit (JSTK) is a very nice addition to the book's text. Being able to try out the concept being explained really helps. This approach takes example code to another level and I hope other authors will take note.
What's To Consider There is almost nothing to nit-pick concerning the book, but I do have one complaint about the JSTK software. The supplied shell scripts in the bin directory all had MS-DOS end-of-lines. This prevented them running unmodified on my OS X iBook. I had to remove all of the ^M's. This may also be a problem under Linux, but I have not had an opportunity to test there yet. Once the end-of-line problem was fixed, the software worked like a charm. Summary A great combination of security primer and cookbook. If you're a serious crypto-freak then you probably don't need this book. If you're a regular Java programmer looking to move to the next level in your understanding and practice of security in your J2EE applications, then this is an excellent book to purchase and learn from. Table Of Contents1. A Security Primer
2. A Quick Tour of the Java Platform
3. Cryptography with Java
4. PKI with Java
5. Access Control
6. Securing the Wire
7. Securing the Message
8. RMI Security
9. Web Application Security
10. EJB Security
11. Web Service Security
12. Conclusions
Appendix A: Public Key Cryptography Standards
Appendix B: Standard Names - Java Cryptographic Services
Appendix C: JSTK Tools
Appendix D: Example Programs
Appendix E: Products Used For Examples Appendix F: Standardization Bodies
Simon P. Chappel would like Tim O'Reilly to call him to discuss the great Java book he's itching to write. You can purchase J2EE Security from bn.com. Slashdot welcomes readers' book reviews -- to submit a review for consideration, read the book review guidelines, then visit the submission page.
i find it a little funny how this book only contains three chapters on actual J2EE security.
9. Web Application Security
10. EJB Security
11. Web Service Security
Seems more like this is Security book for all Java 2 folks with J2EE tagged on at end. Ohh let us not forget that J2EE is a big buzzword that will most likely increase sales an extra 10-15% versus naming the book "Java Security"
i'll take the karma hit to state my opinion. Name the book on what it is about not what will generate a large amount of sales.
International visitors usually say the same thing every time they visit the good old U.S. of A.
It's not pratical to maintain two dialects when they are not both in active use, in language or in computer software.
Never mind that DOS was created after UNIX, and decided to be particular about wanting thier own file format, so they embedded what was previously a printer command just in case the computer didn't realize that it already had a carrige return to process.
Of course, I'm not really trying to convince you that the UNIX way is better, but now you see it from a different point of view.
Ironically, I had a problem where I was wishing my tools didn't support both formats seamlessly the other day! Under AIX, I use vi and :%s/^V^M// to get rid of the CR's. I was using Linux, though, and had a file with CR's in there that were messing things up, but I didn't know the cause at the time. I pulled thed file up in Linux vi, and the file looked fine. (I'm accustomed to using AIX vi, where I can see the ^M's all over the place plain as day, and delete them.) It was half an hour of troubleshooting and messing around before I saw the [DOS] notice at the bottom of the screen...
It's funny how making the tools smarter can sometimes be an obstacle.
Yes but )in the DOS world) I have used just a carrige return, and I have used just a line feed. And then I have used both in combination.
Just a carriage return (no line feed) can be used as a status display with a command line app. In a loop you update the status (such as a line counter), then use just the caraige return to return the cursor to the beginning of the line. The you write out the line number again ON THE SAME LINE.
Just a line feed can mimic a tree. One line down, same character position.
- - - - - - - - - - -
I am a programmer. I am paid to produce syntax not grammar. Deal with it.
Agreed - plain text passwords in web.xml or properties files are a security hole. What do you do instead? If you encrypt the password but your code can decrypt it, can't an attacker grab your war file along with web.xml and decrypt it?
Number one reason for plain password in Java deployment files is the database. These days, J2EE app _must_ use a connection pool so everything connects to the database using the same, faceless database account (app/app, prod/prod and so on). .properties file in the war file or in the .xml definition of the connection descriptor.
To reduce complexity, the same db user is often the owner of the database schema so has unlimited power to mangle tables and data.
It is kind of ironic to have powerful db server the creators of which put together sofisticated securuty features and always see the database password naked, exposed in the
JAAS would not help with the database access, right?