Customizing the Security Architecture

Written by Li Gong, Gary Ellison, Mary Dageforde; Published by Addison-Wesley

The following excerpt is from chapter 7, Customizing the Security Architecture, of Inside Java 2 Platform Security, Second Edition: Architecture, API Design and Implementation, written by Li Gong, Gary Ellison and Mary Dageforde, and published by Addison-Wesley Professional Publishing Group.

This chapter demonstrates ways to augment the security architecture. We explain how to develop custom implementations of the various security classes that support either extensibility or substitution mechanisms. We also describe the mechanics of implementing a custom Permission class, extending the function-ality of the SecurityManager class, implementing a custom Policy provider, and implementing a DomainCombiner interface.

7.1 Creating New Permission Types

Recall from Section 5.1 that J2SDK 1.2 introduced a new hierarchy of typed and parameterized access permissions, rooted by an abstract class, java.security.Permission. Other permissions are subclassed from either the Permission class or one of its subclasses and appear in relevant packages. For example, the FilePermission permission representing file system access is located in the java.io package. Other permission classes are:

  • java.net.SocketPermission for access to network resources
  • java.lang.RuntimePermission for access to runtime system resources, such as class loaders and threads
  • java.lang.PropertyPermission for access to system properties
  • java.awt.AWTPermission for
    • Requires Free Membership to View

    There are Comments. Add yours.

    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.