Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Java security: How to install the security manager and customize your security policy

Learn about the security manager and the Java API, what remains unprotected by the security manager, and security beyond the JVM architecture

  • Print
  • Feedback

Page 6 of 7

Authentication

The support for authentication introduced in Java 1.1 in the java.security package expands your ability to establish multiple security policies by enabling you to implement a sandbox that varies depending on who actually created the code. Authentication allows you to verify that a set of class files was blessed as trustworthy by some vendor, and that the class files were not altered en route to your virtual machine. Thus, to the extent you trust the vendor, you can ease the restrictions placed on the code by the sandbox. You can establish different security policies for code that comes from different vendors.

For links to more information about authentication and java.security, see the Resources at the bottom of this article.

Security beyond the architecture

To be effective, a computer or network security strategy must be comprehensive. It cannot consist exclusively of a sandbox for running downloaded Java code. For instance, it may not matter much that the Java applets you download from the Internet and run on your computer can't read the word processing file of your top-secret business plan if you:

  • Routinely download untrusted native executables from the Internet and run them
  • Throw away extra printed copies of your business plan without shredding them
  • Leave your doors unlocked when you're gone
  • Hire someone to help you who is actually a spy for your arch-rival


In the context of a comprehensive security strategy, however, Java's security model can play a useful role.

Security is a tradeoff between cost and risk: The lower the risk of a security breach, the higher the cost of security. The costs associated with any computer or network security strategy must be weighed against the costs that would be associated with the theft or destruction of the information or computing resources being protected. The nature of a computer or network security strategy should be shaped by the value of the assets being protected.

The nice thing about Java's security model is that once you set it up, it does most of the work for you. You don't have to worry about whether a particular program is trusted or not -- the Java runtime will determine that for you. If the program is untrusted, the Java runtime will protect your assets by encasing the untrusted code in a sandbox.

Java's overall security strategy

Just as users of Java software must have a comprehensive security policy appropriate to their requirements, the security strategy of Java technology itself does not rely exclusively on the architectural security mechanisms described in this section. For example, one aspect of Java's security strategy is that anyone can sign a license agreement and get a copy of the source code of Sun's Java Platform implementation. Instead of keeping the internal implementation of Java's security architecture a secret "black box," it is open to anyone who wishes to look at it. This encourages security experts seeking a good technical challenge to seek out security holes in the implementation. When security holes are discovered, they can be patched. Thus, the openness of Java's internal implementation is part of Java's overall security strategy.

  • Print
  • Feedback

Resources