5.1. Java 2 Security

Brace yourself for some massive simplification;[1] it's time to talk about Java security. In Java 2 security, classes are assigned permissions based on their code source. A permission is simply a description of some secured operation that you might want to perform. Permissions are defined as subclasses of java.security.Permission, and have optional targets and actions. For example, a class might have the FilePermission permission with target <<ALL FILES>> and action delete. This means exactly what you think it means—that the class can delete any or all files.

[1] See [Gon99] for the full story.

A code source contains the URL a class came from, plus any certificates used to sign the code. These two data items are stored in ...

Get Component Development for the Java™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.